162 CHAPTER 6 DECOUPLED NAVIGATION PATTERN In (Web server logs)
162 CHAPTER 6 DECOUPLED NAVIGATION PATTERN In Figure 6-7, the three functionalities are converted into technical implementation coun terparts. For the Action functionality, there is a link that captures the onmouseover event and calls Function. The Action functionality in implementation terms will have an HTML element that triggers some HTML event that is captured by a JavaScript function. The JavaScript func tion Function, in turn, requests content from a URL, which is a resource implemented by the server. The JavaScript function may or may not involve a remote call, as that depends on the needs of the Decoupled Navigation pattern implementation. There are many pieces to the pattern that exchange information requiring some common attributes. This is why the Common Data functionality is so important: it provides the decoupling of functionality between all pieces of code while sharing common state. If for the Common Data functionality a remote call is made, the server implements the Permutations pattern and decides what content the caller wants to receive. The content is generated by using some server-side framework implemented by using a series of classes, interfaces, or functions. The server-side-generated content is processed by the asynchronous. complete method and assigned to a variable. The assigned variable is used by the function GeneratePopupBox to generate some content that the user can interact with. The overall objective of the Decoupled Navigation pattern is to decouple the HTML element and event from the processing of the data and from the presentation of the data. When the individual pieces are decoupled from each other, it is possible to change one of the pieces without affecting the others. You can change one piece and still have a well organized and maintainable web application. The Decoupled Navigation pattern gets its name from the fact that the pieces are modularized and are used to navigate content in a web application. When E B V implementing the Decoupled Navigation pattern, you are working with data that is generated, processed, and presented. Implementation Implementing the Decoupled Navigation pattern requires defining independent pieces of code that are wired together to navigate some content. This section will cover the technical details of the three functionalities and will present a special discussion on designing a URL. Implementing the Action Functionality When implementing the Action functionality, most likely what you will be doing is implementing some HTML event. The event could be the result of a mouse click, timer event, HTML form being submitted, or other HTML event. Regardless of what event it is, it needs to be processed. When processing events, the challenge is to define which element captures the event, and what event to capture. A Simple Example The simplest of all navigations is the link, which in the default case will replace the current content with the content of another URL. The notation of the link is defined as follows: Apress
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.