CHAPTER 6 DECOUPLED NAVIGATION (Post office web site) PATTERN framework. Imagine
CHAPTER 6 DECOUPLED NAVIGATION PATTERN framework. Imagine a developer using JSP. Then the URL /search/impl/amazon would be rewritten to the following: Amazon Implementation The URL ends with the extension .jsp, indicating that amazon.jsp is a JavaServer page. And having the .jsp extension forces a JSP processor. Granted, it is possible to associate the .jspextension with an ASP.NET page, or even PHP, but the fact is that the extension is a complica tion. The Permutations pattern explicitly dictates that externally exposed URLs are treated as components and require the use of a resource that does not tie into a representation like JSP. This does not mean that URLs cannot be dynamically generated. What it means is that URLs that are exposed as resources as per the Permutations definition will not be dynamically generated. Those URLs will be hard-coded into the HTML page because they represent resources that are already abstracted. And as illustrated per the Permutations pattern, those URLs that are specific to the representation technology can be dynamically generated or hard-coded or retrieved from a configuration file. How the URL is inserted into the content depends on the representation technology. Hard-coding a URL into an HTML page is difficult for a programmer to swallow. Programmers just don t like to hard-code any pieces of text, which is completely understandable. After all, programmers have been burned often enough. If you are a programmer who likes to be abso lutely fail-safe, load the URL from a configuration file. However, it will not save that much work because the URLs are components, and if the URL is updated, many configuration files will need updating. Remember that we are entering an era of content that is retrieved, cached, E B V N archived, referenced, and stored. This means URLs should not change in the first place because changing them will cause problems with other HTTP-based applications. Therefore, think three times before creating the appropriate resource URL. The one last bit that needs discussion is the referencing of the server. All of the URLs did not have an HTTP server reference. For example, to reference the Apress website, the HTTP server www.apress.com is used. How somebody knows www.apress.com is purely naming convention, as the URL some.cool.apress.server could have been used as well. The URL some.cool. apress.server is not very intuitive, as we have been trained to use www and .com or the appropriate country extension. Another way to discover a URL is through a search engine such as Google. Continuing on this thread, a single server is not appropriate for most HTTP servers; thus a web server farm is necessary. The complications of figuring out the name of the server are extensive. The Decoupled Navigation pattern offers no solution to the HTTP server reference problem because it is a Domain Name Service (DNS), search engine, and load balancing problem. Today there are already very good implementations of each of these technologies, and writing a pattern about these technologies is futile because most people treat the technologies as black boxes that just happen to work all the time. Yes, I am hand waving and passing the buck, but talking about these technologies is like explaining the philosophy of the perfect garbage collector. We just assume that the garbage collector does their thing properly. Were this book about Internet infrastructure patterns, my answer would be completely different. Restructuring the Application Knowing what there is to know about URLs and the local application, the local processing application is converted to call a remote server that will convert the text into bold text.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.