8 ms·
Ask HN: Starting a web project in 2015. What stack to use?
I know these kinds of questions might sound silly to ask, but I really love the diversity of opinions that HN provides and the discussions
To give a bit of context: I am an experienced Ruby on Rails engineer. I really enjoy doing RoR and feel more than comfortable using it.
In the next weeks, I'll be starting a web project (mostly a web app, with some public facing pages, imagine a typical SaaS application). There will be some APIs, an on-premise version might also make it into the roadmap.
The logical and pragmatic choice would be to go with Ruby on Rails but I don't want to get stuck forever with a stack that might become obsolete in the coming years (or not). Also, I live in an area where getting good engineers is VERY difficult and hiring is a factor to consider when choosing the stack.
- ramtatatam 11y agoLook at Pylons Pyramid powered by Python, you can serve it with uWsgi and NginX. http://docs.pylonsproject.org/projects/pyramid/en/latest/ http://docs.pylonsproject.org/projects/pyramid/en/latest/
- codinghabit 11y agoLook at the job ads in your area. Take that into consideration when choosing your stack. If you're looking for an enterprise job I think Java would be a safe bet.
- codegeek 11y agoThink about the following factors when choosing a stack: - How mature is it ? Is it a latest new cool thing or does it have a proven track record? - What is the purpose of your project ? Is it just to learn new things or you actually building a real world busines ? How quickly can you time to market ? This is critical. - What kind of support ecosystem exists for this stack ? Can you easily debug, ask other people and get answers quickly ? I don't think RoR will become obsolete in the world of web in the next few years. If you really love it as you say, then go use it specially if you are building something important to do as a business. But by all means go try something new if you want to learn or try as a hobby. while we are discussing, some of the stuff that I have come across while building a web project in 2015: ### Front End Angular, React, Meteor, Knockout and of course Jquery. ### Back End Laravel/Lumen (for php), Django/Flask (Python), Rails/Sinatra (Ruby), Nodejs
- BjoernKW 11y agoThe question usually is: Business or leisure? If it's for fun trying out something that's as different from the stack you're used to as possible (like Haskell or Lisp, for instance) will allow you to get the most out of the experience like learning new paradigms and gaining a different perspective on your favourite stack as well. As this is for business I'd say stick to what you know. Creating a useful software product that can be marketed successfully is difficult enough as it is. There's no need to complicate the process any further. Regarding hiring: First things first. You won't hire people in the beginning anyway I suppose. So, that's a problem you should consider later on. Besides, development lends itself to working remotely so area isn't really an issue anyway.
- yitchelle 11y agoThis is a great way to think about the problem. Find the answer to what you are trying to deliver, and then that will define your constraints on which stack you can choose.
- CLGrimes 11y agoIf you're comfortable or want to learn a new stack, there are plenty to choose from. If you want to quickly build a web project, hire some engineers, charge for your service - why not build it in RoR? This will save you time troubleshooting and learning the ropes of a new web development framework. Also, you could always hire remote workers if it is difficult to hire locally. See: https://weworkremotely.com/ https://weworkremotely.com/
- roneesh 11y agoI think there can be a few avenues, each worthwhile: 1. Use Rails as a back-end only and commit to a front-end stack like Angular or React+Flux. Rails will continue to be viable for a long time, but even longer as just an easy API server. 2. If you don't know the Node ecosystem, it might be time to dive in. I haven't really enjoyed Express.js, the Sinatra-esque framework for Node, but it can be a good excuse to learn NoSQL db's (though you can use them in Rails as you know) and just increase JS chops. Also if you hire a front-end dev I think it's a tad more likely they'll know Node than Rails. 3. If this is really just to learn, I'd suggest trying other languages, Clojure seems like a great mix of mind-expanding programming along with web ready usage. 4. Meteor.js is a project I'm really interested in. It's 'Rails but for Javascript'. They have funding to stick around for a while, and they have a vision of pushing the web away from stateless API's to an always connected client. This is my answer of what I'd start a new web app in if I had to begin one today.
- microcolonel 11y agoMeteor has been a disaster in production for a couple of projects I've seen, and for reasons that would apply to any meteor project. Basically, atmosphere is pretty but the packages are outdated, broken, or both; the only solution to this is to roll your own packages for every library you use. WRT NoSQL, very few people need the performance benefit(for specific types of applications, specifically ones with non-relational data) of a document or pure KV store; whereas many can benefit from good old tables and joins. Though SQL as a language in my opinion is not pretty: the utility of SQL databases(my favourite being Postgres) is undeniable. I've seen POs choose MongoDB because it's "webscale"(believe me when I say we don't need it), and often enough we end up with a situation where with joins our queries would be trivial, but with MongoDB, the queries are often only feasible at all with aggressive denormalization. Such denormalization is typically error prone, complex, and slow to insert. Node itself is pretty spectacular, if for nothing but the ease with which you can take a synchronous single-node system, and factor it into a distributed system. In most environments this is infeasibly difficult, Rails seems to me like one such environment. Clojure is an interesting and pragmatic language with a whole lot of cutting-edge work in datastructures having leading implementations there. LISPs also have inherent magical powers which I'm sure you've heard explained ad nauseam by a little-known chap called Paul Graham or something, maybe his website Hacker News is written in one.
- rnovak 11y agoI think it depends on what your goals are. So far I've built simple apps in Node.JS (Express, Sails, vanilla JS), Spring Boot (Java), Grails, Django, ASP.NET, PHP, Spring MVC (Java), Perl CGI, C++ The perspective I've come away with is.....MVC is MVC. So far I haven't seen anything from any of these frameworks that is completely different when building a webapp (they're of course different when you're building different types of applications, such as Batch, Three Tier, etc). I found myself worrying about the same things (Input Validation, internal state, database management, Object mapping to the database, and Output serialization) in each case. The optimal choices depended heavily on the characteristics of the input domain and the problem domain. Meaning, for a simple CRUD app, I'd probably use Rails (mainly for their scaffolding), for something that was more event based (like transactions/financial), I'd probably use Java/Spring, for something that was more system level or batch, I'd probably use C/C++ or Perl depending on how numerical/stringy the data is. I'd probably use PHP if I didn't want a bunch of startup time (i.e. if I just wanted to prototype something really quickly), ASP.NET if it was going to be Windows. After picking up a couple of these, I stopped thinking about the solution in terms of the language, but more in terms of the Paradigm. Sorry I couldn't be of more help
- Someone1234 11y agoDid you mean ASP.net MVC? MVC is great, and I'd recommend it if you want to go the Windows route, "legacy" ASP.net? Not so much. Razr puts the old rendering engine to shame, and MVC has received a lot more Microsoft and community love than ASP.net did. But I'm pretty sure it was a typo anyway since you talk about MVC (in general) in the very next paragraph, so I assume you were listing off a lot of MVC frameworks including ASP.net MVC.
- rnovak 11y agoI don't remember many specifics about that to be honest. When I built things in ASP.NET, it was for a Fortune 500 and the deployment environment was primarily windows, so I just remember using C# and remembered the name (ASP), as well as getting introduced to Scott Hanselman's blog, but that was about 4-ish years ago (2011).
- 11y ago
- aikah 11y agoDepends on your requirements. For all the hate RoR gets it's still the fastest way to write a complex application no question.
- ranty 11y agoUse RoR, it's not going anywhere.
- liquidcool 11y agoSince I started dabbling in recruiting, I've been doing rough tracking of job data for a number of technologies/stacks, broken down by region (LA, OC, and SV). When I checked outstanding jobs earlier this month, these were the rankings (most to least jobs): SV: PHP, Java EE, Node.js, RoR, Spring/Hibernate, C#/.NET, Python/Django, Scala/Play, Groovy/Grails LA: PHP, C#/.NET, Java EE, RoR, Spring/Hibernate, Node.js, Python/Django, Scala/Play, Groovy/Grails OC: C#/.NET, PHP, Java EE, Spring/Hibernate, Node.js, RoR, Groovy/Grails, Python/Django, Scala/Play And numbers show that SV has 4-5x jobs of LA, which has 2x jobs of OC. This is all to say that research is critical if you're choosing a technology based on getting a job locally.
- siquick 11y agoConsidering all the bad mouthing that goes on, I'm surprised to see PHP at #1 in SV and LA. Just proves that you need to ignore the haters and go with the language that works for you/your situation. *have used PHP for the last 7 years but now switching over to Python/Flask.
- liquidcool 11y agoI should probably narrow the query a bit (I'm using a job board aggregator), but there are a number of startups built on PHP, most notably Facebook. Yahoo uses it in places, and don't forget all the companies who need a WordPress, Magento, Drupal, etc. developer. These technologies run multi-million dollar businesses. And after years of consulting, I can tell you business owners don't care what's under the hood if it solves their problem with good ROI.
- alasdair_ 11y agoWhere you checked the outstanding jobs matters as well - something like Monster.com likely has a different group of companies using it that other sources. Also, don't FB and Google (and other firms) mostly have their own recruiters?
- 11y ago
- bbcbasic 11y agoDepends on what the project is for. Is it a personal hobby project? Then maybe it is a chance to try a new stack. I'd recommend something with a more statically typed language than Ruby so you can get some experience in that. Java and C# are your mild choices. Haskell would be more hardcore. If it is for money or there is a deadline then stick to what you know.
- amarsahinovic 11y agoFirst, I don't think that Rails (and similar) will become obsolete in a few years. Personally, if it's a serious project, I would go with the stack you know the best. Now, if you're willing to learn something new, I would recommend that you try Phoenix http://phoenixframework.org/ http://phoenixframework.org/. It similar to Rails in structure, and Elixir (built on top of Erlang VM) is also similar to Ruby (syntax-wise). Some helpful resources: https://github.com/h4cc/awesome-elixir https://github.com/h4cc/awesome-elixir http://elixirsips.com/ http://elixirsips.com/
- hhandoko 11y ago+1 vote for Elixir. I am learning it at the moment. Enjoyed the Ruby (syntax) with some functional programming capability, but the biggest selling point for me was the fact that it runs on the Erlang VM. PS. Don't forget: http://exercism.io/languages/elixir http://exercism.io/languages/elixir
- Daishiman 11y agoElixir seems like a great language, but its library story is still lacking a lot of things to make for a fast web development. This will probably change in the next couple years, however.
- cweagans 11y agoI'm probably going to get downvoted for this, but whatever. This is a very easy decision. If you're an experienced Rails developer, use Rails. If you're an experienced Perl developer, use Perl. If you're an experienced PHP developer, use PHP. etc. The tools don't matter so much. Your experience level with them does. Don't use something you're unfamiliar with in production just for the sake of using the new hotness. That's dumb. That's not to say, of course, that you should never use anything new. Learn new things, and learn often. Play with new technologies and languages on your own time and get some proficiency with them before using them for a client in a production setting.
- raquo 11y agoCounterpoint: the stack you choose initially will often follow you for years because switching costs are rising with every line of code and every developer on the payroll. Personally I often go for a less familiar but more appropriate stack.
- hhandoko 11y agoI agree. I'd also like to add that as long as architectural best practices are followed, the switching costs and risk can be minimised.
- cweagans 11y agoYou can write bad code with a good stack, and you can write good code with a bad stack. Put another way, a pro football player will be pretty good with whatever he uses, but even if I had the exact same gear, I'd never get picked for even a high school team. It's about the person, not the tools.
- raquo 11y agoAbsolutely, but for non-experimental stacks good practices are well understood and are easy to pick up, especially if you don't focus your career on the one true stack. For 99% of the projects you don't need to know any stack at level 80. You're much better off having a more diverse experience. Most skills beyond intermediate level – defensive coding, good architecture, managing complexity, etc. – translate very well to other stacks.
- getdavidhiggins 11y ago> hiring is a factor to consider when choosing the stack Personally I would not let hiring determine what stack you use. In the end if it gets the job done, is tested, commented, and can be proudly passed on to other engineers, then it is suitable. One more thing I found with 'stacks' is they are not as solid as they seem, and can be swapped out with other ones, but only as needed. It is common to switch between multiple stacks throught the day. "Doing everything one step at a time, in parallel" as they say.
- collyw 11y agoDepends what you are doing and where you are going. A friend of mine had a startup company a couple of years ago. He chose the language - Python, next choice was Java, and next was C I think (to me the differences his choice of languages shows a lack of understanding in the trade offs between each). As he was non technical, I assume he just listened to other bioinformaticans telling him what was great. Anyway, he got a product produced (Python and Django / JavaScript front end) and had the option of a German grant to keep the project going. The amount of money offered was fine for someone out of University, but wasn't enough for an experienced dev. Anyway, despite using a solid choice of language / framework, he couldn't find a dev to continue the project. My guess is that if he had chosen PHP, he the project would have continued.
- getdavidhiggins 11y agoYeah but programming languages are an abstraction layer on top of already existing architectures which are not going away any time soon. X86, ARM, etc. So as long as code can talk to low level hardware and get executed, it doesn't really matter what you language you're using. I can understand the need to have others pick up from where you left off, but that's introducing politics into programming, and more oft than not, it confuses what you're trying to achieve (which is converting some form of input to output I hope) As a first port of call, it would be preferable to know one low level language like C, and a scripting / CRUD language like PHP/JS, as a lot of application development now is web based. Bonus points for learning ASM as that's as low level as we can get. (Unless you work in an Intel chip facility and are not allowed tell people what you're working on).
- d_luaz 11y agoCheckout StackBus (http://www.stackbus.com/ http://www.stackbus.com/), where people and company share why they choose their stacks and what they use it for :)
- barhum 11y agoWhy don't you try out Meteor? I found it really easy to work with. You could probably go through the whole book tutorial (discovermeteor.com) in 20 hours. If you don't end up using it on production; it might help you with faster prototyping.
- johan_larson 11y agoUnless there are any unusual requirements, if I were starting a web project today I would use these technologies: - Angular/Bootstrap on the front end - Java/Spring Boot on the server - PostgreSQL on the data tier - deploy on AWS All of these are distinctly conservative choices at this point, but using tried-and-true technologies has real advantages. They raise no red flags with bosses or prospective investors. They are well supported and will be for a long time. And it is easy to find knowledgeable people if you need to scale up staff. Since you are a Rails guy, you might want to substitute Rails for Spring Boot. It's a respected system, and you already know it. Win. If I had the latitude to take one risk in choosing the tech stack, I would swap out the Java/Spring Boot for Haskell/Yesod, since I grow increasingly frustrated with Java's verbosity. But this choice definitely has downsides: I know Java _much_ better than Haskell, and Haskell is rare enough that if I needed more than a couple of developers, I'd need to either hire them remotely or develop them from scratch. Similarly, you might want to take a chance on one off-beat component if it catches your eye. But just one.
- Daishiman 11y agoI would really hold off on Angular. The development path of that project seems to indicate a dead end. And as far as technologies go for a new project that's supposed to start quickly, it has some tremendously complex abstractions while having issues with debugging. This is all a pet peeve of mine, but I think the kind of two-way data binding that Angular proposes will be seen in the long run as a mistake. The fact that you can't just understand what's going on behind the hood without reading tons of documentation in the middle is very troublesome.
- deathtrader666 11y ago+1 I'd run away from Angular, into Ember-land!
- johan_larson 11y agoDead end? What makes you say that?
- anubhav_maity 11y agoYou can try Bootstrap and Reactjs for the frontend. And for the backend - express and node. For database try nosql like mongodb. It will be altogether a different stack from what you are working now. But it will be a good learning experience.
- Daishiman 11y agoThere is no reason to use a NoSQL database on a new project (especially one as hideous as Mongo) unless the problem space is so domain-specific that it merits it.
- Firegarden 11y agoI am going out on a limb and say for all things backend use C#. Mainly because in general the language, IDE, community support is by far the best. Yeah said it - and it's true so if you think Java or PHP or anything else is overall better your way wrong so fuck you. Oh and it's now open source and runs on Linux. Unfortunately its not a as cool as ROR, LAMP etc. It's simply better, more mature more stable, quicker etc. There is a major subtle war going on where asp.net mvc and c# are just not included in the start up tech stack discussions which is ridiculous. asp mvc has the best Web API infrastructure supporting RESTful / hypermedia API's. It has amazing WebSockets support. I could go on but who is even reading this far? Perhaps just me.
- hhandoko 11y agoC# + ASP.NET is great, but have you considered ServiceStack? It is not free, but I think it's a much better option than Web API for RESTful services. However, that being said, I still prefer the JVM ecosystem over .NET. You're simply spoiled for choice. I've been working on a Scala (Play! Framework) web app and I thoroughly enjoy the flexibility of the Scala language.
- collyw 11y agoAs a Django user, I have noticed a few comments on here and elsewhere where people have switched away from ASP and moved to Django, and seemed pleased with that choice. http://kurtgrandis.com/blog/2010/02/24/python-django-vs-c-asp-net-productivity-showdown/ http://kurtgrandis.com/blog/2010/02/24/python-django-vs-c-as...
- imauld 11y agoIf I were in your shoes I would be reaching for Django/Flask (depending on how complex of an app I was making) for the backend and either server rendered pages or Ember.JS on the front end. YMMV of course but you get a lot out of the box with Django and if you don't need everything Django comes with (A user system, A large ORM, authentication etc) Flask is a more lightweight solution that can be extended pretty easily. There is a large community for both and any Python dev will know at least one of them at least fairly well. That being, the main reason I would go with that stack is because that is what I know. If you are doing something that entail some "real time"-iness or push notifications that's not really one of Python's strong points. So ultimately you should choose the best tool for the job. The "best" tool should be a workable combination of what you are able to use easily and will get what you want done without having to write a ton of supporting code. TL;DR: Choose the best tool. The best tool will be something you can already use or learn in a fairly easy manner and also lends itself well to the task you are trying to accomplish.
- obayesshelton 11y agoI had the privilege of meeting the Director of Technology of github the other week in Newcastle and he kept getting asked a similar question and his response every time was to use tried and tested tools, languages and frameworks. Not the latest flashy things. From my experience use the things that have been around for a while and have a good community / documentation around them.
- LarryMade2 11y agoI would ask myself "what in this project would rails fall short on? or what language has been known to do a better job, and don't think Ruby/Rails can do it?" If there’s nothing compelling you to use something else, its up to you. but if you see something that Language Y could do over language X for this project, then that might be the indicator of which way to go. I do PHP work, currently I don’t feel I'm limited with the tools I've chosen for what I have in mind. If I did I'd certainly look to see where I've heard there is more opportunity. If you have the opportunity, pick the tools that would work for you and learn how to use them well.
- ulisesrmzroche 11y agoUse Rails as your API layer and pick a front end framework. That way you get to expand into a new stack while keeping one foot in Rails. I think in the rails community, Rails + Ember is a common combo, followed by Angular, though React has more momentum right now.