/views /pages /security /products /layouts /nav ...I tend to keep views that are used in multiple places (lets say a top nav) in a /nav directory and the layouts in a /layouts directory. Another way to distinguish your view files comes in the way with prefixes for what kind of file they are, so for example listing pages have dsp_, form pages have frm_, pages that output XMl start with xml_ and navigation pages start with nav_. Hopefully following these tips it will be a lot easier for you to find the right view quicker!
Model Glue Tips Part 3: Keep your views tidy
August 12, 2007 · 5 Comments
When you develop model-glue apps, you start adding your view files in the /views directory, this all fine as a demo or in a small application, but it can get very full of items.
An easy way to sort out your views a bit, is to use the same naming convention we used for the event-handlers but to create directories to hold the views named after the controller they relate to, for example:
Tags: model-glue





5 responses so far ↓
1 Doug Boude // Sep 22, 2008 at 4:13 PM
2 Bob C // Sep 22, 2008 at 4:13 PM
3 Mark Drew // Sep 22, 2008 at 4:13 PM
@bob: indeed, they work with most MVC frameworks, and not just in CF, I also so something similar with Ruby on Rails.
4 Jatin Nanda // Sep 22, 2008 at 4:13 PM
5 Mark Drew // Sep 22, 2008 at 4:13 PM
Leave a Comment