

Ask HN: pros and cons of different web stacks/frameworks - choochootrain

I'm just starting to get into web development, and it looks like theres alot of choices out there. I dont really have an idea in mind, but I just want to start tinkering. I've heard of the LAMP stack,  but I'm leaning more towards Ruby and Rails.<p>Some of the frameworks I've read about and considered are Rails, Sinatra, CakePHP, node.js?, and some others in Erlang, Java, and Lisp.<p>To me, it looks like all these frameworks provide the same functionality, but with different languages, databases, and web servers. Is there some kind of way to choose, or do you just pick one that youre familiar with?
======
mindcrime
_To me, it looks like all these frameworks provide the same functionality, but
with different languages, databases, and web servers._

Basically, yeah.

 _Is there some kind of way to choose, or do you just pick one that youre
familiar with?_

To be honest? There are too many out there, to actually do a thorough analysis
/ review of each, on your own. It'd take you 10 years, and by the time you got
done, it would all be obsolete. So, ultimately, you have to fall back to
_some_ kind of heuristic: recommendations from trusted friends / colleagues /
etc., simple popularity, some "back of the envelope" calculations of some
meaningful metric (availability of developers for that platform, for example),
the aforementioned point of "go with what you know," size and activity level
of the community around each one, ease of learning, etc., etc.

All of that said, I'm a big fan of Groovy on Grails, which I find has a lot
going for it. But there are far more frameworks I haven't used, than ones I
have, so I can't even begin to make a claim that Grails is objectively "the
best" in any sense. In my case, I picked it because I already knew Java, was
familiar with the JVM ecosystem, libraries, app servers, messaging systems,
etc., and because Groovy is very easy to learn if you know Java. The pros I
see for Grails:

1\. Open source (most of them are these days, but still)

2\. Easy to learn (this is relative, since I'm coming from Java)

3\. Rapid development using convention of configuration (same as Rails, etc.)

4\. allows me to leverage a lot of existing knowledge of using Java app
servers, tools, and infrastructure.

5\. Easy use of tons of useful java libraries that already exist. I can easily
incorporate Tika, Lucene, Mahout, HttpClient, Commons Math, etc., etc., etc.

Cons to Grails:

1\. There is some question as to the future of Groovy, since the creator of
the language said something along the lines of "If I'd known about Scala when
I created Groovy, I wouldn't have created Groovy." That said, the Groovy and
Grails community seem to be very active, and I don't see any particular reason
to think either will be dying off anytime soon.

2\. Performance: Groovy has a reputation for being a little bit of a
performance dog, compared to some of the other JVM based languages. But it has
gotten a lot better with recent releases, and there's reason to think that the
JDK7 changes (MethodHandles API, invokedynamic opcode) will make Groovy even
faster.

So there ya go, a few thoughts and comments on Grails. I'd highly recommend at
least giving it a look, especially if you know Java already.

~~~
choochootrain
I actually have a couple years of experience with Java. I'm looking into Ruby
and Python not only because of their popular frameworks, but also because I
feel like I need to broaden my horizons a bit. Do you think its worth learning
Ruby/Python, or does Java/Groovy get the job done?

~~~
mindcrime
I don't really think there's anything you can do in Ruby or Python, that you
fundamentally can't do in Groovy, although certain things might be _easier._
But I do encourage everyone to broaden their horizons, so learning Python
and/or Ruby is definitely not a bad idea. Of the two, I've used Python more
than Ruby, and am fairly fond of it, as non-JVM languages go. Python and
Pylons (well, it used to be called Pylons, I think it's something else now) is
certainly a fine stack for web apps.

------
brandoncordell
I think the best way to choose is narrowing it down to a few potential
frameworks/stacks that you (and your team, if applicable) thinks would be the
best fit for your project. I don't believe any of these frameworks are the one
answer to all your problems.

At work we build an enterprise level government used application in CakePHP.
It's done fairly well, but given the ability to migrate our platform I would
jump at the chance.

We begun trying to practice TDD on the project and it's been nothing but a
nightmare! Whether it's Simpletest or CakePHP's implementation of Simpletest
we haven't figured out (or had the time to dive in and figure it out). We run
into issue after issue. The littlest change to the way our app runs at the
core seems to trigger a shit storm of little issues here and there. Granted, a
lot of this has to do with the architecture that was put in place by the Sr.
developer before I got here, but it's definitely becoming an issue...

Might also be worth noting that CakePHP is a (poor in my opinion) port of
Rails to PHP.

------
megamark16
I'm partial to Python and Django, but in the end I think it comes down to
preference, and what you feel most comfortable with. Honestly, if it were me
I'd find and follow a tutorial for creating a small web app (like a blog) in a
few different frameworks and see which one feels right for you.

There was a discussion a few years ago on HN about this very topic, although
it was mostly focused on Django VS Ruby on Rails, but there is lots of good
discussion in the thread all the same. Here's the link:

<http://news.ycombinator.com/item?id=195423>

Welcome to the web dev community! Come visit us on the Django IRC channel
(webchat.freenode.net, channel #django) if you have any questions about
django.

~~~
choochootrain
thanks! i'll definitely check these out.

