110 likes | 218 Views
The need for server pages. HTML Need for Dynamic Content Server pages. Hyper-text Markup Language. Designed to implement the layout of a webpage. Stateless nature of pure HTML pages. Example Led to development of scripting languages Client-side scripting vs. Server-side scripting
E N D
The need for server pages HTML Need for Dynamic Content Server pages • Hyper-text Markup Language. • Designed to implement the layout of a webpage. • Stateless nature of pure HTML pages. • Example • Led to development of scripting languages • Client-side scripting vs. Server-side scripting • Non-static • Complement HTML to present dynamic data. • Example languages: ASP, JSP Last Updated: November 9, 2014
Similarities Between ASP and JSP • Run on a server as opposed to running on a client • Require good programming skills and logical thought • Provide full SQL database functionality • No difference in the output • Examples: A page in ASP………A page in JSP
Code for the ASP example <html> <head> <title>Hello World</title> </head> <body> <%response.write "<h1>Hello World</h1>"%> </body> </html>
Output of a JSP page code
Code for the JSP example <html> <head> <title>Hello World</title> </head> <body> <h1> <% out.println("Hello World"); %> </h1> </body> </html>
Differences • Functionality of languages: • JScript, VBScript for ASP vs. Java for JSP • JSP-robust exception handling • Interpreted vs. translated • Programming logic vs. page design in JSP • Greater learning curve for JSP vs. ASP • JSP- Open standard vs. ASP- Microsoft tied • Cross-platform reusability • Tag customization
A word of caution • Objectivity is lost on diehard fans of either languages • With advances in both languages it’s a constant struggle to determine which has a upper hand • ASP .NET is the new variation of ASP in direct competition with JSP • Difficult to determine which would be ideal for a given project
Resource Links on the Web • http://www.w3schools.com • http://www.jsptut.com
An Example HTML Page code
Code for the HTML Example <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World</h1> </body> </html>