1 / 73

Chapter 8 - Web Application System Design

Chapter 8 - Web Application System Design. Modeling Web Application using UML Application Server Web Application Design. Modeling Web Application using UML. 8.1 - Modeling Web Application using UML. Modeling Web Pages Modeling EJB. Modeling Web Pages.

asabi
Télécharger la présentation

Chapter 8 - Web Application System Design

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. Chapter 8 - Web Application System Design • Modeling Web Application using UML • Application Server • Web Application Design

  2. Modeling Web Application using UML

  3. 8.1 - Modeling Web Application using UML • Modeling Web Pages • Modeling EJB

  4. Modeling Web Pages • For web pages, the stereotypes indicate that the class is an abstraction of the logical behavior of a web page on either theclient or the server. The two abstractions are related to each other with a directional relationship between the two. Thisassociation is stereotyped as «build», since it can be said that a server page builds a client page .

  5. Modeling Web Pages

  6. Modeling Web Pages

  7. Modeling Web Pages

  8. Modeling Web Pages

  9. Modeling Web Pages

  10. Modeling EJB • Modeling EJB as a subsystem • Two approach: • Standard UML-Java Mapping • Sun JSR-000026 UML/EJB Mapping

  11. Modeling EJB as a subsystem

  12. Modeling EJB as a subsystem ICustomerMgt  => CustomerHome (home interface)  Icustomer    => Customer (remote interface) <<subsystem proxy>>Customer   =>CustomerEJB (bean class) validateCustomer() => findUser() (in home interface)

  13. Modeling EJB as a subsystem

  14. Modeling EJB as a subsystem

  15. Modeling EJB as a subsystem

  16. Modeling EJB as a subsystem

  17. Standard UML-Java Mapping

  18. Sun JSR-000026 UML/EJB Mapping

  19. Application Server

  20. 8.2 - Application Server • Application Servers • J2EE Application Servers • Web Server and Application Server

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

  22. Application Servers • The In the 90' s, systems should be client- server

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

  24. Application Servers • " The Multi- tier applications" have several independent components • An application server provides the infrastructure and services to run such applications

  25. 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.)

  26. 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)

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

  28. Web Application Design

  29. 8.3 - Web Application Design • Application Layer • Business Layer • J2EE Multi-tier Model • J2EE Application Scenarios • Main Technologies • Examples • Case Study –Online Bank

  30. Application Layer

  31. Business Layer

  32. J2EE Multi-tier Model

  33. J2EE Application Scenarios • Multi-tier typical application

  34. J2EE Application Scenarios • Stand-alone client

  35. J2EE Application Scenarios • Web-centric application

  36. J2EE Application Scenarios • Business-to-business

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

  38. 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

  39. 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

  40. 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

  41. EJB – The Big Picture

  42. EJB at runtime Client can be local or remote

  43. EJB at runtime

  44. Types of EJB

  45. 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

  46. 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

  47. 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 • The Can live past the duration of client' s session • Example: shopping order

  48. 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

  49. 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

  50. Examples • JSP example • Servlet example • EJB example

More Related