
Ask HN: Which web stack should I learn for personal projects? - sisedi
Context: I&#x27;ve been a mobile native developer my entire career (~6 years, primarily Android in Java) and am finally playing around with JavaScript and the web.<p>To build a full-stack web product (optimized for productivity and ease of implementation on my end), which tech should I learn?<p>Things I&#x27;ve looked into but have not committed to: Iris framework built on Go, React for front-end.<p>Thanks in advance!
======
Bjorkbat
So, if you already know javascript then I would look at node.js.

Full disclaimer: I actually use golang for my personal projects because I'm
attracted by its simplicity and how it really doesn't hide stuff from me using
hand-wavy magic. Performance is also a factor, but not one I consider when
comparing it to node.

If I'm working on something I want to roll out fairly quickly. A prototype.
Then I'll probably use node and leverage npm quite a bit. Typically I'll
install Express, Sequelize, and Passport. If a front-end framework is
necessary then I'll use Ember.

I've used Django a long time ago, and it was nice, but I'm not sure how much
its changed since then. I also worked with Ruby on Rails in the past. I think
you can be really productive with it if you put in the time to learn it, but I
haven't found any great internet resources to really learn it, plus it's a
little too hand-wavy for me.

~~~
endisukaj
How easy is it to build a full web app with Golang (I'm talking backend +
views here)? I have used Go for some small projects where I only built a REST
API using Go's default http library but never for something bigger.

~~~
Bjorkbat
Not bad at all honestly. Golang comes with a built-in templating engine that
was easy enough to convince me not to look for a better one. Routing is
simple, especially if you're using the Gorilla toolkit's mux package. Figuring
out how to work with database calls were tricky when I first started out
because I was used to Django abstracting that part away from me, but
eventually I really got the hang of it.

I would argue that the tricky part is session's and middleware. When I first
attempted to build a golang web app that required session cookies I got so
discouraged that I just swore them off and went with JSON web tokens instead.
It also took me a while to wrap my head around the concept of clean
middleware.

I would say it was rewarding in the end though, because I learned about some
low-level concepts typically abstracted away by the framework I was working
with. It's fun to know about these things.

------
silvaben
You can take a look at Elixir [1] (and Phoenix framework [2]).

Elixir's documentation is pretty neat and getting started with it is
relatively easy.

Phoenix framework is entirely optional, Elixir comes with something called
"Plug" which is all you would need to launch simple applications.

