Opening white: This series of learning notes are to record the size in the process of learning TapeStry. In order to use Tapestry, you have to download TapeStry3.0's binary package from Apache's website, you can use it, but you have to pay attention to that there are two packets not included therein, you must download it from the address given in the Readme file. Then configure Tomcat, you can try the Workbench example program.
To develop TapeStry applications in Eclipse, please install the Spindle plugin. This giant plugin can make your development half a time.
This series of articles are not the HelloWorld level, or the PETSHOP level, my goal is by writing, I can understand the operation mechanism of this framework and how to develop complex TapeStry components.
I found that TapeStry is really excellent, especially in performance, using such a complex mechanism to achieve the same ability to achieve with JSP, and I want to be denyed in architectural design.
We know that objects such as Cycle, Visit in Tape is the most core part, where CYCLE represents the currently processed request, and the Visit object is an object used to store global data within the Application range. Using the method of using a Cycle object You will get any page instances of Application (that is, the currently rendered page or the page that is rebed during the Form submission process), the application's engine (Engine) is even provided by the Servlet API. Objects; use Visit objects you can share data between different pages.
The AppCationServlet in TapeSTRY is the only servlet in the entire program, which acts as a state-of-the-state HTTP protocol world and servlet API and a gateway between the stateful POJO world. Here, it is important to the key, why, because in the traditional servlet program, the instance of each page is multi-thread, which can be used for N Request services, so you can't save the status in itself, and TapeStry Each page in the application is stateful, so it can't be stateless.