* A great (really great) orm
* Best documentation I've ever seen in a project
* Predictable, no magic
* Easy to start but very powerful forms
* Great community, positive attitude, always willing to help
* Batteries included and, for anything missing, lots of add-ons (in the form of apps) for all your needs
* It's in python and supports both 2 and 3
* Good i18n support (english is not my primary language)
* Good templating
* MVT (model view template) architecture works great, especually after you switch to CBVs
* Great support for REST (through django-rest-framework)
* Easy and to-the-point project configuration supporting multiple deploys (development, production etc) and non-commited to vcs settings
I've tried other frameworks in the past but I've always stuck in a missing feature or just wanted to do things in the django way.
I'm building a personal project in Tornado and MongoExpress, and the only thing I can see about structuring my models is to put all of them in one file called models.py
I'm used to the RoR way of doing things, so this seems very counter-intuitive to me.
In addition, whenever I try to break the classes into different files, I'm not sure of where to store my DB connection logic, and how to ensure that all models are accessible from the controllers.
Ideas?
Also, you shouldn't need to worry about database connection logic in Django unless you're doing something very specific.
Or am i wrong?
PS... Django <3
I'd use Wordpress when building simple websites that serve as landing pages or blogs. If the main use for the site is showing some basic static info that never changes or the owner coming in, writing a few articles and clicking save, then Wordpress might be a good fit.
I'd use Django when building more complex websites and web applications where a CMS just doesn't fit due to the complexity of the logic, functionality or data. For example you might build an inventory management system with Django since it can have complex business logic and the data doesn't really fit a blog format. You might build an online store with Django, since you need to model and handle logic for products, inventory, payments, customers and such.
Before I've used backbone, but react with redux is night and day difference. Even you're just starting with js, your apps will be less error prone, because of concept unidirectional flow.
Maybe this is no longer special to react/redux, but I'm really not in the age I can switch frameworks everytime some new stack arrive. React serves me well. And then, there is also react-native, which is 90% same as react so you can reuse what you have learned. Other frameworks don't have this close to native counterpart. (not counting cordova, which allows to use any fw, but performance will never be same as react-native).
But in some cases a SPA let's you go to a different route to Parse or Firebase backends, or Lambda/Functions. That's different.
- ASP.NET MVC makes it much easier to keep your domain logic decoupled from the framework. This is in contrast to frameworks like Django who expect you to use their ORM, and to derive your model classes from a framework provided base class.
- It's C#. I know it well, it is common in industry, and it is statically typed. For programs of any real complexity, I find statically typed languages to be much more efficient and pleasant to work with.
Eventually I want to move more in the direction of stronger type systems, but it doesn't seem like there are many jobs out there for Haskell programmers who aren't programming demi-gods.
I've also used Phoenix a few times now and have been enjoying it. But I know Python much better than I do Elixir, so I skew towards that.
* Very little magic in the core.
* Well architected and loosely coupled (in spite of its sometimes-rep it's not actually monolithic: http://olifante.blogs.com/covil/2010/04/minimal-django.html)
* Largest/most solid ecosystem of 3rd party packages (except possibly rails) that does everything from authentication, CMS, CRM, ecommerce, comments, anti-spam, caching, REST APIs, file uploads, admin, emails, authorization, regular authentication, social media authentication, admin plugins, data import/export plugins, etc. etc. etc. meaning that there's an awful lot of code that you don't have to write.
* An opinionated core which means consistency which means that those 3rd party packages that all use caching, ORM, admin forms, etc. fit together and you don't have stuff like CMS plugins that just decided to use mongo for the hell of it (http://quokkaproject.org/) or 3rd party plugins forced to support 3 or more different storage backends (https://pythonhosted.org/Flask-Security/).
* Python is a terse and readable language with (relatively) strict runtime type checking and a huge ecosystem outside of just web stuff.
TypeScript, because its a fast compiler and has the best typechecker support and typings collection for existing front-end libraries, so there is almost no need to wrap anything.
React, because its conceptually simple, has wide community support and I get TypeScript's type checking inside the TSX templates too, unlike in Vue and most other frameworks.
MobX, because it needs less boilerplate than Redux, plays better with TypeScript than immutable.js, is really easy to make performant (lots of observer components + computed properties) and its intuitive to developers coming from Angular, knockout or Vue.
On the backend: TypeScript, Node, bluebird, node-sql and PostgreSQL
TypeScript, because it makes it easy to write end-to-end-typechecked programs if the backend language is the same as the frontend. The client and server can both claim to implement the same interface, and then its easy to see if any changes violate that contract. Additionally, server-side rendering with React is simpler.
Node, because its reasonably fast without thinking too much about it. The only pitfall are accidentally cpu-bound tasks, but in practice those are a problem rarely and I'm working on a tool to detect and report them: https://github.com/spion/long-task-detector
Another thing missing in node are better streams. A promise-friendly version of pull-stream would fix that.
Bluebird, because its fast and provides a great debugging experience with long stack traces
PostgreSQL, because it can go very far for many things before you need something else.
node-sql, because its an SQL query builder for node which can be made typesafe with TypeScript, and because query builders often beat ORM spaghetti in performance and maintainability in the long run.
I've been using it for over a year, and it is fantastic. In fact, I've just started my own personal fork to streamline some things to my dev process.
Anyway, one of the many nice freebies is a full user registration / password reset / oauth solution baked in.
Also, I should mention this is created my the same guy who wrote "Two Scoops of Django".
If it's customers call, I used Node (as sw architect), Django, Flask, Web2py. All of them are less opinionated than Rails, which IMHO is bad because any project can be different and it costs time to get on board.
* Fast development cycle
* Conventional
* Great community
* Good ecosystem of libs to take advantage of
* "Magic" (although Phoenix's magic is much different)
And some of it's own like
* Great concurrency (which feels like a free win over Rails)
* Functional programming
* How Ecto, the ORM works
* How simple it is, even with the "magic" included.
* How assets are handled, via a thin layer to Brunch, Webpack, or other JavaScript asset bundler
There's a few more, but I think those are a lot of the major talking points.
My 2cents reply.
Now I'm working on a project with a smaller scope and I'm simply using express.js and knex.js, no ORM. I love the simplicity and level of control I have. It's liberating not to have to guess what the ORM is doing to my data between my code and the DB layer.
And right now I'm trying Laravel (PHP). It has a great documentation. I like the ORM and that it's easy to use. I want to build an API with it and consume it with a SPA and react.
There are plenty of better solutions like PHP, Ruby or Perl.
ActiveRecord is the best ORM I've used so far. You don't need a ton of boilerplate or config to get up and running with it. It supports all of the basic stuff, and seems to do it well, and for more complex stuff, it makes it easy to drop down to SQL instead of trying to put a ton of ugly glue on top of doing complex stuff in SQL.
I like the way Rails has commands to output the whole route table, and the whole middleware stack it's using. Along those lines, I like the way the router works, and the way that most of the advanced functionality is neatly tucked into middleware that you can add or remove.
I like the flexibility of being able to plug in a bunch of JS processors, template languages, CSS processors, etc.
I like how much functionality you can add by just throwing a gem in the Gemfile, and the Bundler system does a good job of tracking gem versions to keep all environments consistent.
Competitors I've used:
ASP.NET MVC: Too much functionality is buried in either the IIS server or other libs that you can't debug into easily. I don't like the routing much - there's too many ways to specify routes, all of which seem unclear, and there's no single place to see all of your routes as the framework sees them and where they all route to. Plus the often-incomprehensible method argument matching. MVC tries to be all clever in deserializing arbitrary JSON and XML into .NET objects, which is handy when it works, but good luck debugging what happened when it doesn't work, and good luck if you just want it give you the freakin' request data as a plain old string. I've spent hours smashing my head against trying to get MVC to actually route my requests to the intended controller methods and do something reasonable with the request data. And I still haven't made sense of Entity Framework.
I've also toyed with things in Java, NodeJS/Express, and a few other things, but I don't feel like I've really used them enough to offer an opinion, besides noting that the "common knowledge" of Java being verbose and over-complex, and NodeJS/Express being too bare bones seem accurate.
Catching errors at compile time is mostly about avoiding subtle bugs like object.property vs object.propery or adding a parameter to a method and forgetting to update 1 caller
From a programming standpoint, it's the worst thing in the world: A Windows GUI thing that builds PHP apps and it's closed source.
From a get-stuff-done standpoint: I made a tracking web-app for large expensive tools that knows about Customers, Project Locations, Scheduling, Work Orders and Invoicing - it will grab a customer signature and email them the receipt. I did it in about four hours.
It has hooks in the system for those that actually know what they're doing (not me) to embed PHP code at important points.
The pros:
- programming the same language in the frontend and the backend (which becomes a big deal when you do serverside rendering of react components)
- for some reason AWS and Google App Engine have very good nodejs support
- very fast io
- very fast iteration time, faster than python
The cons:
- the lack of quality libraries and standards. With flask there are well known, well tested libraries for every use case. Not so with nodejs.
- javascript, which isn't really a big deal
Funny thing is, NPM is fun at the start, but in long running projects it's really bad. I mean, it feels like a huge step forward coming from PHP (where I didn't have any package manager back in the days) or Python (where pip seems to be a bit clunky) but it still could be better. Hopefully Yarn changes that.
Having the same language on front and backend is good for my own projects.
But it really is a problem on commercial projects I work on, because the people in charge tend to mix developers. I wouldn't consider myself a back-end developer, but was forced to write multiple APIs, because "it's just JavaScript, right?!"
I've found that Elixir and Phoenix have an awesome community and a fast-growing ecosystem. The language is very clean and I can solve problems in a cleaner and faster way. It has all the tools I need and runs on a simple but powerful virtual machine with stunning performance and easy deployement. I can use websockets and async jobs without running external processes/daemons and thanks to brunch (or webpack, it depends) I have a powerful toolchain for frontend. Speaking about frontend, I've recently moved from React to VueJS, it's a very decent compromise between React and Angular: simple like React, with features and concepts similar to Angular.
* I had been using Django for some 5-6 years, until I finally realised that I'm not happy with many of its architectural decisions -- global singleton settings, the way views are organized, the way it's organised around the ORM and everything. It provides a lot of tools, but if you don't need some of them them tough luck, you still get to lug them around and it's not helping you find any workarounds.
* I've learned to prefer frameworks that don't get in your way and allow you to choose any individual components for individual needs. I've worked with Flask and Bottle, which are great but sometimes go too far in the opposite direction, focusing so much on simplicity that more complex tasks require jumping through a different set of loops (I'm looking at you, Blueprints).
* Tornado's Web framework is successfully avoiding both types of traps, and it gives you the ability to develop simple apps -- say, a REST API -- quite easily and naturally, at the same time giving you the room to grow your creation naturally as needed. I've briefly tried Falcon, which follows a similar philosophy, and is IMO a great alternative.
* Tornado, however, is not just a Web framework -- it actually provides an amazing set of tools which can be easily in your app or even without any relation to a Web app. And the best part of the toolset is its asynchronous networking capabilities, which provided things like coroutines long before they existed in Python -- and now you can combine the two in a same app.
* Last but not least, Tornado provides an amazing, production-ready, non-blocking HTTP server. Most of the other frameworks make a point of not using their built-in servers in production, instead advising you to plug your app into a WSGI server like uWSGI or gunicorn; you can do that with Tornado too, but if you don't your app can process requests asynchronously, preventing slower requests from blocking faster ones.
Front-end: Bootstrap + (Three.js or Snap.svg) + ws
I create browser-based interactive UIs for controlling Arduino robots. I like to keep the web stack as simple as possible because the tricky/hard parts are in the robotics layer.
For newer/bleeding-edge I use Go with Vue.js on the frontend. I like Vue's simplicity and community - It's the only frontend framework that made sense to me and I was able to be productive in in a relatively short time. Go on the backend because it's clean, fast and stable.
At the risk of self-promotion, check out my weekend project - https://github.com/zohararad/bee-gorm-graphql (Golang on the backend, Vue on the frontend)
For my apps I have a loose framework that I built over the years with pub-sub model between client and server and similar within the server side code itself.
Node was an easy choice since I love JS and having only one language reduces cognitive load a lot.
Express is a well known mature framework, similar with SocketIO even though it has some warts.
Angular is similarly a mature framework which I use in s quite simple manner to tie pieces of code together so i haven't had any performance problems. And since I work in enterprise it is still very a very popular choice and none of the issues with strange licensing or complicated transpiling build systems.
net/http: The stdlib package is robust and I find myself productive working with the provided APIs. gorilla/mux router instead of the default servemux.
I use go-kit https://gokit.io/examples/stringsvc.html for most production apps I write. I use go-kit because it provides a clean separation of decode/encode logic from the actual business logic of my application and includes some great packages for instrumentation, logging rate-limiting and bunch of other concerns.
On the frontend side, I prefer to write clients in Elm.
[1]: https://www.playframework.com [2]: http://akka.io
I have settled on ReactJS with Clojure REST or Spring REST. React knowledge and REST knowledge is portable across projects and jobs.
- Super Modular, easy to achieve separation of concern;
- Powerful routing system;
- Consistent API;
- Elegant;
- Performant;
- Pyramid folks are super nice and super helpful on irc
This appears to be the cheapest and most reliable and autoscalable way to build web apps, even though the tooling could still be streamlined. I also believe that React and JavaScript in general currently have the best ecosystem, so it's easy to find anything you need (tools, libraries, components, problem solutions).
It's super fast, C# is mad fun to develop in, and now it runs on Linux. We've even started deploying production sites to CentOS-based VPSes.
Each site gets its own dotnet instance, and for a while I was even running them all within a screen session. It was kinda neat to be able to flip through all of them, and see the dotnet instances at a glance, but now they've got proper startup scripts.
In Flask, an endpoint is just a Python function, and most importantly, the URL endpoint is right next to the function declaration, so you don't have to keep track of two or three things in two or three different files. (Though the template is a separate file, of course.) To do something new just add an endpoint and a function; and most IDEs let you collapse/hide the function's code when you don't want to look at it, so it's as "clean" as it is flexible, if not elegant.
I was using Rails for both but I love the freedom, ease, and capability that comes with React.
I could move to using something "lighter" than Rails on the backend but I really do like the 'batteries included' stuff that means I don't have to think about much to get up and running.
Angular 1 on fronted -> easy enough to learn quickly, feels good to use and is powerful with great support and add-ons. Looking to start learning angular2
Will learn elixir and phoenix for some realtime and websocket stuff.
As long as you're happy with your microservices needing at least a gigabyte of memory each. My current project has ~15 Spring microservices, and with two instances each and blue-green deployment, we need 60 gigabytes just to be in business.
Slim because I love simplicity and am a slow reader.
Susy grids because it fits my thinking and is very adaptable.
Vue.js because it lets me write HTML as HTML and JavaScript as JavaScript. And because it makes sense to me. Vuex because it follows the same principles used by Vue.
- For API based work, I love Flask (Python).
- For full fledged application, I am loving Laravel (PHP). With PHP7 and package managers such as composer and the awesome laracasts tutorials, it is just a breeze.
Escher.jl - http://escher-jl.org
Yes, I primarily use it because it's Julia and I am really enjoying Julia, but it's also a very interesting take on a modern web framework for a modern language (even if it is a bit rough around the edges).
- Currently freelancing for a client and using CakePHP. Didn't choose it, the existing system was built on it.
- Worked on Codeigniter an Yii in the past. Chose them because they used to be the most popular frameworks back in the day.
- Used Slim and Lumen PHP microframeworks whenever I was working on a tiny project.
- When I'm not freelancing, I'm learning Elixir and Phoenix.
Frontend: None/jQuery for simple sites, Angular 1 (older projects) and Vue 2 (newer) for apps
I'm also using Phoenix for pet projects because Elixir is Ruby 2.0 for me.
got into expressjs/jade, but didn't like the nested async callbacks, really annoying to read the code, but the tooling side was cool with npm, gulp, etc.
i used to use sinatra/haml/activerecord for a long time, really liked the simplicity of it, but ruby in general was just too slow in terms of performance, had to use a lot of physical resources to supplement for its slowness.
before sinatra i used ror, this was before i decided that rolling my own was more streamlined and efficient.
before ror i used python, tornado, and sqlalchemy. god, sqlalchemy was so clumsy back then, i even bought their ebook for my kindle, what a waste of money. ran ok, really liked the decorators used by tornado, but then fb went and bought friendfeed which doomed tornado to the depths of /dev/null.
before python, i used java servlets (as part of the j2ee standard) and java server pages. it was sort of nice to use html files and embed these java snippets, but still pretty primitive.
before j2ee, i used php, pear, god save me from those days. my personal blog was built on this, i saved all entries into xml documents and stored them in directories based on the date. that site was hacked and pwned so badly, thanks php security holes! this was a time before templates and orms.
and from the very beginning, there was pure html, wow, we have evolved so much since then.
golang is perfect for me, but i use it for a lot more than just a dynamic web server, it's also an api server and websocket service. i really like the ease of deployments with golang i.e. just copy a binary to my production servers. and the code is fast and scales. coming from sqlalchemy, activerecord, and sequel, i was a bit underwhelmed by gorp, but soon found out that going with sql was good enough.
Love the simplicity, speed and power. Huge ecosystem and fast rampup.
Laravel (2015/16), Yii1/2 (2015-now), CakePHP (2015), Zend (2009), CodeIgniter (2009-Now), Symfony 1 (2008/9)
I'm the programmer, not the framework!
Maybe it is because I love the Explicit is better than Implicit approach more than the Convention over Configuration thing.
Conventions can change. Configurations, they remain!
DB: Maria. again, familiarity is key. been using MySQL for almost 20 years and it does what I expect.
UI: nothing fancy. bootstrap and, if the use case absolutely requires it, jquery. have been going back to fairly js-light designs lately and clients seem happy for it.
Yii is the 3rd framework from the same devs, so it's modern and unincumbered by cruft. Scaffolding is fast, API gen is automatic and extension ecosystem is strong.