
Ask HN: Best web framework in 2018 - k120
I&#x27;m trying to choose right web framework for my startup. The problem is that I haven&#x27;t followed last trends in web dev for a couple of years. Previously I used Python&#x2F;Django for all of my web projects.<p>Initially I decided to choose Python&#x2F;Django because I am familiar with that tech stack and I can be productive from first day. But I have some doubts because our web app will use heavily a lot of interactive stuff like a WebRTC, realtime whiteboard, chat messaging etc.<p>So, do I need to choose something like NodeJS based web frameworks or I can stay with Django using builtin Channels library?<p>If I need to choose NodeJS based solution, what kind of libraries do I need to use? Express, React, MongoDB, etc. Is there a some recommended ways of building such apps and do it have standard functionality with common cases like user authorization, session etc.<p>Maybe some another good alternatives here?
======
CM30
I'm going to be a bit harsh here, but I think the answer is:

Whatever you're good at and can get a decent MVP out of the door with.

That might be Python and Django like you mentioned above, it might be NodeJS,
or it might be anything from React to Angular to any other framework you can
imagine.

Because at the end of the day, whatever you actually write the product or
service in matters far less than what you actually do with it. Indeed, unless
your audience are programmers and run your software themselves, your audience
won't give a toss what your software was built in.

Pick whatever you want to write this thing it, but always remember that being
early to market it usually a hell of a lot better than being late because you
spent tons of time learning an all new framework for it.

~~~
protonimitate
Agreed.

There will always be arguments around the "optimal solution", but the only
solution that matters is the one that gets your product to market the quickest
and with the least resistance.

If you know Python and Django, keep on keeping on.

Of course, there is always room to experiment and try new things for learning
purposes.

Don't get lured in by the clickbait articles and twitter stack-of-the-month
evangelists.

There are very few framework choices that are 'bad'. And I'm willing to bet
that a dev that knows a 'bad' framework inside and out is more effective than
someone who hops around to the current flavor of the month.

------
JonesDE
There are many good frameworks out there that are a viable choice.

The main reason should be the people you want to hire and how you structure
your team. Also, you need to consider if you need high performance or data
science

Rails - good choice to start off. Fast to bootstrap a product. If you do not
need high performance, you can get old with it otherwise, you will move.

Java Spring - a lot of people know Java

Python - framework is not the fastest and modern, but python is a good skill
to have in your team if you need data science

.net mvc -- became an interesting choice.

Elixir Phoenix - smallest community but fun to work with and awesome
performance (like .net or spring) will scale very well.

Go/Iris -- best performance and easy to learn. Is missing strong abstractions
but an awesome community and libraries.

Javascript (express) - ever changing environment. Your developers can work on
frontend and backend. It's an advantage to have just one language.

My favourites are Go and Elixir but in the end, I would decide on the people
you will hire.

