Life, code and music.
Links


Articles
Archives
09.1003.06
06.1002.06
02.1001.06
11.0912.05
08.0911.05
03.0909.05
12.0808.05
11.0807.05
10.0806.05
03.0805.05
01.0804.05
11.0703.05
10.0702.05
08.0701.05
07.0712.04
06.0703.04
05.0702.04
11.0610.03
08.0609.03
04.06 
10.09.2003

Studying Containers

We broke up the work for the first iteration. I took the Container, which is something I've been wanting to study and work with for a while.

I know, you're thinking, "What, you don't work with MVC today?" Actually, no. Where I work we somehow got stuck in model 1 MVC, with JSPs in charge of shuffling the user around. It's a pain, but that's the framework we have.

A while ago I was studying up on the MVC as part of a review of enterprise programming and I ran across an interesting (to me, probably old hat to you) way to implement containers. (Designing Enterprise Applications with the J2EE Platform, Second Edition) Rather than just run a ton of if-then-else statements, it uses the command pattern, pulling the command from the URL and using it to look up an action in a hashtable. If you're clever enough, you can even use XML to configure it. Then you just stick in a new class and update the config file.

I'll be turning that into Python, which shouldn't be too hard. It's a pretty simple pattern, and Python is OO. I wonder if Python has anything that makes this especially easy. I guess we'll find out.


Post a Comment

<< Home


Powered by Blogger

© 2001-2005 20six20