Ask HN: What web framework(s) do you guys use?

43 points by skanev ↗ HN
What web framework(s) do you guys (and girls) use? And why not their competitors?

141 comments

[ 95.0 ms ] story [ 612 ms ] thread
codeigniter and rails.

rails because, well, its rails. building something out is typically quick and easy.

codeigniter for those cases when i need to get my hands dirty on a lower level and do some non-standard things. its a minimalist framework that doesn't add much bloat, overhead or other things in your way.

i kind of mentally compare it to java and c.

codeigniter and more recently kohana.

I like codeigniter a lot because you have more control over things. Frameworks that get things done extremely fast are nice, but I like to have more control over things. And Kohana was modeled after codeigniter, but in completely PHP5, which is why I like it the most.

Code Igniter is solid.
If you do it yourself, does it count as a framework?

Server: python, postgresql, cherrypy, simplejson

Client: Javascript, HTML, CSS, Dojo, AJAX.

All the HTML is loaded up front and then AJAX for all the rest. Dojo insulates me from browser quirks. TDD Python is what I use at work (and love) and is good for complex algorithms (language morphology, in arabic).

I don't use an all-encompassing framework because I need total UTF-8 support and I feel more comfortable with the general tailorability of the lower-level libraries over the likes of Django, Rails.

I use Django, but only for template inheritance and models - I pretty much leave the template language alone. 99% of the data from the server gets passed out as json.
I'll never understand why people use DoJo.

Its greatest strength are all the "widgets" i guess you'd call them. However they are all not created equal. Some are well polished and deliver acceptable performance levels and other times they are just demos and hacks.

The Dojo examples page always froze my browser. Even after switching computers and operating systems, it would hang for a while. I never did figure out if it was just me or nobody else seemed to notice.
I noticed too :)

Just wondering why Zend chose it as their main ajax framework.

Spring WebFlow did too. It boggles the mind.
What do you recommend, in terms of widgets?
Drupal.
Drupal all the way or combine with Cake or CI
I'm not conversant with Cake or CI so I couldn't comment intelligently here.
rack, merb, sinatra and rails
Django, because it has magical powers, who can beat that?
Rails. Anyway, I am not saying that Rails is better. I am just wondering how magical Django is?
Nothing girly about a horse. Nothing girly about a horn. Put them together, you have a unicorn.
Nothing horsey about a girl. Nothing horny about a girl. Put them together, you're horsing around with a horny girl.
Hah! Thanks for the new background!
I used to be pretty big into Zend. I didn't like ActiveRecord in Ruby, or it always felt too confining, and liked the additional control over my models that Zend gave me.

I've recently become a Django convert (not for the pony, that was new to me just now) because the framework just works. I haven't quite worked out the magic required to stand up a Django/MySQL/Apache/Mod_Python server on Windows yet, but it's working perfectly in my VM, so I haven't pursued it very far yet.

Django works for me, too. Doesn't generate a whole bunch of folders and files. Feels lightweight but works for big projects too.
A design goal of Rails 3 is to have less magic than Rails 2. I think that's a good change. Less magic please.
Django, because it doesn't have so much of that special magic. That's why I like it, it works and you know why and how it works. I have no idea if that makes sense. shrug
I like Python and I like the way Django does controllers (not so much the template engine though). But I cannot use Django or any Python, Ruby or PHP setup in my current project because I'm keeping a lot of data in memory and that doesn't work with multi-process architectures.

So I'm using a very small dispatcher Servlet to pass JSON messages on to POJOS and do all the templating in the browser using jquery.

I'm bored to death (and rather annoyed) by Java so I'm always looking for alternatives that support my architecture.

Grails?
Groovy has no library. It's basically an alternative syntax for Java. I like the way many of Python's libraries work (even though they are incredibly inconsistent)
Rails, because I lost the Python vs. Ruby argument, and now we're all converts.
I'm in Python. I'm happiest just doing import cgi ...

I always feel guilty though.

If import cgi works for you, it's great. I love simplicity.
Top Down Programming BABY!

Seriously, just install smarty and do it yourself. Then somebody can always do a basic edit to the templates and you don't have to weight the merits of the 10000X different frameworks against eachother and get back to Making Money!

I'm a cakePHP user. It has gotten and keeps getting a lot better as of recent, and I really like the community. I looked into codeigniter after using cakephp for a while and it just seemed to have a lot less to offer. I tried symfony too and it seemed alot more complex, unnecessarily so.

I'm currently dabbling in Rails and Django, but am going to put them down until I finish my current project, since there's nothing in either that I can't do in cake, as far as my project's requirements go.

