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" :)
(Also, read the comments for more fun)
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.
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.
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.
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.
Just wondering why Zend chose it as their main ajax framework.
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".
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.
And Django has a magic pony. http://djangopony.com/
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 }
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.One of the main benefits is letting us run objective-j and cappuccino on the server, letting us share application data models in the client and the server.
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.
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.
I ask because, Perl has the CPAN, Python has PyPI, Ruby has RubyGems, etc., but what does Java have?
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.
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!
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)
If only Apple would give it some more love, it'd be killer.
It's in PHP 4/5, GPL licensed, decently clean code (in 8 years there's obviously some cruft at this point :), but also has a few nice things built-in like a full CMS on top of it, multilingual support, a couple dozen modules that save some time, ORM library, and the ability to setup A/B tests just by editing a page, which is starting to come in handy these days.
Some challenges of rolling your own are that you have to write the documentation, and provide support/training/whatever else since developers aren't likely to be familiar with it (unless it's open and gains popularity). Some things to consider when weighing your options... :)
I always feel guilty though.
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.
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.
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.
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.
and am going to try Grails soon
Jboss; Spring; Hibernate; Struts; XML gluing it together; Javascript: prototype, JQuery and others; Flex and granite; Vestiges of every Java framework fad of the last 10 years. Maybe I exaggerate, maybe not.
It is way over-engineered. Several times as much code as a Django, Pylons, or Ruby solution. I dont recommend going this path at all, even if you are an enterprise.
After I learned to write Cocoa apps for the mac, I realized I needed a similar framework for web development, so I wrote phocoa.
PHP as a language is kinda bumming me out since I've learned about new techniques like functional programming, closures, etc from Javascript and playing with Ruby.
If PHP 5.3 doesn't seem like it's on the right path, I may switch to another language...
One of my projects is a location-based role-playing game for mobile phones that we will be launching soon. The entire game engine is hosted on AppEngine and uses the webapp framework.
My own (PHP5 framework) - Artisan System
Although I am also currently experimenting with App Engine: http://www.webappwednesday.com
I've been using Helma NG, rather than the stable Helma 1, so my comments are specific to that.
The dynamic nature of the language makes a huge difference. Both Helma and Grails (which you mentioned) feel like a breath of fresh air after working in Java with frameworks such as JSF. It's much faster to get things done, but I do miss the debugger and IDE integration.
Helma NG takes a new approach to managing scopes and I've found it easy to organize code into modules like in Python.
Helma NG is still work in progress, so parts of it keep changing, which I've found to be a bit of a problem. However, since most of it is in JavaScript and the framework is very lightweight, it is easy to wrap around the parts of a module you want to remain fixed.
I prefer Grails' GSP tag syntax to Helma macros, so might try to add support for that at some stage.
I'm using CouchDB for persistence and have been writing my own abstraction layer on top of that, so can't really comment on the SQL/Hibernate module.
Performance seems good, but I haven't run any benchmarks.
The community is relatively small, but very responsive. The documentation is there, but there are few examples. However, most of the code is self-explanatory.
So, to summarize: Helma NG is perfect for what I'm doing, but isn't yet stable enough to be used in place of Grails for a more traditional webapp. Helma 1 might be more appropriate for that.
What have your experiences with Grails been like?
Also fun - merb, cakephp, symfony, web2py
I have aslo played around a little b it with compojure+clojure.
To do your own work, use your fingers.
The main reason people use frameworks, is not because they're lazy or bad, it's because it lets them get more done, faster, and with less tedium.