Why do we need another web application framework, as there are several mature frameworks available and even for free? There have been good reasons for designing Projector beside the fact that it is designed for use in a WebDAV based environment:
Separation of concern
If you are designing a very simple web application and you are the one and only who is working on the site, every technology might suit your needs. But if you are working on a bigger project and the layout of the web application is done by another person than the programming and the one who owns the website wants to change the content without charging the programmer or designer, you'll need a more sophisticated approach that allows this so called separation of concerns.
The designer, who wants to change some parts of the layout, should not be able to destroy the hard and expensive work of the programmers and the editor of the website should not be able to destroy the layout that contains all the love of the websites designer. If you are familiar with JSP programming, you know that it is possible to mix the page layout and the java source code that not only renders complex parts of the page like tables and forms, but - even worse - sometimes also contains sensitive business logic. Someone not familiar with the java programming language, who wants to change the layout of the page, can by accident destroy some important parts of the application. Even if there are some new concepts, that help to avoid mixing the layout and the programming stuff, it is still possible and you will hardly find any project, where the separation of concerns is done well.
Projector tries to avoid this situation, by introducing a very simple and reduced templating mechanism that does not even offer the possibility to write some programming instructions into the template. This is for sure causing some pain, especially if you are a programmer and want to type in some very easy conditions or loops, but this is the only way to avoid the situation described before. A big advantage of the reduced templating is that anybody familiar with HTML can understand and write Projector templates himself. We have to accept that artists and programmers sometimes live in different worlds and things that are looking very easy to programmers are as hard to understand for a designer as the weird look of a webpage designed by a programmer. The Projector templating mechanism is described in detail in a later section.
Contract based programming
What the heck is contract based programming? Well, it sounds good and in fact plays an important role in the Projector framework. It more or less means, that you describe the behavior of the methods you implement in detail and you'll earn a lot of benefits up to automatic form generation. This is a real killer feature, so the curtain for this show will not be opened now, but later.
Event based workflow engine
Building complex web applications is a hard task. Even if the logic of the application is simple, it is sometimes difficult to do things at the right time. Projector helps you to schedule the programming logic by using a sophisticated event mechanism. If you have ever implemented a web application before, you know how to respond to user input: The servlet, JSP or whatever you’ve implemented will be called, after the user entered the URL of your page, submitted a form or pressed on a link or anything similar. This might be enough for simple scenarios. But what if the desired scenario is more complex?
Imagine the following: You are implementing an online store. After the user created his account, he is not buying anything for 30 days. Now you want to notify him by sending an email. If the user is not responding for another 10 days, you want to delete the account automatically. This is hard to implement, if you start from scratch, but it is very simple if you are using Projector. You only have to define the events that must occur before your code gets launched and Projector is dealing with all the details. Even if you are restarting the server, the state is still consistent.
WebDAV-based content management
All parts of your Projector based application are stored in the underlying WebDAV repository. This is great, because every person working on the application can use his or her favorite applications to work on it: The designer can change layout templates with Dreamweaver or GoLive, the programmer can use Eclipse or any other WebDAV enabled IDE. The editor can use the office suite of his choice like MS Office or StarOffice to edit the content. Beside this wonderful experience, you gain all of the other benefits, which have been described in the previous parts of this book: Your content is versioned, can be searched and the access can be restricted and much more.
Let processors work for you
Processors are the smallest building blocks in the Projector framework. Many prepared processors ship with the Projector framework and will help you solving common tasks in web development: You can generate tables that can be sorted and split across pages, without the need to write a single line of code. Tree view processors will help you to layout hierarchical data and generate navigation menus.
Projector offers a lot of features which let you enjoy the application development. Most web frameworks make easy life even easier. Projector was designed to let you also manage the harder parts. So, if you want to build complex web applications Projector is a good choice, even if it is brand new and not as widely spread as JSP or Struts for example.