Humans make mistakes and don't like repedetive error prone tasks, so I though I do the attempt to apply play frameworks routing and combine it with a component notation which indicates the basic structure of a website and provides a comprehendable overview of the main idea of the configuration model.
#HST scaffold example #URL CONTENTPATH COMPONENTS / /home home(header,&main(banner, doc),footer) /contact /contact &text(header,*main,footer) /simple /simple simple /news/:date/:id /news/date:String/id:String news(header,*main,footer) /news /news newsoverview(header,list, footer) /text/*path /text/path:String *text /text/content/*path /text/content/path:String *text
You see the same url content path placeholders as play framework provides, combined with a c - function like notation that let's you create page component structures. From my point of view it is easier to comprehend a text tree view where components are in place instead of mapping a model in your head. The remaining head mapping part are pointers and references where you need to imagine aggregated components and structures, though the jcr model doesn't force you to abstract and reuse structures either. Initially you can create the configuration structure of your project and than scaffold your project by convention, hst-scaffold creates the respective component and tempate structure, pages, sitemap-items, freemarker templates, includes and java files. Where you just fill in the codes. Warning: the current status of the project is still experimental and not supported by Hippo. Additionally when you build a scaffold there is the hidden directory .scaffold created that saves a history of changes for possible rollbacks, default templates for java and freemarker files as well as a configuration file.
The other way around, the attempt of creating a scaffold from an existing project, is a challanging task. There is still work to do, I don't know if I will continue finishing the idea, depending on time and interest. Though basically it would allow you to compare configurations of for example acceptance and production enviroments and see what differences or changes are regardless of the hassle to compare xml files, jcr trees and directories.
If you like to join or reuse the code feel free to charm in, for details have a look at: