top | item 447166

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

43 points| skanev | 17 years ago | reply

What web framework(s) do you guys (and girls) use? And why not their competitors?

141 comments

order
[+] amix|17 years ago|reply
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" :)

[+] igorgue|17 years ago|reply
Django, because it has magical powers, who can beat that?
[+] xenophanes|17 years ago|reply
A design goal of Rails 3 is to have less magic than Rails 2. I think that's a good change. Less magic please.
[+] truebosko|17 years ago|reply
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
[+] siong1987|17 years ago|reply
Rails. Anyway, I am not saying that Rails is better. I am just wondering how magical Django is?
[+] fauigerzigerk|17 years ago|reply
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.

[+] hbien|17 years ago|reply
Django works for me, too. Doesn't generate a whole bunch of folders and files. Feels lightweight but works for big projects too.
[+] bmelton|17 years ago|reply
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.

[+] tptacek|17 years ago|reply
Rails, because I lost the Python vs. Ruby argument, and now we're all converts.
[+] shutter|17 years ago|reply
[+] shadytrees|17 years ago|reply
Seconding. The ability to use SQLAlchemy and Jinja2 is fantastic; I personally think they're better than Django's ORM and templating system.
[+] cnu|17 years ago|reply
Me too. Was previously using Turbogears.
[+] abdulhaq|17 years ago|reply
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.

[+] BinaryPie|17 years ago|reply
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.

[+] andrewljohnson|17 years ago|reply
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.
[+] edb|17 years ago|reply
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".

[+] KrisJordan|17 years ago|reply
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
[+] xtimesninety|17 years ago|reply
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.
[+] noodle|17 years ago|reply
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.

[+] SpencerDavis|17 years ago|reply
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/

[+] lsb|17 years ago|reply
Ruby + Sinatra for now. It's great for tiny services that work together.

A full web service to implement '/add/1/2' is just

require 'sinatra'; get('/add/:a/:b') { params[:a].to_i + params[:b].to_i }

[+] boucher|17 years ago|reply
Sinatra is definitely an interesting project. We recently "ported" it to JavaScript:

http://github.com/tlrobinson/jack/blob/030685ef3de4c29c38b4e...

The same webservice would be:

    roundabout.route({ path:"/add/{a}/{b}", get: function(){this.body = this.wildcards["a"] + this.wildcards["b"];} })
or, alternatively:

    roundabout.get("/add/{a}/{b}", function(){ this.body = this.wildcards.a + this.wildcards.b; });
The first syntax is a tad longer, but its much more useful; you can define any method with the name of an HTTP verb for that path, and you can also define a filter parameter that will be queried before the path is matched. The filter lets you do whatever pre-processing you want, so you could filter out requests from a specific user-agent for example, or all URLs that use mixed case, or anything else you can think of.
[+] rickharrison|17 years ago|reply
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.

[+] thorax|17 years ago|reply
Code Igniter is solid.
[+] aschobel|17 years ago|reply
Struts2. Very lightweight and its gets out of your way.

Since it is Java we get to leverage some of the incredible Java libraries out there like Guice.

We've tried a few other frameworks. We build our prototype in web.py. Very simple, but I couldn't get used to not living in IntelliJ.

We tried a previous project in Rails, but it did too much 'magic' for us and the scaffolding seemed a bit too brittle.

To be fair the last time I used Rails in production was in the 1.1 days, so it's been a while.

[+] moder|17 years ago|reply
Where are all these Java libraries? Do you mean Java's standard library?

I ask because, Perl has the CPAN, Python has PyPI, Ruby has RubyGems, etc., but what does Java have?

[+] cookiecaper|17 years ago|reply
Pylons when I use Python - magic sucks, very easy to customize, fast turnaround and not so gargantuan that it takes forever to wrap your head around.

CakePHP for PHP. Definitely the best PHP framework out there, in my opinion; fast, good installed base made out of all-star clients (Mozilla, Yale, others), not restrictive or cumbersome. Honestly, though, I try not to use PHP.

[+] debt|17 years ago|reply
Django on AppEngine. Really fast turnaround and scaling is all taken care of(or will be).
[+] dmpayton|17 years ago|reply
I use Django when I need full-stack and CherryPy when I need something lighter. I've also used web.py.
[+] pwoods|17 years ago|reply
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!

[+] apu|17 years ago|reply
[+] moder|17 years ago|reply
Is webpy the Python equivalent of Perl's CGI::Application? Because I've used C::A in the past and liked its simplicity.
[+] wmorein|17 years ago|reply
This is what I use as well. I'm surprised there aren't more users here.
[+] ezmobius|17 years ago|reply
rack, merb, sinatra and rails