10 ms·
Ask HN: Which web stack should I learn for personal projects?
Context: I'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.
To build a full-stack web product (optimized for productivity and ease of implementation on my end), which tech should I learn?
Things I've looked into but have not committed to: Iris framework built on Go, React for front-end.
Thanks in advance!
- theandrewbailey 10y agoIf 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.
- nsebban 10y agoServer-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.
- TechHawk 10y agoWelcome 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 10y agoI 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.
- jmstfv 10y agoCheck 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 10y agoI'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 10y agolooks good, thanks for posting
- mixedCase 10y agoSome information you should probably be aware of when it comes to Iris: http://www.florinpatan.ro/2016/10/why-you-should-not-use-iris-for-your-go.html http://www.florinpatan.ro/2016/10/why-you-should-not-use-iri...
- sisedi 10y agoThanks for this, close call.
- iends 10y agoDon't use Iris: http://www.florinpatan.ro/2016/10/why-you-should-not-use-iris-for-your-go.html http://www.florinpatan.ro/2016/10/why-you-should-not-use-iri...
- sisedi 10y agoThanks for the heads up
- archbloom 10y agoRuby on Rails for backend and Backbonejs, marionettejs for front end.
- arisAlexis 10y agoGood for 2012 :)
- sisedi 10y agoXD
- iyn 10y agoThis 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.
- tedyoung 10y agoSince 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.md#web-appapi-frameworks https://github.com/tedyoung/awesome-java8/blob/master/README.... 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/).
- Bjorkbat 10y agoSo, 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.
- sisedi 10y agoThanks for the detailed reply :) I'm a little iffy with Rails myself.
- nickmerwin 10y agoHere's a great Rails learning resource: https://www.railstutorial.org https://www.railstutorial.org
- clifanatic 10y agoIf you do buy it, though, read it quick. I picked up a copy a few years back and finally got around to reading it after about 6 months or so... only to find that it already was so out-of-date that I couldn't follow along with any of the examples.
- endisukaj 10y agoHow 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.
- micaksica 10y agoEase of implementation? Just grab any modern Rails and pick a frontend framework later.
- sisedi 10y agoI worked with Rails briefly in my previous company and found a working product nearly unmanageable. Any tips on keeping the codebase legible?
- micaksica 10y agoDefine 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.
- tarellel 10y agoAs @micaksica has said Rails is generally a pretty good framework and I've build and contributed to several projects myself and most of them I've never had any problems with. If the developers put the projects together properly, it should have been very legible and easy to jump in on. Ruby isn't exactly a hard language to learn and generally very legible, almost to the point where each function/statement should be close to reading plain English (other than regexp and a few other things). That is, if the developers are following best practices, separation of roles, and not trying to hack together various work arounds because they don't know the language.
- OhSoHumble 10y agoSpring 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.
- s_m 10y agoI would suggest you use Node. It is nice not to have to switch mental contexts when switching between backend and frontend code.
- ilaksh 10y agoI 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 10y ago+1 for Nim - being able to write both server and client side in the same (excellent) language is very nice.
- dvdhnt 10y agoNode 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 10y agoAny stack. Pick one and build something. Ship it. Remember, real artists ship.
- sisedi 10y agoHah, some eternal truth right here.
- miguelrochefort 10y agoC# + ASP.NET MVC + Typescript
- sisedi 10y agoThe first .NET recommendation! I was waiting for this one. :D
- silvaben 10y agoYou 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 10y agoThank you! Phoenix is definitely bouncing around over here and I'd heard about it before this Ask as well.
- facorreia 10y agoSince 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 10y agoThank 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
- katienreed 10y agowww.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.
- sisedi 10y ago== 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.
- tugberkk 10y agoIf 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.