Ask HN: What web technology stack should I learn

9 points by spott ↗ HN
I'm a physicist by training, with most of my work being done in C++ and python. However I'm interested in toying around with creating interfaces for play projects.

Since this is 2015, this means a web page: with javascript/css/html on the front end, and something on the backend for database access or generating pages.

The question is, what should I learn? It seems there are a multitude of JS frameworks (and frameworks that compile to JS) (jquery, react?, elm, angular...), and a multitude of backends (django, rails, yesod, sinatra, etc.).

I don't need something that can host facebook, I just need something that is simple enough to use that I can hack together a site in a few hours (after I learn), and maybe put it up on AWS.

Any recomendations?

14 comments

[ 2.2 ms ] story [ 35.4 ms ] thread
It's a personal preference of course.

The irony of modern software development is that it is hard to learn how to do things the easy way. What I mean by that is that the easiest and most powerful ways of doing development often require a significant base level of learning and knowledge to understand. You can take a faster route to getting something up and running but the price is that it will be harder to work with. Someone has thought of an easier way, but first you must understand it.

All of that means that your choices are to get something quick and easy up and running but not really have any valuable long term understanding of the best way to do things. Or you can go through a painful period of "learning the easy way".

I recently did this and invested significant effort in learning react.js for the browser, and Python Falcon server for the back end, with Python Sqlalchemy for database access.

Here's an overview to get you started on the browser side: http://fourlightyears.blogspot.com/2015/05/an-incredibly-bri...

Learn one of the "basic" MVC frameworks:

Rails Django Etc.

Get some MVC working and then think about the new hotness on top of that. Shoot me an email if you wanna talk more about this kind of stuff.

Given that you've worked in python, I think Django is a very easy framework choice here.

If that weren't the case, I'd say it's just a "pick one" out of Rails/Django/Node (or some other JS framework, I'm not overly familiar with them).

I'd go Heroku if you don't have much linux experience, or Digital Ocean if you don't mind setting up & maintaining a machine. AWS is fine as well, I'm sure, I just don't have any experience with it personally.

You should learn Rails. Why? The Hartl tutorial[1]. It's the best tutorial I have ever read, far surpassing anything else.

Not only does it cover the various features of Rails, in it you build a real life app: a simple Twitter clone. Once you've finished the Hartl tutorial, you'll know how to build an app in Rails, how to write tests, how to use version control and how to deploy it to Heroku. It covers everything to build a web app with nothing missing. All in all, if you don't know much about software development (as opposed to programming, which I know you're experienced at) then I can't put enough emphasis on how great this tutorial is.