These are also a lot less portable than the PHP frameworks, which I find is a big deal if ever you want to lengthen your runway with client work. It's MUCH harder to get a quick 2-5k on a small webpage when the client hears "change hosting".

CakePHP for me too. I also use Zend Framework. I like both. CakePHP is great for it's simplicity, but if their conventions don't work for you try out Zend Framework.
I've been working on a PHP framework that is similar in the 'full-stack' approach of Cake but has performance characteristics of CodeIgniter. It's called Recess and can be found over at http://www.RecessFramework.org
Write your own!
Sure, maybe if you've never done it before because it's a learning experience, but it's a patently horrible idea otherwise.
It isn't a horrible idea. Using a ready made framework all the time without regard if it's right for the job is a horrible idea.

For some apps which have a certain level of complexity and require some extra flexibility, you end up wasting more time fighting the framework than getting the job done.

It helps if you have a well defined standard in place, for python, that means WSGI. Coupled with good libraries, it's hard to beat.

Right, but that's not "writing a framework", it's "using existing libraries in conjunction with one another". There's no real "magic", directory layout rules, etc.

Maybe you end up writing a couple scripts to tie them together or something, but it's hardly a framework. And in many cases, yes, it is a better choice than a framework. And still a better choice than writing your own framework.

So that means frameworks shouldn't exist at all in your opinion?
Erm, that's my opposite opinion, I guess. My (attempted) argument is that one should not write their own framework unless doing so as an exercise in learning. In any other case, using existing frameworks or using the "roll your own library mix tape" strategy is far more efficient.

Basically, I'm saying if you're using a language which has mature frameworks and/or mature libraries which could be forged into an ad-hoc framework (templating, serving, ORM, etc.) it is terrible advise to tell people "just write your own".

Only in the case that you've considered all existing (relevant) options and determined none of them meet your use case (and none can be minimally altered to do so) should you consider writing your own. Anything else is a waste of time and effort.

Right, your new rule is, write you own framework/library if necessary, otherwise use what's there. That's much better than your original rule which ruled out any use of frameworks as no frameworks could ever have been created.

But Im' still not happy :) I'm sure a lot of popular frameworks were created without any necessity, simply because they were fun to make. Some turned out to have qualities that nobody (including its creator) would have been able to spell out beforehand.

Django. It was a toss up for me between Django and Rails but at the time, the updated Rails book was not out yet and the Django book was.

And Django has a magic pony. http://djangopony.com/

WebObjects. I don't like Java, or Eclipse, which makes it an odd choice, but it was Rails before Rails, and still has a lot of advantages over it. The ORM works hand-in-hand with the framework to do proper persistence, and while I rage against the tools sometimes, they're still better than being dumped back at a texteditor.

If only Apple would give it some more love, it'd be killer.

WebObjects for me too :-) And I also don't like Java or Eclipse. But at least with DirectToWeb one can keep the Java code to a minimum.
I write my own mostly-modular parts. It isn't as flexible as I'd like it to be, but it does what I need it to do.
Java, so I prefer Wicket and like Stripes.
+1 for wicket.

Used wicket for a while on xp-dev.com, but moved to a home grown one as wicket was a tad bit too bloated.

But I really like how wicket is component based, and have used it successfully for other project (all intranet based ones though - so don't really have many publicly accessible examples)

+1 for Stripes. It's like WebWork/Struts 2 without the XML configuration headaches.
When using Java, I prefer Stripes. For a new project I would definately use Python and Django.
compojure - best option in Clojure so far.
Seconding. The ability to use SQLAlchemy and Jinja2 is fantastic; I personally think they're better than Django's ORM and templating system.
Me too. Was previously using Turbogears.
In the recent years I have built my own, mostly basing it on other libraries and reusing as many things as possible.

In Python there's something called WSGI (Web Server Gateway Interface) which makes it trivial to implement your own framework. Around 2 years ago I wrote a blog post about WSGI and how to quickly build a Python framework http://amix.dk/blog/viewEntry/105 In the recent years WSGI has grown a lot. Check out wsgi.org for more info.

One can learn a lot of things by making and using own stuff, but it can also be very frustrating (because of bugs and lack of resources). But generally, I like to use own my stuff and my own conventions - I know at least who to blame when some stuff does not work or something is "ugly" :)

CGI::Application in Perl. Just to be contrary. Well, not really. I still love Perl. Nothing wrong with the alternatives... it's just what I like.
I use Django when I need full-stack and CherryPy when I need something lighter. I've also used web.py.