Saturday, March 3, 2012

web2py: an MVC framework that will rock your socks

Living under the shadow of the venerable and much more famous Django (and outside the view of Rails' unwavering zealots), is an amazing MVC framework called web2py. Let me tell you why I find this framework to be absolutely great and why you should give it a try.

First: it's completely self-contained and self-dependent. All it requires to run is python (2.6+) installed in your computer.

Second: Documentation, documentation, documentation. Of all the MVC frameworks out there (including some that are much older and "mature"), I've never seen so much care and effort put into documentation as with web2py. The documentation is not just a collection of half-assed tutorials with a few code snippets here and there with some commentary and whatnot. No, web2py's documentation is actually a full-fledged and very well written book which you can read online or download and print via PDF. But don't be fooled thinking that just because it's a book that it will be a "slow" book or that it will be full of technical platitudes. On the contrary, its focus in the few chapters is to get you up and running fast without neglecting very useful technical side notes and leaving the thick of deep technical explanation for later chapters.  The documentation leaves the likes of django's and rail' in the dust.

Third: Meta-admin interface included. That's right, if you thought django's "freebie" admin interface was rad, wait till you see web2py's. It's not just an app-specific admin panel (like django's), it's also a panel to admin all of your available apps their contents and settings.  It's a really awesome feature, specially if you are developing/maintaining more than one web app.

Fourth: Built-in web-based IDE? Yes, web-based built-in IDE. When was the last time that, out of the box, you could have a rather complete web-based IDE to get your scaffolding, code generators, models and views and get you started with all the rest of your coding (Zen Conding included) with Rails --or django for that matter? Hmmm I'm guessing never. You could, theoretically, never have to run a shell command (other than to start the web2py driver app) to develop your app. I'd like to emphasize, it's not just a gimmick for "ooo's and ahhh's". It's a very powerful and time-saving tool.

Fifth: Adhering to standards and very well suited for RESTful apps. Classic and elegant /noun/verb (corresponding to controller/action) URLs makes app design straight forward.

Sixth: Built-ins. Web2py has an incredible collection of built-in widgets, forms, validators, types, and so forth. These are great for turn-key proof-of-concepts (or production-ready apps, if these do what you need).

Seventh: top-notch security. This is something the team who developed web2py worked hard to tackle. Web2py addresses OWASP's top ten security issues/vectors throughout their apps. That way you can focus on coding functionality and much less time worrying about the plethora of security risks web applications can have.

There's a lot more I could talk about, for instance its powerful database abstraction layer, it's intuitive templating engine , its form generators, its WSGI-compliance (which is almost a requirement to run in production environments), but I leave that as an exercise to the reader :)

No comments:

Post a Comment