Development Platform

1,565
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,565
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Development Platform

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

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×