Your SlideShare is downloading. ×
Development Platform
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Development Platform

1,481
views

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,481
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Development Platforms 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University
  • 2. Outline
    • Overview.
    • J2EE Platform.
    • Microsoft .NET Platform.
    • Web Service Platform.
  • 3. 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.
  • 4. 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.
    Web Server Process CGI Program (External) Parameters HTML page
  • 5. 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.
  • 6. Java Platforms (2)
  • 7. 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).
  • 8. J2EE Architecture
  • 9. JSP Example
  • 10. Servlet Example
    • import 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( &quot;<html>&quot; );
    • out.println( &quot;<head><title>Hello World</title></head>&quot; );
    • out.println( &quot;<body>&quot; );
    • out.println( &quot;<h1>Hello World</h1>&quot; );
    • out.println( &quot;<p>Congratulations, your servlet is working!</p>&quot; );
    • out.println( &quot;</body>&quot; );
    • out.println( &quot;</html>&quot; );
    • }
    • }
  • 11. 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.
  • 12. .NET Architecture
  • 13. 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.
  • 14. MVC Pattern Browser Biz Logic (Control) Presentation (View) Web Server Database Logic (Model) Business Logic & Presentation Database
  • 15. 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.
  • 16. J2EE in Actions
  • 17. .NET in Actions
  • 18. 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.
  • 19. 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 .

×