I'm so sorry, my fault, missing quote mark. Can anybody delete my previous posts?
-------------------------
Simplifying Web Development can be achieved with various methods and at various layers of Web application development, but not necessarily relating to whether you use scripting/template languages. Scripting languages are not necessarily simpler than conventional programming languages like Java, this depends on the context you use them and the programming style you prefer(I never feel JavaScript is simpler than Java, for example, but other people may feel different).
Componentization and modularization are often more effective in simplifying Web application development IMHO. Here please let me take
AppServer Faces as example illustrating how it can simplify Web development without using scripting languages.
Assuming we want something like BorderLayout view structure to render our content, with AppServer Faces we can define a Java class like:
public class MyPage extends PageCom implements MyDataBiningInterface{
private PTable layout; public MyPage(){
layout=new PTable(3);//three columns
layout.createRows(3);//three rows
layout.getRow(0).getCell(0).makeColSpan(3);
layout.getRow(2).getCell(0).makeColSpan(3);
//apply CSS styles like: layout.getHtmlUI().applyStyle(PTableStyle style)
//can also apply styles to any view component contained in the layout object.
}
public void setContent1(Object content1){
//This is one method defined in MyDataBindingInterface
//put the content1 into one cell of the layout, or wrap it with another PageCom
//component before put it into the cell.
...
}
...
public void toXML(PageWriter pWriter){
pWriter.put(layout);//output content
}
}
Now the MyPage class is a reusable view component, it will render the contents in the view structure defined by the private layout component. The user of this MyPage component doesn't know what the layout is, and what styles are applied to it. The application developer just cares what the data binding methods are. Somebody may argue this POJO approach can not have the power as the scripting/template languages in rendering content, but that's not correct. This approach can express any view structure the HTML plus CSS permit. Actually the plain HTML just defines a few means to rendering content, and the table element is used in most cases to do layout. The rich styles can be got by applying CSS styles, and these style rules can be defined outside of the implementation of the PageCom component. AppServer Faces even allows you dynamically define view objects(so the view structure can be dynamically changed), this sometimes is not easy achieved with scripting language. Somebody may also argue a Java programmer is not the right person in designing a nice view component, but in reality many Java programmers today have to design JSP or other template pages. Because the number of common view components is not unlimited, once you have got them, you can reuse them in any project, this will simplify your development.
Actually not only the pure view components can be developed and reused, but also the full functional modules with sophisticated interaction logic can be written as components with AppServer Faces, and you can reuse them in your Web application developments.
So my point is to simplify Web application development, componentization is a very effective approach, actually this has been proved in traditional application development.
Cheers
Bo Yuan
AppServer Faces--Writing Web applications without pages