Ask HN: Fastest/easiest framework to build a web application in 2017?
What are the current recommendations for rapidly building a web application? Back in the day it used to be Rails. It seems like Phoenix is picking up steam.
Are there any other full-stack frameworks that take you from nothing to something fairly robust in a few hours?
39 comments
[ 5.1 ms ] story [ 96.2 ms ] threadAlso depends on who will maintain this app in the future. The more esoteric a stack, the harder it is to find other devs(or they're expensive).
The ecosystem of pre-built modules(eg FB integration) so you don't have to re-invent the wheel. Python seem to have a really good ecosystem of libraries ranging from datascience to crypto.
What are you performance requirements? Do you need sockets? Django now has channels that provide you with some of that.
The answer as always is "it depends". I personally recommend sticking to what you know best(unless you're using this as a learning opportunity) and work with whatever the community prefers in that language.
Note that if there is more than 1 engineer, it is absolutely worth it to work with common technologies. Elm/Elixir are not common technologies (though people love talking about them).
Node + Express for the backend is super simple. Mongo or MySQL/PostgreSQL you will have no problems with (though I am biased towards relational databases) React for the front-end is also simple, very well known and easy to hire for.
If your application is more basic or more CRUD-oriented (as most apps are), Ruby on Rails has always been a solid choice and will continue to be a solid choice for years to come. There is also a very large pool of people who are very well-versed with it.
https://news.ycombinator.com/item?id=15685905
For full stack opinionated frameworks, there are a few like Laravel (PHP), Django (Python), Rails (Ruby), Phoenix (Elixir). They all come with batteries included for the most part. Then there is node/expressjs ecosystem if you are into that.
Then you have micro backend frameworks like lumen (PHP), Flask (Python), Sinatra (Ruby) which can be used to build APIs etc.
For front end javascript, you have react, vuejs and angular as the top 3. You also have elm (compiles to js) and then some other players like mithril etc. Good old jquery is still out there.
For more realtime stuff, you can use websockets (socket.io library etc), google firebase, pusher etc
I feel like most tutorials always complicated things by trying to add too much at once -- to a fault, I've never been able to learn Node/Express and build a working app where I could add a record, delete it, update it, etc. Once it gets to "ROUTING" I kind of lose it, unfortunately. Haha.
I would probably be better off with Wordpress for most website needs, anyway...
In that outsiders who see the code are amazed people still proudly ship this glorp?
"Use the language your team is familiar with! If it is PHP don't hesitate just because it is not "cool".."
Have to agree with that here too.
If you use a framework that has full support on one of the big PaaS services, you can save a lot of time configuring and maintaining your production and development environments.
For my most recent web app, I chose Python/Django on Google's App Engine. I spent less than 15 minutes configuring the development environment and new deploys take almost no time. I also spend very little time maintaining the production environment. GAE also has a lot of built-in debug tools (logging, stackdriver) that have made managing my application simpler.
There are a lot of such services now, including on AWS and in Azure.
Im primarily a Java monkey, but used django and django REST in a few side projects and was developing much faster. This includes picking up python3 as i went along. The end result was i wished Java had its own version of django.
(I’ve been doing this for over a decade. At one point I was a Django zealot and avoided Rails like the plague. Boy was I wrong)
The difference between Django and rails is pretty small from my oberservation. They have similar ease of use and performance characteristics.
Django is a good framework. Ultimately why people choose it or something else is about your own taste. The reason I didn't choose it is that Django give users more freedom i.e. configuration over convention which for me leads to https://en.wikipedia.org/wiki/The_Paradox_of_Choice (Maybe things have changed?) It's strange because Python is the opposite in terms of philosophy. Rails goes the other direction and is very opinionated which is also strange considering Ruby's philosophy is the opposite i.e. 10 million ways to do the same thing.
The next issue is community consensus. Python doesn't seem to have it. (Again things may have changed.) You can see this with packaging and the 2x vs 3x war. Not sure if Python has finally standardized packaging yet but it's hard not having a good package system everyone uses once you get exposed to ruby gems, npm modules, and even maven.
For the record, I'm not saying Python is bad. Just giving reasons for why I personally do not use it unless I'm forced.
Currently I know Python and am using Django.
I am too lazy to learn Ruby. Is it worth it to learn Ruby just to use Rails?
I can still crank out a pretty neat Web App in Code Igniter over lunch!
But, nowadays, I use Meteor which makes things very efficient while making an old hag look cool too :-) (Meteor allows you to leverage the great work available in the node community quite seamlessly)
https://github.com/choojs/choo
If you want to learn something new or want to be on the hype curve, don't expect to have something production ready fast. Expect to have challenges learning how things work beyond a blog/to-do list tutorial for new-to-you tech.
Both are similar so choose the one you know/fits you best.
nothing to something:
Laravel you can go from zero to auth + dashboard in like 5 minutes. There are lots of packages to speed things along.
Some of the items I'm recommending are paid, but they are well worth the value they provide and support the creator of Laravel and has enabled him to work on Laravel full time and hire another full time developer to work on Laravel and these products.
There is also Laravel Spark that's basically SaaS in a box, it's $99/site but worth it for a head start.
Laravel has a really great community and great tools that make it super nice/fun to use.
Laravel Valet, quick and easy local dev env. for OSX.
Laravel Forge, it's a SaaS that will spin up servers on (Digital Ocean, AWS, +others) and allow quick deployments plus easy SSL setup through LetsEncrypt. (There is also envoyer.io for zero downtime deployments.
Laracasts.com for learning.
Laravel + Mix will help you in getting started with single page app using Vuejs.
For the jobs, you can monitor them using Laravel + Horizon just like Sidekiq monitoring dashboard.
Also, in laravel 5.6, bootstrap 4 will be added as a preset.
They spend a lot of time on the documentation.
Also, focusing on "rapidly building" possibly over-fixates on Day 1 when it's Day 60+ where your stack choice is really going to matter once you need to respond to changes in business requirements.
However, there are a few high level decisions I'd consider pretty uncontroversial:
1. Relational databases like Postgres tend to be ideal for fast development since you can respond to requirement changes by atomically migrating your entire data layer to a different schema. This is pretty hard in NoSQL databases for example. You can also encode constraints in the data layer and then the application layer can just depend on them always being true instead of trying to encode them into the application layer.
2. Keep the application server as stateless as possible. For example, use something like S3 instead of going the tempting route of saving to the filesystem. A filesystem dependency is convenient on Day 1 but now you cannot spin up more than one server nor launch an application off of that machine. For similar reasons, it's also nice to host your database in the cloud like on RDS.
Backend: Laravel (PHP)