Assuming you follow the philosophy of the MVC frameworks out there, you’ve likely come across Beans, Services, DAOs (data access objects), and Gateways. Without getting too much into detail about what each of these types of components do, which I’ll get into in a future blog post, your gateway layer is meant to interact with your database where you need to do more than just create, read, update, or delete objects (which is what a DAO is for).
Writing an Effective Gateway Object
Making Bad Code Good
After listening to Dan Wilson’s session on Making Bad Code Good at cf.Objective() 2010, it really got me to thinking of some best practices that I wish everyone would follow in order to keep that maintenance period (which consumes a majority of a developer’s time and effort) as short as possible.
Playing with jQuery: DragForm Plugin
So what’s the point? Why create a plugin for dragging and dropping form elements? I thought I’d try a different take on the typical web-form usability and created what I think is a pretty decent alternative.
Drag and drop elements have been around forever. It’s a pretty good metaphor in terms of describing to the user how certain elements of a user interface are to function. The web is a different matter however. Drag and drop, while isn’t all that new to the web, it hasn’t been as widely adopted with how web sites are designed and are meant to be interacted with.
Faster Development with Mach-II’s View Tag Library
A major headache that many developers experience when coding their Mach-II views is the fact that they end up writing and re-writing the same (or similar) complex code in order to output simple elements like anchor tags or alternating row colors in a list or table.
Luckily, since version 1.8, Mach-II offers the view tag library to not only help reduce the amount of code required in each view, but make the code easier to read and look cleaner.
Search Engine Safe Routes in Mach-II
What are Search Engine Safe (SES) routes? Take a typical Mach-II URL, e.g. /index.cfm?event=world&country=canada&province=british%20columbia&city=vancouver. Even using Mach-II’s own Search Engine Safe (SES), the URL remains somewhat ugly: /index.cfm/event/world/country/canada/province/british%20columbia/city/vancouver/.
Suppose the format of the URL is always consistent. In our example above it can safely be assumed that the event name is world which is followed by country, province, and city.
