
Ask HN: What web framework would you recommend for a greenfield project in 2018? - _diyu
It&#x27;s really hard to keep up, they&#x27;re changing and coming and going all the time. Between now and the time I last looked into the latest frameworks, Angular has jumped from 1 to 2 to 4 and now I think it doesn&#x27;t even have a version number? And React blew up but Vue is keeping up, Rails seems to be losing traction, ClojureScript and Elm seem to have had a brief spike in popularity, then there&#x27;s Ember, and in general I&#x27;m very confused.<p>In particular I don&#x27;t have a lot of particulars. I plan to deploy to EC2 and there is a need for a little bit of JS on the front-end for some stuff that can&#x27;t be done server-side, but other than that it&#x27;s all a very standard web app.<p>Comparison articles come out all the time but it&#x27;s really hard to judge the competency or bias of the author. So I&#x27;m turning to you HN considering your reputation for being at the front of the game.
======
undecidabot
Is this project a serious one? If it is, go for something mature and something
you are familiar with even if it's "unsexy" like PHP and jQuery [1]. Learning
a new technology while building your product can be fun, but it is often
counterproductive. Unless your project has specific needs which only a few
technologies can fulfill, it'll be just fine. Choosing something familiar
allows you to focus on your project instead of your tech stack.

Don't worry too much about choosing the "wrong" language or framework. What
you build matters more than how you build it. For example, many would
recommend Postgres over MySQL for good reasons, yet those who use MySQL are
doing just fine [2]. Their advantages are often insignificant in practice, so
feel free to ignore the hype (especially here on HN)!

Angular, React, Vue are all fine choices for building SPAs. Rails is kind of
out of place here (it's not a front-end framework). The hype around it has
died, but Rails itself is still very much alive, and it's very mature.
ClojureScript and Elm may need a bit more getting used to depending on your
experience. Their communities are relatively small though, so you'll have less
resources available.

[1] PHP gets a bad rap for its past, but modern PHP really isn't so bad (very
Java or Ruby like, depending on the framework that you choose). jQuery is
"old", but reliable. Not a good idea if you're building something highly
interactive, but if you only need "a little bit of JS" then it seems like a
good fit. SPAs have many advantages, but are also much more complex, so avoid
building one if you don't need to.

[2] [https://www.mysql.com/customers/](https://www.mysql.com/customers/)

------
quantummkv
This is a very simple checklist I recommend to anyone who asks me this
question:

Know PHP? Take Laravel. Know Ruby? Take Rails. Know JS? Take vanilla Express.
Know Python? Take Django.

Sprinkle some jquery on top for the frontend with bootstrap for quick UI. And
if you plan to support only modern browsers (not IE), you might not even need
jquery. A whole lot of the api is built straight into modern browsers.

Any such tomfoolery such as Single Page Application Frameworks, Server Side
Rendering of said frameworks is never required. Not even facebook, which built
react for its own use, has a fully React rendered page.

Deploy them on a regular servers/stacks. No unnecessary docker, kubernetes,
etc., is required, unless you are making a project for google where you will
get a million hits on the first day.

~~~
_sdegutis
Awesome, thanks for this detailed answer! I was really starting to get nervous
with the option-overload, but I feel comfortable with Express.js and Node.js
and some ORM for the back-end, and vanilla JS for the front-end, so that's
probably the direction I'll go! I guess I'll still need a build tool though
since I'd like some things like autoprefixer etc, and I'll need to figure out
a template engine for Node. Anyway thanks again!

~~~
testb
Hey, I picked a similar stack when I developed my product. Basically we
started with EJS templates since they were the closest to normal HTML but had
to move to serverside Vue + Express because of security issues when mixing Vue
+ EJS.

I'd love to talk more about what/why if you have any questions. Shoot me an
email @ [redacted] if you're interested.

------
crooked-v
For a frontend project I would recommend React, as the tooling available for
it goes way beyond Vue or Angular. A React component is syntactically
equivalent to a plain JS function or class, so once you're set up you have a
much easier time (IMO) managing a large project using it.

If the project is such that you don't need to specifically have server APIs
separate from the content you serve, you might want to look at Next.js or
After.js, which are two similar approaches to a "just make a whole website out
of React components, including server-side functionality".

------
andrei_says_
What languages are you comfortable and proficient in?

If you plan to write a volume of code comparable to a small novel, you will
likely want to do so in a comfortable way, able to express nuances and details
in an efficient, readable, elegant manner.

There aren’t many writers who can write equally well in French and English,
and even fewer who can write fluently and with finesse in Belgian French,
Canadian French, UK English, Australian English, Mexican Spanish and
Catalonian Spanish.

It takes constant experience and refinement to master Ruby + the rails API,
something I imagine is even more true for the front end in the presence of elm
etc.

I know that i would pick up the tools that my brain groks with the least
effort (from a set of reliable, popular, well maintained options). The way my
mind works can be the weakest link or my strongest asset — if I take it in
consideration.

I can think Vue but I can’t think React. I can joyfully think Ruby but I get
frustrated with C# or pho etc. slim makes me happy, erb pokes my eyes.

------
rs86
I recommend elixir with plug/cowboy. Phoenix is nice too.

On the front end try Elm.

------
BjoernKW
In terms of front-end development for business applications I'd recommend
Angular (current version: 6. Since they adopted semver major releases have
become much more frequent).

It gives you an easy way to structure your application in a predictably
manner.

In my opinion, Angular lends itself to CRUD-type applications particularly
well because of a clear separation between business logic and the presentation
layer as well as due to easily reusable components.

Since Angular 2 the tooling has become quite reliable as well.

As for the back-end I'd suggest Spring Boot. It allows you to draw upon the
vast amount of high-quality libraries available for the JVM without incurring
the complexity cost that in the past often used to come with Java.

------
parvenu74
Unless there is a compelling reason to go another direction: React on the
front, Node on the back, deployed in Docker containers.

~~~
aosaigh
I disagree. Not all projects need a two tiered approach. For simple webapps a
server-side, template-driven framework like Rails, Django etc. will make life
much easier. You introduce a lot of added complexity when you go with an API +
SPA

~~~
_sdegutis
I'm not sure about that. If I use create-react-app to do a lot of the heavy
lifting for the front-end, and use nothing but GraphQL for the back-end, that
is still pretty simple, right?

------
IlyaStam
React on the front, python Flask on the back (if you need to build a small app
quickly), or Java dropwizard if this is going to be something big.

------
err4nt
I think it really depends on what you are building, and it may be the case
that a frontend framework is overkill for what you need!

