【正文】
expensive. In these cases, the cached page returns stale data. In those cases, then, you39。t easily revise pages after developers finish coding them, instead of clarifying distinct roles, JSP coding can cause them to merge: a developer must multitask, being developer, designer, and about the importance of this feature? Then download the J2EE Reference Implementation and load one of the included JSP pages into a WYSIWYG HTML editor, such as Dreamweaver. The page immediately fills with yellow areas letting you know about all the illegal markup contained within the page. Of course, the yellow results from the JSP tags and code, rather than any real error in the date, no JSPcapable WYSIWYG editors exist, and I have not heard of any efforts to build one. While template engines have this same problem, many Javabased solutions, such as my favorite, Enhydra, allow you to supply the markup page as input to the presentation technology. In this case, the designer can make changes as often as needed and resupply the markup page. Running the engine or piler for the presentation technology converts it to the proper format, and no code changes have to be made (in the typical case). The result is the desired one: designers remain designers, and developers remain , be wary of the promise of JSP technology as pared to the reality of what it delivers. In practice, to function in a JSP technologydriven environment you must either have your developers handle a large 東華理工大學(xué)畢業(yè)設(shè)計 外文翻譯 14 portion of the markup or have designers learn at least some JSP vs. XMLOne of the most significant disadvantages of JSP technology, and one of the most overlooked, is its inpatibility with XML. More precisely, and particularly in the HTML realm, JSP pages are not required to be XHTMLpatible. XHTML is a World Wide Web Consortium (W3C) specification that is now replacing HTML . XHTML defines the HTML tagset in terms of a wellformed XML document. For example, the br tag must be converted to br/ to ensure XML pliance. Similar rules are applied to image tags, and in XHTML (recently ing of age) most font properties and other styling move into CSS stylesheets. Still, most standard HTML documents convert easily to XHTML , which means they can be read directly with any XMLpliant parser, such as Apache Xerces, and manipulated as XML.What39。s XMLC do not allow this type of inline coding. Instead, these technologies take a pure markup language page as input, and generate Java methods. This essentially is changing the program flow。t have to perform pointer addition in C or that no good programmer would ever insert code scriptlets, we all know what happens in practice. The Java language is a better language because it mandates that these sorts of bad habits never surface. But JSP in this case is much like C, allowing some very bad additional litmus test of the JSP technology39。 } for (Iterator i = ()。s the time to determine whether or not JSP actually acplishes this goal. As I39。m more than a bit dubious.)Still, choosing JSP technology forces you to use the Java language, at least for presentation and content. While CORBA can be used for business logic, JSP coding does necessitate some familiarity with servlets as well as the core Java language. Since many developers e to JSP coding through the J2EE platform, this doesn39。t have to use it! Take a close look at both the positives and the negatives before choosing to use JSP technology in your applications. Let39。m ready to cut to the chase: JSP technology, while built on good ideas, presents quite a few problems. Before you choose to use JSP coding in your applications (which you might still do), you should at least be aware of possible should also be aware of a facet of the J2EE programming platform that is often ignored: just because an API es with the platform doesn39。 I39。s petition from Microsoft was at an alltime high, primarily due to the success of Microsoft Active Server Pages (ASP). The similarity of the name JavaServer Pages to Active Server Pages was not merely coincidental. And the ability to mimic many of ASP39。ll find more books devoted to JSP technology than about almost any other single Java API. Before I dive into the specific problems that JSP technology presents, you need a clear understanding of what it claims to do. Content vs. presentation Above all, JSP technology is about separating content from presentation, foremost in Sun39。ve determined that a presentation technology allows a clean split between content and presentation, you should try to ensure that a minimum amount of rework is necessary in order to make presentation changes. The promise of JSP technology Now, on to the specifics of JSP coding. The promise of JSP technology is to supply the designer and developer the only presentation technology they will ever need. JSP technology is part of the J2EE platform, which is the strongest show of support Sun can give one of its Java products. To give you an idea of how prevalent this solution is, try running a search on 39。s code the simplest case, the artist supplies the markup, and the developer provides code and also plugs the markup into the presentation technology. The application is started up, and the content magically bees a user interface. Of course, as we all know, development rarely ends there. Next e revisions and changes to the interface and new business rules that must be coded. This is where the true test of the presentation technology39。t been as easy as we might have hoped. A number of issues creep up when it es to taking the programming languages everyone used for backend systems and leveraging them to generate markup 東華理工大學(xué)畢業(yè)設(shè)計