|
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