
Ask HN: Django, Rails or Node.js for a SaaS web application? - nullflow
I&#x27;m a junior-level Java programmer (and CS student) with some SaaS ideas for the Danish market.<p>I have no experience in web development beyond some HTML&#x2F;CSS (+ Bootstrap) and some JavaScript.<p>Which web framework is ideal for developing SaaS applications like Basecamp and Harvest?
======
hkarthik
Basecamp and Harvest were both written in Rails. For standing up simple SaaS,
Rails is a great choice.

However, for a complex SaaS (any SaaS can get here really), you will need to
make some sane choices around modularity and building separate, loosely
coupled services before things get out of hand. Node.js (or any of its
lightweight frameworks on top) is probably a little stronger than Rails in
this regard.

This service-based approach is more difficult with Rails as the community
hasn't blessed any consistent conventions around doing it. Any custom
convention you create to integrate multiple Rails applications will likely
break compatibility with future Rails framework upgrades. There are many
companies that are paralyzed and stuck on older versions of Rails because they
ran into this problem.

All that being said, Java is still a great choice if you make some modern
choices and will help you move forward without being slowed down by learning a
new framework. Check out the Modern Java Series here:
[http://blog.paralleluniverse.co/2014/05/01/modern-
java/](http://blog.paralleluniverse.co/2014/05/01/modern-java/)

~~~
rubiquity
> _However, for a complex SaaS (any SaaS can get here really), you will need
> to make some sane choices around modularity and building separate, loosely
> coupled services before things get out of hand. Node.js (or any of its
> lightweight frameworks on top) is probably a little stronger than Rails in
> this regard._

Huh? This is a load of crap. Frameworks, and even languages, have nothing to
do with modularity and building services. You can do this in any language and
any framework. Modularity and loose coupling are decided by the developer(s)
writing the code and if you think a particular tool will solve this for you
then you have a grave future.

~~~
bnb
I don't think it's right for you to call what he said crap without backing it
up with any evidence. Node.js is essentially the modern poster child of
modularity. JavaScript doesn't have inherent modularity--but the devs of Node
have made some choices that make it possible to have an extensive module
ecosystem for Node. npm is probably one of the best package managers for
development right now, as it comes with one of the most popular platforms and
is inherently flexible.

~~~
rubiquity
Package managers have _nothing_ to do with modularity. You're confusing
modules, a thing, with modularity, a property. How you write and design your
systems is how you get (and don't get) modularity, not by having a service you
upload and download packaged code to.

Again, modularity has nothing to do with the quality of your package manager.

------
trcollinson
Full disclosure: I have been around a while and have written in more languages
than I care to even share at the moment. Right now my go to is Ruby with
Rails. However, since you say you are a junior level engineer with Java
experience, why not stick with Java? Recently there was a great article on HN
about using Java for Everything and it made some very good and logical
arguments for going with Java. [1][2]

We see questions like this on HN quite often. When starting a new project that
you would like to support yourself on, you must ask "Would I like to make a
successful SaaS product?" or "Would I like to learn a new
language/framework/ecosystem?". I am sure some would argue that the
language/framework/ecosystem can really make or break a web application.
However, there are successful business built on just about all of them:

Stackoverflow - .Net

Facebook - PHP

Amazon - Java

Bloomberg - Ruby (could have said Twitter until recently they are migrating to
Java, interesting?)

Reddit - Python

DuckDuckGo - Perl

Orbitz - Lisp

OkCupid - C++

Of course many of these organizations use a number of languages and
frameworks. The point is, when they started they used what they knew and went
with it. My suggestion, start building! Then someday I can use your super
successful application in a list like this!

[1]
[https://news.ycombinator.com/item?id=8677556](https://news.ycombinator.com/item?id=8677556)
[2] [http://www.teamten.com/lawrence/writings/java-for-
everything...](http://www.teamten.com/lawrence/writings/java-for-
everything.html)

------
joeclark77
I'd like to cast a vote for Flask, another Python-based framework which aims
to be more lightweight than Django. I'm sure Django has nice features, but as
a newbie to MVC frameworks, I like using a minimalistic tool that lets me
learn what's going on.

On the other hand, I recently learned that _Perl_ is making a comeback with a
couple of popular web frameworks. I haven't programmed in Perl since the last
century, but I remember it being a fun language!

------
davelnewton
Ultimately it doesn't matter, but.

"Node" is not a web framework. There _are_ web frameworks _for_ it, with
varying degrees of completeness. There are lots of moving parts.

Rails is a (more or less) complete ecosystem. There are lots of moving parts.

Django I don't know enough about to speak in any meaningful way. Python-the-
language is fine.

Ruby and Python OO will be more familiar to you than JavaScript's version.

You may want to do a client-based app; this means JavaScript. Go ahead and
learn that now--it will serve you well, regardless of what you use on the
client side. On the server side you have essentially unlimited choices,
including Java. Serving JSON is fairly easy in any language.

There are a bunch of other issues to consider as well, like data storage,
deployment, etc.

------
nmjohn
All three are viable candidates - however because it appears to me like you
are trying to learn more about web development, I'm going to suggest node.js,
because like it or not, when it comes to the browser, javascript is your only
choice for the foreseeable future.

This way you don't have to expend any extra energy on the cognitive overhead
of switching between languages when you switch from writing something in the
client side app and then something on the server side. To be fair to the other
languages, I don't think this is a huge issue in day-to-day development, but
from my experience is was an enormous issue when I was trying to learn a new
language and I actually had to think about the syntax I was writing.

My biggest suggestion though is not to do it in java and instead expand your
horizons - if I plotted my strength of a developer against time on a graph
there would be long flat sections interspersed with sharp upward inclines.
Those inclines? For the most part, short periods of time when I started
working on learning to program in a new language.

------
mattwritescode
This question is asked a lot. Basically choose the language first then worry
about the framework.

There is no magic bullet so use the programming language which you can code
the best, faster, easiest in. Framework is second.

Django, Rails, <insert php framework here> all do the same thing. 90% of the
time you are going to be fighting fires, so develop in the language you like.

* You are a java developer why not use a java framework?

~~~
collyw
I would suggest the opposite. Learning a new language will do you good. I use
Django, because the documentation was really good for my level of experience
(I had tried couple of Perl frameworks before, but never got my head around
them - Django was explained a lot better). Now I know Python - its not hard to
learn, and once you know some idioms its way more expressive than Java. Scala
might be a good option. Then you use the same ecosystem, but learn a more
expressive language.

~~~
mattwritescode
Yes learning is good but if her/him is looking to build something fast and get
the job done learning a new language whilst doing this is not really very
feasible.

There is the time for development and the time for learning.

~~~
collyw
I personally found that moving from Perl to Python, I gained a lot, despite
taking on a new language. Django was way better documented (for relative
newcomers to web programming) than the Perl options I tried, and the Admin
application got me up and running with something usable pretty quickly.

------
matt_s
I was a Senior level Java developer and I would suggest Rails. It has the
object oriented-ness you are familiar with from Java and a rich set of
libraries (gems) as well as a lot of documentation online (railscasts).

SaaS is essentially a CRUD application serving some specific need - Rails is
good about letting you focus on what your are building (e.g. the house) and
not spending enormous time on infrastructure (e.g. plumbing, wiring, etc.)

Edit: I agree with mattwritescode: it doesn't much matter which one you choose
since they all will work. From my experience with Java though, you could spend
a lot of time just getting infrastructure working - framework, JDBC, etc.
Rails will have that out of the box (maybe Django too)

------
akrymski
JavaScript is most future-proof. Given that it runs in browsers, servers
(Node.js) and mobiles (PhoneGap) I strongly suggest learning the Node ways, as
you may find yourself using Backbone/Angular/etc on the client and in-depth
knowledge of JS will help. In this day and age you're probably building a
single page web app, in which case 99% of your code will run in the browser.

~~~
rubiquity
> _JavaScript is most future-proof._

What does "future-proof" even mean in this context?

> _In this day and age you 're probably building a single page web app_

Uh.. no. A tiny percentage of new web applications are single page
applications and of those most of them don't need to be single page
applications. The web would be a much better place if people thought in terms
of "What functionality does this web application need?" instead of "Does this
application need to be a single page application?"

------
alasdair_
I'd suggest mastering Java before moving on to another language. Every
language has issue and none of them are 10x better than the others. Mastery
will help you more than learning three languages to a novice level.

If you choose to do Java, I am a big fan of Google App Engine because it
forces you to write scalable code from the beginning.

------
hackerboos
I'd choose rails and pick up a copy of Ryan Bigg's book -
[https://leanpub.com/multi-tenancy-rails](https://leanpub.com/multi-tenancy-
rails)

Django is also a fine choice but Django lacks learning resources. I mean
seriously, why aren't you Django guys writing books and recording screencasts?

------
cjbprime
They're all ideal -- that's why they're all very popular frameworks. Every day
a new company picks one of the three, and whether it succeeds is extremely
unlikely to have anything to do with that choice. So just pick the one you
feel most drawn to, seems to have the best documentation, etc.

------
collyw
I use Django. It's admin application is excellent for getting a basic HTML
CRUD app working quickly. There are probably equivalents for other frameworks,
but if that's something you might need, its a seriously useful and productive
feature.

------
kyllo
Well since you mention Basecamp, that is the original Ruby on Rails app. Rails
was factored out from the Basecamp codebase for reuse on other projects. So if
you want to make an app "like Basecamp" then you probably want to use Rails.

------
vishalzone2002
since you are a java developer. I did suggest play framework. It is very well
documented and pretty easy to use.

------
piratebroadcast
Rails.

~~~
saluki
Rails (ruby) or Laravel (PHP)

Both are great frameworks for SaaS

[http://Railscasts.com](http://Railscasts.com)

[http://Laracasts.com](http://Laracasts.com)