~~~
yunyu
Iris has a lot of drama behind it, and the author seems to be slightly
unstable (for lack of a better word). See
[https://www.reddit.com/r/golang/comments/57tmp1/why_you_shou...](https://www.reddit.com/r/golang/comments/57tmp1/why_you_should_not_use_iris_for_your_go_projects/)

I would recommend labstack/echo or go-gonic/gin as alternatives, chi if you're
looking for something more minimal.

------
jaredcwhite
I'm a Rails guy through and through, but I'll echo what many other commenters
have said: stick with what you know. Trying out new frameworks, languagues,
technology stacks, etc. is great for side projects. But if you're seriously
trying to get a new startup product off the ground and to MVP status quickly,
the last thing you need to worry about is the headache of dealing with all
sorts of new technology puzzle pieces. At the end of the day, your users won't
care if you coded the app in Ruby or Python or Javascript or Go. They'll care
if the app is good and meets their needs.

------
skrowl
Unpopular answer, but it's what we use here: Angular SPA front end + .NET
backend

The "best" is what you can get the best product done the most efficiently, and
what you're able to hire for. If a niche new thing comes out that might be 1%
faster in synthetic tests, but you'd have to spend 4 months learning it as
well as what you know now and there are no people near you to hire, it's not
really the "best" for you.

------
sebst
There are really good web frameworks, both frontend and backend, out there.
So, I would second the opinion that the best framework is the one you feel
most productive with.

However, I'd like to highlight ASP.net Core + Angular + Visual Studio here.
Microsoft appeasement towards Open Source and cross-platform made this a solid
choice. As web apps grow steadily in complexity, a modern strongly typed
language like C# (and TypeScript) might be helpful for architectural patterns.
And, last but not least, the tooling around the Visual Studio product family
is maybe best in class.

I am saying all this as someone who has not touched any Microsoft product for
years.

------
jonnycoder
To answer your NodeJS question, express is a popular framework for API
development and many databases are supported,
[https://expressjs.com/en/guide/database-
integration.html](https://expressjs.com/en/guide/database-integration.html).

I use sailsJS in my day job which is built on top of expressJS, and it does
everything you want out of the box for GET, POST, PUT and DELETE simply by
adding a model file and configuring the MongoDB connection string. It also has
standard functionality with it such as logging, session, authorization, _BUT_
you have to spend time learning how it works with sailsJS. Therefore it is
much easier to start at a lower level framework like express and add high
quality functionality modules as you need it, such as expressJS and adding
your favorite logging/apm module like New Relic.

I've done .NET, Python and now I'm doing Node at work. By far, Node is my
favorite because it always just works. I develop on Windows 10 and deploy
using Ubuntu 16 docker images. I use mssql node module and it has just worked
in both OSs. The only cross platform issue, with Node, I've had was that file
names are case sensitive in Linux but not Windows.

For UI development, that's another beast. I wrote an Angular 5 application
recently but I don't like it. Vue and possibly React look simpler.

------
bnchrch
Given the want for WebRTC, realtime, chat and messaging I would take a long
hard look at Elixir/Phoenix. It is perfectly suited to those problem domains.

As a bonus it has a good community and is in my opinion a pleasure to work
with. I've released a couple production projects using it and am currently
building my third. Ive also found from my own experience and watching a new
team pick it up that the learning curve is fairly small.

------
antoineMoPa
I'd say rails because the nodejs + PHP codebases I've seen aged poorly, but
the rails one are still clean. The problem with node is that things move too
fast. What was beautiful in JS 4 years ago now looks like legacy mainframe
fortran. Laravel (a popular php framework) is nice at one point in time, but
even 0.x.0 migrations will break you application and force you to work for
hours...

~~~
bnycum
Maybe as a counterpoint to your Laravel statement. I started using Laravel on
some work projects at 5.3 and have upgraded them up to this weeks release of
5.6 without major issues or time spent doing so. I don't know much about the
versions before that though. Other than it's not your grandfather's PHP along
the bad habits from the early 2000's. I personally think my Laravel code has
been pretty clean and concise.

------
thrownaway954
"I'm trying to choose right web framework for my startup." "Previously I used
Python/Django for all of my web projects"

Write your application in Python/Django. Your concern should be getting to
market fast, not which tech should I choose.

------
sidcool
Unpopular opinion, but Rails with server side rendered ERB templates are quite
quick to get started with. The convention over configuration philosophy gives
a lot of things out of the box.

~~~
thrownaway954
[https://www.youtube.com/watch?v=SWEts0rlezA](https://www.youtube.com/watch?v=SWEts0rlezA)

if you haven't seen Sam Stephenson Turbolink talk from RailsConf 2016, you
should give it a watch. What they did in a year with a small team is amazing.

------
thijsvandien
As others have pointed out already, there isn't really such a thing as a best
framework. Many of the fundamental ideas are the same no matter what you
choose, so the potential benefits of switching are meager.

Stick with what you know for the parts that don't absolutely require another
solution; not all (parts of) pages will be so interactive. Then branch out a
bit where needed, e.g. to handle socket connections well. Maybe not all of
that needs to be handled by the same service?

If you move the semi-realtime stuff into a separate project, it will be a lot
smaller in scope, hence less risky to experiment with. Regardless, I wouldn't
stray too far. If you'll be writing Javascript anyway, NodeJS could still be
fine, but don't needlessly bring in a third language. Do try Channels, but
don't overlook other Python solutions. Tornado is a workhorse that doesn't get
nearly enough credit in my opinion.

------
beders
I'm pretty sure there's websocket (and related tech) support for your stack. I
would explore this first.

If your startup is for consumers and you don't have a good estimate of your
growth or you don't know how fast your app will need to scale, then make sure
you can hire people who know quickly. Your hiring skill will be more important
than your tech.

Also, if the complexity of your app is low or medium, consider your first
implementation as a prototype that - given growth happens - can be replaced
with a faster stack relatively simple.

If high concurrency is needed, you'll bump into frameworks focusing on async
I/O. Java and C++ implementations are the leader here. (see techempower
benchmarks for more information).

If you can commit to a datastore (and you rarely make a mistake by choosing
PostgresQL), then replacing your prototype down the road is easier.

------
david90
Go for backend as a service or serverless: e.g. ReactJs as front end + Skygear
([https://skygear.io](https://skygear.io)) as backend

Disclaimer: I work for skygear (it's a opensource project)

------
znq
Without wanting to spam, I just want to share our summary of our favorite web
dev tools [https://mobilejazz.com/blog/the-best-web-frontend-
developmen...](https://mobilejazz.com/blog/the-best-web-frontend-development-
tools-in-2018/)

(We're a 25 people remote company and have been in business for almost 10
years now, so we've a little bit of an idea of what we're talking about.
Disclaimer though: one of the tools mentioned in this blog post -- Localname
-- if one of our own)

------
dyeje
Same answer as the many years before: Rails, Django, or .NET.

Anything else and you're making serious tradeoffs on mindshare, features, or
something else.

Of those 3, I know Rails has good realtime support via ActionCable.

~~~
regulation_d
I like Rails, but calling ActionCable good realtime support is being a bit
generous, no?

I was under the impression that scaling ActionCable beyond 1k/users per server
was pretty difficult.

~~~
brandoncordell
[http://anycable.io](http://anycable.io) is pretty easy to setup. You can run
your rails app and have ActionCable run through Go or Erlang.

------
lokarda
There is no "best web framework" :) It depends on several factors: \- your
personnal preference \- your domaine \- your need \- your budget \- etc.

Personally, I love the combo Golang + Vue.js.

------
niwde
Every programming language has its pros and cons. And many of them overlap.

A product’s success has nothing to do with which language or framework you
choose. They are there to help you develop something that works as per your
needs.

You mentioned your product deals with chat messaging. So I would suggest using
something like NodeJS + SQL for the backend. NodeJS for its ability to handle
high volume of events. SQL for managing the chat history of each person in a
relational way.

My two cents worth :)

------
netgusto
Symfony 3 (and recently 4) is a very effective, focused tool that gets out of
your way and let you get the job done, once you understand and give in to
dependency injection and single responsibility principle

[https://symfony.com/](https://symfony.com/)

Killer feature: you can use every symfony component in your own app without
the framework if you want (console, http router, service container,
templating, etc.)

------
truesy
Use any, really. If you want "best in 2018," in Node, my recommendation is
Next ( [https://github.com/zeit/next.js/](https://github.com/zeit/next.js/) )
- it is extremely good if you want to kick something up fast, and get it out
as an MVP. And can be extended upon to have a rich application, with a variety
of other frameworks.

------
johnsonjo
As far as front end libraries go, I learn quite a few of them in my free time,
and I found Vue.js insanely simple to pick up. One of the things I like so
much about it is the tooling can be incrementally adopted. If you don’t mind
paying quite a bit for a membership I would recommend the 4 hour course on
frontendmasters.com by Sarah Drasner. That’s how I learned.

------
dawhizkid
I just launched a side project with react + react router + graphQL + rails
(API only) backend.

------
amourgh
React/Redux +.NET CORE backend,Postgres for the DB is one of the best choices
i use

~~~
sebst
I've always had the feeling that Angular is the better choice for .Net, since
it's TypeScript by default and far more opinionated than React (as well as
.net core mvc is an opinionated framework).

How is React superior to Angular in your use cases?

~~~
amourgh
It's what the team already used before.

------
kapv89
If you are planning to use node.js with PostgreSQL, I want to pitch in my ORM,
tabel: [http://tabel.fractaltech.in/](http://tabel.fractaltech.in/)

------
ConcernedCoder
Just please not AngualarJS, not like this... please GOD not like this...

------
vasilakisfil
you can just split backend from frontend and use in the frontend an all-in js
framework like Ember, Angular etc or combination of different js front-end
libs like react + redux + react-router.

------
adelarsq
ELM

------
nwmcsween
Hyperapp + graphql

------
adamiscool8
LAMP

~~~
riffic
is not a framework