[1] [http://elixir-lang.org/](http://elixir-lang.org/)

[2] [http://www.phoenixframework.org/](http://www.phoenixframework.org/)

~~~
sisedi
Thank you! Phoenix is definitely bouncing around over here and I'd heard about
it before this Ask as well.

------
ilaksh
I am a Node.js developer and practically speaking you should probably learn
that.

But so far I haven't heard anyone mention the Nim programming language which
can compile to JavaScript or C and has what I consider to be superior syntax
and excellent performance as well as great metaprogramming capabilities. See
[http://nim-lang.org](http://nim-lang.org)

~~~
nimmer
+1 for Nim - being able to write both server and client side in the same
(excellent) language is very nice.

------
iyn
This is what worked [0] for me in the last couple of projects (and the current
one):

\- Backend: Django + Django Rest Framework + Postgres

\- Frontend: React + Redux + React Router + webpack + million other small
modules [1]. You may also look into Relay (esp. upcoming v2:
[https://github.com/facebook/relay/issues/1369](https://github.com/facebook/relay/issues/1369))
and GraphQL, because it may simplify a lot of backend <-> frontend
communication.

[0] as in: I am productive using these tools. Partially, because I already
know the tooling and best practices.

[1] yes, there's a lot to learn about the tooling, but when you're just
starting, you can use some boilerplate or Create React App tool.

------
jmstfv
Check out Flask[0], which is a microframework for Python. Pretty easy to start
with plus you will be learning Python down the road. [0]
[http://flask.pocoo.org/](http://flask.pocoo.org/)

~~~
johnwheeler
I'm working on a Flask deployment starter that makes it easy to get a
production environment up and running on the likes of Digital Ocean / AWS
Lightsail / OVH (i.e. cheap VPS environments). I haven't written documentation
for it yet, but the code is up

[https://github.com/johnwheeler/flask-live-
starter](https://github.com/johnwheeler/flask-live-starter)

It includes tasks to provision a full Debian box with Gunicorn and Postgres,
deploy your app, provision a letsencrypt certificate, backup your database,
and tail your remote logs.

~~~
siquick
looks good, thanks for posting

------
sisedi
== Consolidated advice ==

\- Don't use Iris because shady-thievery-mischief \- Learning is costly: If
you have to learn a lot to get into fullstack dev, learning a new language
will compound that cost \- Just pick whatever and f'n build something -
artists build

Backend: 1\. Node.js 2\. RoR in second 3\. Spring Boot/Play 4\. Phoenix

Database: 1\. Postgres

Frontend: 1\. React 2\. Backbone

Thanks all for the advice and avoiding the temptation to completely slam me
(though it's warranted).

My takeaways are:

1\. Don't forget about SSL, and LetsEncrypt provides a free option (will
donate eventually) 2\. Amazon Lightsail looks promising but be wary of any
service that will not automatically cap usage once you've hit your spending
threshold (apparently Google CC too, but not Digital Ocean) 3\. I know there
are .NET developers on here but they're a vocal minority (I work on a
Windows/Ubuntu machine so it's within my reach but ¯\\_(ツ)_/¯)

Thanks again, all! See you on the webbz.

P.S. I'm working on my first chrome extension (frontend only) and might
follow-up asking for advice on that.

------
TechHawk
Welcome to the web :)

I can recommend Yii (PHP MVC framework) which can help you get going quickly.
It comes with a code generator and also takes care of things like JavaScript
form validation and other front-end related things.

Personally, I like to only use JavaScript frameworks/libraries if they are
really required. If you need to do a lot of stuff dynamically on the front-
end, you can also look into libraries like Backbone, which give you a nice
tool belt but keep things more flexible.

Have fun! :)

~~~
sisedi
I like the idea of not remaining trapped in the frontend framework (angular
really bothers me for some reason). Others recommend backbone too so I'll
check it out.

------
OhSoHumble
Spring Boot if you want to continue going down the Java path.

Personally, haven't found anything that has led me to be more productive than
Rails + (Semantic UI or Bootstrap) + jQuery. Server side rendered templates
with some light sprinkling of javascript covers 99% of my needs.

------
dvdhnt
Node is great if you want to utilize npm modules.

My recent projects have been built on a Node server. I like to use knexjs as
an ORM, sometimes including bookshelfjs for model building. Cacheing or rather
message queuing has been done with redis. Often, this backend server will feed
a much smaller front end web server that leans on react and jsx to spit out
HTML.

PS I started out with rails but moved to a primarily node stack last year.

------
kayman
Any stack. Pick one and build something. Ship it. Remember, real artists ship.

~~~
sisedi
Hah, some eternal truth right here.

------
mixedCase
Some information you should probably be aware of when it comes to Iris:
[http://www.florinpatan.ro/2016/10/why-you-should-not-use-
iri...](http://www.florinpatan.ro/2016/10/why-you-should-not-use-iris-for-
your-go.html)

~~~
sisedi
Thanks for this, close call.

------
tedyoung
Since you're already familiar with Java, you might want to look at either
Spring Boot or some of the new, smaller frameworks mentioned in my repo:
[https://github.com/tedyoung/awesome-
java8/blob/master/README...](https://github.com/tedyoung/awesome-
java8/blob/master/README.md#web-appapi-frameworks).

Go is also a good choice, but there are better frameworks than Iris. Depending
on your needs, there's
[https://github.com/NYTimes/gizmo](https://github.com/NYTimes/gizmo) and Gin
([https://gin-gonic.github.io/gin/](https://gin-gonic.github.io/gin/)).

------
facorreia
Since you're fairly experienced with Java I'd stick with that for the back-
end. Since you're still learning JavaScript I would recommend doing most UI
rendering on the server side, and using JavaScript to add interactivity (e.g.
with JQuery). For that approach you could consider Sprint Boot and Play
Framework on the server side.

The other alternative would be doing all UI rendering on the browser, via a
single-page JavaScript application. A popular choice for that is the React
framework. In this case you could use the Dropwizard framework on the server
side (although Spring Boot and Play would also work).

~~~
sisedi
Thank you, I'm definitely going back/forth between sticking with what I'm
familiar with and learning something new (because that feels more fun?) hah

~~~
facorreia
I hear you, and that can be refreshing, if your only goal is learning.

If your goal is to create a small project / product, you'll have plenty to
learn already about web applications without the burden of learning a new
language and toolchain.

~~~
sisedi
That's a good point.

------
nsebban
Server-side :

\- Node.js is great if you like JS. It couples really well with MongoDB (see
MEAN stack).

\- Play Framework is quite nice if you want to stick to Java.

Client-side :

\- React is...well you tried it.

\- Vue.js is great.

~~~
sisedi
I played with Vue just now and it felt right. :)

------
s_m
I would suggest you use Node. It is nice not to have to switch mental contexts
when switching between backend and frontend code.

------
theandrewbailey
If you want to stick to Java, look into servlets and JSPs. For databases,
almost any will do, but I like Postgres. As for database API, use whichever
JPA implementation that comes with the server you're using.

Sometimes, bare Java EE is good enough.

------
micaksica
Ease of implementation? Just grab any modern Rails and pick a frontend
framework later.

~~~
sisedi
I worked with Rails briefly in my previous company and found a working product
nearly unmanageable.

Any tips on keeping the codebase legible?

~~~
micaksica
Define legible, or rather, what were your frustrations with your previous
company? I have worked with _many_ Rails apps, some at very large scale, and
never found them illegible in situations where the developers 1. conformed to
best practices, 2. did not try to write Ruby like a C-derivative, and 3. were
using rails for CRUD apps vs. trying to wing something mostly made for CRUD
into doing something it probably shouldn't have.

------
iends
Don't use Iris:

[http://www.florinpatan.ro/2016/10/why-you-should-not-use-
iri...](http://www.florinpatan.ro/2016/10/why-you-should-not-use-iris-for-
your-go.html)

~~~
sisedi
Thanks for the heads up

------
katienreed
www.learnphoenix.io is a great book on React, Phoenix and Elixir. The book
covers many more modern programming concepts and are explained in a clear and
coherent way. Not only is Elixir exciting as far as the future of functional
programming goes, but the content that breaks down React and all of the pieces
consisting of front-end architecture is detailed from the build system to CSS
modules. Anyways, just a thought, but it's a nice jumpstart into a new full-
stack that's going to gain a lot of traction in the coming years.

------
archbloom
Ruby on Rails for backend and Backbonejs, marionettejs for front end.

~~~
arisAlexis
Good for 2012 :)

~~~
sisedi
XD

------
tugberkk
If only for personal projects, I would say PHP. Easy to learn and implement.
XAMPP stack would be sufficient enough.

Again, if only for personal projects, since you are familiar with JS, I would
go for node.js.

------
miguelrochefort
C# + ASP.NET MVC + Typescript

~~~
sisedi
The first .NET recommendation! I was waiting for this one. :D

