Updates to Regex Tester
- July 9, 2008 10:47 PM
- ColdFusion, Software
- Comments (1)
Several weeks back I was exposed to Python and Django for the first time, and it really got me thinking. While I'm not a huge fan of Python syntax, I really did like the setup for Django, and how it implements MVC. One of the first things that I loved was this little tid-bit for linking up URL requests to views:
In that block, Django is defining regular expressions that map to Python functions, and defining how to pull named variables out of that regular expression, so that if you requested /polls/23/ becomes a call to the mysite.polls.views module to do the following:
Isn't that cool? I'd love to be able to do that in ColdFusion, but it looks like there are a number of hurtles I have to get past before I can make this work:
So much for that.
I did have a blast though. I went 4-2 for stumping Adobe guys on why Peter Bell, who's talks on RAD OO and Code Generation where very nice, and Marc Esher of MXUnit who did an awesome presentation on Ant and its role in managing program deployment.
This contains info from the CFUnited talk on this topic.
This talk covers MVC, Factories, ORM Introducing a quick start application: AppBooster
Domain & Business objects for each Entity.
Business Object (bean) - people, places, and things, the nouns in your system. Data Access Objects (DAO) - read and save objects Gateways - Objects which return queries Service Object (SO) - your API (controllers do not touch BO, DAO, or Gateway) Controllers - talk to your service layer.
Q: Where is validation at? A: In the BO, or the SO.
Frameworks and Software Layers
DB Layer (ORM) Transfer, Reactor
continue later
So, I'm at CFUnited 2008 at the Washingto Convention Center here in DC. Its always a nifty experiance to be at CFUnited, and this year has thus far been no exeption, even though its just getting started. I'd bore you all with notes from the keynote presentations from Michael Smith of TeraTech and Ben Forta and Adam Lehman of Adobe, but I'm not sure many tech people even look at the blog, so I wont bore you.
I dunno about you, but I love the isValid() function in ColdFusion. Its just an amazing collection of usefulness that I use just about all the time. Recently though, I've found myself really wanting something equivalent for client-side validation, so I put together this bit of Javascript code:
Please note that I take no credit for the regular expressions used in this function. I collected them from various sources, and I would credit the original creator if I could find my list of where I got them.
I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.