Best Practices
(Difference between revisions)
Line 1: | Line 1: | ||
− | + | * Try to re-use existing components (the TemplateOne system, downloadable modules) whereever possible. The temptation is to re-invent rather than to adopt existing components, which will often take significant time. | |
+ | |||
+ | * Leverage properties where possible, instead of using hard-coded values. Properties can be set at the root of a site and cascade downwards, allowing much more flexibility. | ||
+ | |||
+ | * Use structured documents sparingly; make sure that any complex document type is thoroughly designed prior to loading your content. It can be very difficult to migrate from one XSD structure to another, more complex form. | ||
+ | |||
+ | * Consider your template architecture carefully. A simple page skeleton that uses properties to dynamically load in references to style sheets, javascript, global navigation, and sidebars can be quite powerful. | ||
+ | |||
+ | * Don't optimize too soon. OpenCMS has many ways to tune its performance once you get to launch. Don't write stupid code in your scriptlets, but don't kill yourself solving problems until you're sure you actually have them. |
Revision as of 03:36, 13 July 2007
- Try to re-use existing components (the TemplateOne system, downloadable modules) whereever possible. The temptation is to re-invent rather than to adopt existing components, which will often take significant time.
- Leverage properties where possible, instead of using hard-coded values. Properties can be set at the root of a site and cascade downwards, allowing much more flexibility.
- Use structured documents sparingly; make sure that any complex document type is thoroughly designed prior to loading your content. It can be very difficult to migrate from one XSD structure to another, more complex form.
- Consider your template architecture carefully. A simple page skeleton that uses properties to dynamically load in references to style sheets, javascript, global navigation, and sidebars can be quite powerful.
- Don't optimize too soon. OpenCMS has many ways to tune its performance once you get to launch. Don't write stupid code in your scriptlets, but don't kill yourself solving problems until you're sure you actually have them.