Coding Standards for Front-end templates


Table of Contents

1. Introduction
2. Code

I'm working with MMBase for 6 or 7 years now or so, and during that time I did encounter lots of JSP code. Much of it was incredibly ugly, and hard to maintain.

The first, and most important, rule of these code conventions is, that everybody who is responsible for JSP-coding, must realize that JSP is code. Everything which is considered bad practice in other code, should be considered bad practice in JSP too. I mention e.g. code-duplication, sloppy, errorneous or even no indentation, very wide variable scoping, huge blocks of code etc.

But besides that, I can propose some clear guidelines, for JSP's in an MMBase web-site. This is about JSP's which in principle are implemented using the MMBase taglib. I don't like JSP's contains only java, but those are out of the scope of this document.


This is part of the MMBase documentation.

For questions and remarks about this documentation mail to: documentation@mmbase.org