Download - Development Platform
![Page 1: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/1.jpg)
Development Platforms
2110472 Computer NetworksNatawut Nupairoj, Ph.D.
Department of Computer EngineeringChulalongkorn University
![Page 2: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/2.jpg)
Outline
Overview. J2EE Platform. Microsoft .NET Platform. Web Service Platform.
![Page 3: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/3.jpg)
Overview
Static vs. dynamic pages. Common Gateway Interface (CGI)
External extension (program) for web server. Used mostly to connect to database. Early days
C and perl. Counter, guest book, graph generator. Out-of-process model.
![Page 4: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/4.jpg)
Basic CGI Model
Problem ? Low performance
Must run a new program every time it is being invoked. In-process model – include interpreter inside web server
mod_perl. ASP.
Plug-in model – separate process (but already started). External AppServer through socket.
WebServer
Process
CGIProgram(External)
Parameters
HTML page
![Page 5: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/5.jpg)
Java Platforms
Java-Based Platforms J2SE (Standard Edition)
JVM / JRE. Applet and applications.
J2ME (Micro Edition) For mobile and wireless equipment. Midlet.
J2EE (Enterprise Edition) A set of services. Servlet, JSP, and EJB.
![Page 6: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/6.jpg)
Java Platforms (2)
![Page 7: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/7.jpg)
J2EE Services
Java Server Page (JSP). Servlet. Enterprise JavaBean (EJB). Java Connectivity Architecture (JCA). Java Message Service (JMS). Java Management Extension (JMX). Java Naming and Directory Interface (JNDI).
![Page 8: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/8.jpg)
J2EE Architecture
![Page 9: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/9.jpg)
JSP Example
![Page 10: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/10.jpg)
Servlet Exampleimport java.io.*;import javax.servlet.*;import javax.servlet.http.*;
public class HelloWorldServlet extends HttpServlet {public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
HTML res.setContentType( "text/html" ); ServletOutputStream out = res.getOutputStream();out.println( "<html>" );out.println( "<head><title>Hello World</title></head>" );out.println( "<body>" );out.println( "<h1>Hello World</h1>" );out.println( "<p>Congratulations, your servlet is working!</p>" );out.println( "</body>" );out.println( "</html>" );
}}
![Page 11: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/11.jpg)
Microsoft .NET
Suite of products Programming Languages
C#. ASP.NET. VB.NET. Third parties: NetCOBOL, Visual Perl, Visual Python, etc.
Development system. Servers.
Common Language Runtime JVM-liked, but supporting multiple languages.
![Page 12: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/12.jpg)
.NET Architecture
![Page 13: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/13.jpg)
Generating Dynamic Pages
Model-View-Control Pattern Model – data provider
Connect to the database.
View – presentation provider Generate HTML page from Model.
Control – logic provider Receive a request and control both View and Model.
![Page 14: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/14.jpg)
MVC Pattern
Browser
Biz Logic(Control)
Presentation(View)
Web
Ser
ver
DatabaseLogic
(Model)
Business Logic & Presentation Database
![Page 15: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/15.jpg)
Benefits of MVC Pattern
Simple to Maintain Separate business, database, and presentation
logic. Database access is encapsulated in DB logic.
Flexible presentation Template-like system. Simple to support more than one languages.
![Page 16: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/16.jpg)
J2EE in Actions
![Page 17: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/17.jpg)
.NET in Actions
![Page 18: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/18.jpg)
J2EE vs. .NET
J2EE Multi-Platforms: Unix, Windows, and others. Scalable and high-performance. Complete server-level services: JMS, EJB, JCA, and
others. .NET
Multi-Languages: C#, VB.Net, ASP.Net, and others. Good development tools: Visual Studio .NET. Simple to develop. Built-in supports for XML and Web services. CLR will play a very critical role.
![Page 19: Development Platform](https://reader033.vdocuments.us/reader033/viewer/2022052908/5594c03f1a28ab88748b4683/html5/thumbnails/19.jpg)
References
H. Sheil and M. Monteiro, “Rumble in the jungle: J2EE versus .Net, Part 1”, JavaWorld, June 2002, http://www.javaworld.com/javaworld/jw-06-2002/jw-0628-j2eevsnet_p.html.
J. Lurie and R. Belanger, “The great debate: .NET vs. J2EE”, Javaworld, March 2002, http://www.javaworld.com/javaworld/jw-03-2002/jw-0308-j2eenet_p.html.
jGuru, JavaServer Pages Fundamentals,http://developer.java.sun.com/developer/onlineTraining/JSPIntro/contents.html.