Improving the Tutorial: Using the Same View for Multiple Actions in CFWheels



I'll fulfill my promise by giving another example of how I would improve the Hello Database tutorial for ColdFusion on Wheels.

This time, I'll talk about how we could factor out view logic so that the profile form can be used for both the add and edit actions. With all of this MVC goodness, we should be able to do some refactoring easily, shouldn't we?

Improving the Tutorial: Object- and Query-Driven Partials in CFWheels



I mention in the ColdFusion on Wheels Hello Database tutorial that there are some things that could be factored out to make the code leaner. One thing that I would do is use a query-driven partial to factor out a loop that displays all users in the database.