sfmagic.org Rewrite Framework
.At work we use the Pylons web framework, and I like it quite a lot, so I’m going to use it for sfmagic.org.
The fact that you can choose whatever individual pieces you like for it is a plus. Another thing I really like about it is its debugging mode, which lets you evaluate and execute commands in context via a browser when you run into a problem (or raise an exception deliberately).
Overall, Pylons has struck me as well-designed, and should be more than enough for a project like sfmagic.org. I haven’t done much with web frameworks before, and I’m looking forward to seeing how much easier (hopefully) things are with one.
The various pieces I plan to use:
Database: MySQL, although I’m considering a switch to either PostGreSQL or SQLite.
Database ORM layer: SQLAlchemy. I’ve never used one of these before either. I’m a little concerned about how it’ll affect performance. The site is already really slow when calculating seeding, and I’m hoping that doesn’t get any worse. On the other hand, while rewriting I might discover that I did some really dumb things in the queries that make up the calculations, and figure out how to improve that.
Request handling: Routes. Another layer I haven’t had in my own apps before, and one of the attractions of using a web framework. This should allow me to have a cleaner code structure. At the moment I think the basic actions/controllers will be along the lines of:
/standings
/players
/tournaments
/headtohead (depending, of course, on whether or not I get this working)
/analysis (I’m not sure what’s going to go in here. One possibility is the ability to look at things like color use over a given block.)
/admin (with the add new data I already have, and hopefully with the ability to easily create users who can enter data)
Templating: Genshi, because I use it at work and it seems pretty good. The current version of the site is a complete mish-mash of database access code, calculation code, presentation code, and HTML, and I would really like to avoid that this time around.
JavaScript/asynchronous requests: Pylons comes with a Webhelpers module that will be useful. Most of the JavaScript and AJAX stuff, though, I’ll do with the fantastic jQuery, without a lot of integration into the framework.
I also plan to move it to a different server, and will be using Subversion for version control.
It all sounds good, I’m hoping that playing with these pieces will be fun.
19 Dec 2007 at 03:04
JQuery is great isn’t it! Been using it for a while now and it really is wonderful. Reminds me a little of LISP actually :-)