1 / 89

Internet Engineering Course

Internet Engineering Course. Web Application Architectures. Agenda. Application servers J2EE .Net Comparison between J2EE and .Net. mainframe. terminals. terminals. 1. Application Servers. In the beginning, there was darkness and cold. Then, …. Centralized, non-distributed.

giona
Download Presentation

Internet Engineering Course

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internet Engineering Course Web Application Architectures

  2. Agenda • Application servers • J2EE • .Net • Comparison between J2EE and .Net

  3. mainframe terminals terminals 1. Application Servers • In the beginning, there was darkness and cold. Then, … Centralized, non-distributed

  4. Application Servers • In the 90’s, systems should be client-server

  5. Application Servers • Today, enterprise applications use the multi-tier model

  6. Three-TierArchitecture

  7. Web Application Architecture

  8. Application Servers • “Multi-tier applications” have several independent components • An application serverprovides the infrastructure and services to run such applications

  9. Application Servers • Application server products can be separated into 3 categories: • J2EE-based solutions • Non-J2EE solutions (PHP, ColdFusion, Perl, etc.) • And the Microsoft solution (ASP/COM and now .NET with ASP.NET, VB.NET, C#, etc.)

  10. J2EE Application Servers • Major J2EE products: • BEA WebLogic • IBM WebSphere • Sun iPlanet Application Server • Oracle 9iAS • HP/Bluestone Total-e-Server • Borland AppServer • Jboss (free open source)

  11. Web Server and Application Server App Server 1 Internet Browser Web Server(HTTP Server) HTTP(S) App Server 2

  12. What is J2EE? • It is a public specification that embodies several technologies • Current version is 1.4 • J2EE defines a model for developing multi-tier, web based, enterprise applications with distributed components

  13. J2EEArchitecture

  14. J2EE Benefits • High availability • Scalability • Integration with existing systems • Freedom to choose vendors of application servers, tools, components • Multi-platform

  15. J2EE Benefits • Flexibility of scenarios and support to several types of clients • Programming productivity: • Services allow developer to focus on business • Component development facilitates maintenance and reuse • Enables deploy-time behaviors • Supports division of labor

  16. Main technologies • JavaServer Pages (JSP) • Servlet • Enterprise JavaBeans (EJB) • JSPs, servlets and EJBs are application components

  17. JSP • Used for web pages with dynamic content • Processes HTTP requests (non-blocking call-and-return) • Accepts HTML tags, special JSP tags, and scriptlets of Java code • Separates static content from presentation logic • Can be created by web designer using HTML tools

  18. Servlet • Used for web pages with dynamic content • Processes HTTP requests (non-blocking call-and-return) • Written in Java; uses print statements to render HTML • Loaded into memory once and then called many times • Provides APIs for session management

  19. A Sample Scenario Other Components Web Server JSP (1) get a.jsp (2) process Client (5) HTTP file Servlet Impl. (3) gen. Servlet Database (4) result Servlet JVM

  20. EJB • EJBs are distributed components used to implement business logic (no UI) • Developer concentrates on business logic • Availability, scalability, security, interoperability and integrability handled by the J2EE server • Client of EJBs can be JSPs, servlets, other EJBs and external aplications • Clients see interfaces

  21. J2EE Multi-tier Model

  22. J2EE Application Scenarios • Multi-tier typical application

  23. J2EE Application Scenarios • Stand-alone client

  24. J2EE Application Scenarios • Web-centric application

  25. J2EE Application Scenarios • Business-to-business

  26. J2EE Services and APIs • Java Message Service (JMS) • Implicit invocation • Communication is loosely coupled, reliable and asynchronous • Supports 2 models: • point-to-point • publish/subscribe

  27. JMS • Point-to-point • Destination is “queue”

  28. JMS • Publish-subscribe • Destination is “topic”

  29. J2EE Services and APIs • JNDI - Naming and directory services • Applications use JNDI to locate objects, such as environment entries, EJBs, datasources, message queues • JNDI is implementation independent • Underlying implementation varies: LDAP, DNS, DBMS, etc.

  30. J2EE Services and APIs • Transaction service: • Controls transactions automatically • You can demarcate transactions explicitly • Or you can specify relationships between methods that make up a single transaction

  31. J2EE Services and APIs • Security • Java Authentication and Authorization Service (JAAS) is the standard for J2EE security • Authentication via userid/password or digital certificates • Role-based authorization limits access of users to resources (URLs, EJB methods) • Embedded security realm

  32. J2EE Services and APIs • J2EE Connector Architecture • Integration to non-J2EE systems, such as mainframes and ERPs. • Standard API to access different EIS • Vendors implement EIS-specific resource adapters • Support to Corba clients

  33. J2EE Services and APIs • JDBC • JavaMail • Java API for XML Parsing (JAXP) • Web services APIs

  34. 3. EJB – a closer look

  35. Home Interface • Methods to create, remove or locate EJB objects • The home interface implementation is the home object (generated) • The home object is a factory

  36. Remote Interface • Business methods available to clients • The remote interface implementation is the EJB object (generated) • The EJB object acts as a proxy to the EJB instance

  37. Remoting in Java • Several possibilities: RMI/CORBA • RMI can use JRMP or IIOP as a transport protocol • Not pluggable – changes in the code are necessary Client Server Stub/Skeleton-Layer Stub Skeleton Remote Reference Manager Transport Layer

  38. EJB – The Big Picture

  39. EJB at runtime Client can be local or remote

  40. EJB at runtime

  41. Types of EJB New!

  42. Session Bean • Stateful session bean: • Retains conversational state (data) on behalf of an individual client • If state changed during this invocation, the same state will be available upon the following invocation • Example: shopping cart

  43. Session Bean • Stateless session bean: • Contains no user-specific data • Business process that provides a generic service • Container can pool stateless beans • Example: shopping catalog

  44. Entity Bean • Represents business data stored in a database  persistent object • Underlying data is normally one row of a table • A primary key uniquely identifies each bean instance • Allows shared access from multiple clients • Can live past the duration of client’s session • Example: shopping order

  45. Entity Bean • Bean-managed persistence (BMP): bean developer writes JDBC code to access the database; allows better control for the developer • Container-managed persistence (CMP): container generates all JDBC code to access the database; developer has less code to write, but also less control

  46. Message-Driven Bean • Message consumer for a JMS queue or topic • Benefits from EJB container services that are not available to standard JMS consumers • Has no home or remote interface • Example: order processing – stock info

  47. Example of EJB Application • It consists of number of clients accessing session beans and entity beans • Each Session bean provides specialized processing on behalf of client e.g. Travel Agent session bean makes travel reservations while Flight Scheduler bean schedules planes to fly on various routes. • Each Entity Bean represent different type of business entity. e.g.Passengers, seats, planes, flights are entity beans

  48. Example EJB Application

  49. JBoss- J2EE Product FIND OUT MORE ABOUT TODAY’S MOST SUCCESSFUL OPEN SOURCE- DEVELOPED PPLICATION SERVER

  50. What is Jboss? • Created in 1999, JBoss is the product of an OpenSource developer community dedicated to developing the best J2EE-compliant application server in the market • With 1000 developers worldwide and a steadily growing number of downloads per month, reaching 72,000 for October ’01 (per independent www.sourceforge.net), JBoss is arguably the most downloaded application server in the world today • Distributed under an LGPL license, JBoss is absolutely FREE for use. No cost. Period.

More Related