lecture8

lecture8 - Sheet1 Page 1 ----------------------- Page

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Sheet1 Page 1 ----------------------- Page 1----------------------- CSE 135 Server Side Web Languages Lecture # 8 2nd Generation Server-Side Scripting Environments ----------------------- Page 2----------------------- CSE 135 Server Side Web Languages Lecture # 8 Server Side Scripting Pros & Cons First generation server-side scripting environments such as PHP, Classic ASP, and traditional ColdFusion enjoyed a great success because they were relatively easy for both new and experiences programmers to pick up. First generation server-side scripting environments do have challenges including: Performance issues Heavy intermixture of script and markup Lack of facilities for large scale system development l Debugging l Modern coding features like OOP, exception handling, strong typing ----------------------- Page 3----------------------- CSE 135 Server Side Web Languages Lecture # 8 Second Generation Server-side Scripting The Java Web platform provides JSP while the .NET platform provides ASP.NET as potential 2nd generation server-side scripting environments Both address speed through pre-compilation to intermediate code Performance hit on first request, but significant savings later Both provide more support for large scale system development (generally through improved object access, language features, etc.) Both try to get developers not to intermix code and markup Easier said than done ----------------------- Page 4----------------------- CSE 135 Server Side Web Languages Lecture # 8 Intro to Java Server Pages Java Server Pages or JSP (java.sun.com/products/jsp) Sheet1 Page 2 for short provide a scripting approach for building Java based web pages Scripting and element based content Compiled pages for better execution Can use servlets Leverages the Java environment l Rich library, type safety, OOP focused development & Need a JSP enabled Web server Try Apache Tomcat (http://jakarta.apache.org/tomcat) Plenty of other JSP/Servlet hosts (http://www.servlets.com/ engines) ----------------------- Page 5----------------------- CSE 135 Server Side Web Languages Lecture # 8 Visual Overview of How JSP Works HTTP Request for helloworld.jsp Helloworld.jsp Web Server Generate JSP Container helloworldServlet.java Browser receives Resulting page response with appropriate MIME type (usually Compile to text/html) and renders Execute helloWorldServlet.class class file in JVM ----------------------- Page 6----------------------- CSE 135 Server Side Web Languages Lecture # 8 How JSP Works & As long as original JSP source is unchanged, subsequent requests go right to the Servlet Class file l thus the performance boost & In some ways you might say that JSP is a simpler way for someone to write a Servlet ----------------------- Page 7----------------------- CSE 135 Server Side Web Languages Lecture # 8 Sheet1...
View Full Document

Page1 / 40

lecture8 - Sheet1 Page 1 ----------------------- Page

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online