Aug
12
2007
Model Glue Tips Part 3: Keep your views tidy
Posted by Mark Drew at 9:16 AM
5 comments - Categories:
model-glue
/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!

Doug Boude wrote on 09/22/08 4:13 PM
Dang, Mark, why didn't I think of that? Something so simple yet I'm always so focused on the "meat"of the app that it never occurred to me to take the time to organize my views, and they have indeed gotten out of hand. Excellent tip.