Others have suggested Django (a great framework that I've used too and love) as you know Python. That does make sense. If you're really confident in Python, perhaps you should pick Django. But Ruby won't take long to pick up either and I can assure you - the tutorial is worth it.

Finally, there are lots of other new frameworks, including client-side frameworks, that might be helpful too. I'd wait though for a bit. For the moment, you just can't go wrong with Rails. Years later, there's still just as much a demand as ever for Rails developers and it's a solid base that, once learnt, should serve you well for many years, whether you're building small projects for fun or large projects professionally.

[1] https://www.railstutorial.org/book

There are a bunch of frameworks out there and picking one can be overwhelming.

The answer depends.

For the backend:

Are you looking to create one-off throwaway projects which you'll code once and never touch again? In that case you can go for the quick-n-dirty approach and pick whatever language offers you the smallest learning curve (for example, you may choose Node.js since you plan to learn javascript for the frontend anyways)

Do you expect to make updates to your site over time? In the latter scenario you'll want to invest in a framework where you can learn the best practices online.

For the frontend:

Start off with just plain vanilla javascript (to get the feel for it). Then just pick either React or Angular. Flip a coin if you have to - at your level it won't matter which one you choose. Later on you can dive into the differences between the two, but after learning one it'll be easier to learn the other. Have you done any research to see what might be a best fit?

In fact, depending on how throwaway you want your projects to be you might not even need to worry about a frontend framework at all and just do all the work in the backend.

Send me a message @ZainRzv if you want to talk about it in more detail.

Great, now I've gotten recommendations for all three of the big backends. :)

Node.js, does make sense: I would like to screw around with D3 eventually, so knowing js sounds useful.

Do you know any tutorials for Node?

What size of "play projects" are these?

When they are very small you would like to look at platforms who provide the least coding and the most plug & play capability. There are a bunch out there I won't go into the detail, so long story short this should be WordPress + PHP.

There are tons of tutorials and zillions of free plugins, resources etc. If somebody has not done what you are trying to do may be it shouldn't exist in the first place :)

With your C knowledge you wont be alienated to PHP.

If you want one of them go big and provide a solid base for that, and grow the company, hire somebody else to do that etc - learn RoR (Ruby on Rails) . It is an intuitive language and you can develop stuff really fast. Plus, it will be easier to find devs if you want to enlarge your project.

You work in Python & you want simple web interfaces?

Flask. Check out the docs, it's about as simple and pythonic as it's possible for "respond to this URL by executing that python function" to be.

http://flask.pocoo.org

Talking to relational databases is mostly handled through Flask-SQLAlchemy, which isn't much more complicated to get started with, but SQLAlchemy is very open-ceiling in terms of power and utility.

http://flask-sqlalchemy.pocoo.org/2.0/

Miguel Grinberg's tutorial is solid for a broader view of common app features, and will likely cover more than you'll need any time soon.

http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-...

If you want to integrate JavaScript stuff, whether full apps or jQuery or D3.js or what have you, worry about that later - it might not be necessary, but it's fairly easy to bolt on if needed.

---------

JavaScript & CSS assets:

I use Gulp, which is a JavaScript build tool, to build my JavaScript & CSS assets. This isn't something you can pip and done, but it's probably worth the effort if you get to the point of having extensive JavaScript & CSS files. If that sounds like a hassle, use Flask-Assets.

Why? The JavaScript tools for dealing with JavaScript are much less of a hassle, and for whatever reason they also tend to have less fussy CSS asset builders. But this is mostly a "set up the script once & forget about it outside of letting it run" problem, so it's not really a hassle to use in place of native tools.

I really enjoy working with meteor. It's easy to get started and gives you an easy way to bind your UI and data model together easily.
I suggest you to know "Meteor" framework. It provides the complete stack for developing application quickly. The learning curve is also very less. I just evaluated Meteor for a day. I got a very high opinion on the framework. Now I am looking what the framework can offer in-order to develop application with high standards. One additional feature it offers is, you can covert the web application to Android and iOS application as well. Cool...
First I'll make some assumptions about your requirement based on your post, correct me if I am wrong:

a. all the potential web sites in your mind have fairly straight forward server side operations, things like getting data into/out of databases, basic user management, etc.,

b. the front end web pages will have some medium to advanced level graphics/animations/interactive features, and you would like to use JS/CSS/HTML for them,

c. you are going to code both front and back end all by yourself, at least for a while,

d. all of the sites will not have heavy traffic, at least no for quite a long time,

If these are true, then it's best to 1. choose a simple and easy to learn server side framework, so you "can hack together a site in a few hours", 2. and then so you can focus your effort on learning and practice front end technologies(JS/CSS/HTML).

For 1, do yourself a favor, choose a PHP framework (Laravel/Lumen, Silex, Slim, Fat Free, etc.), don't choose python's frameworks just because you know some Python, especially do not choose Django. Definitely not rails (huge monolithic framework, plus a new language Ruby for you); For 2, start with JQuery/Bootstrap, you cannot avoid them, they are everywhere.

You don't actually need the big advantages of Rails/Django (their gazillions of extensions/addons, scalability, feature sets that covers every problems under the sun from one man shop to enterprise-y projects, etc.).

And next time when someone laughs at PHP, just smile, and silently remind yourself that Facebook started with PHP (and PHP is behind majority of all web sites today).