Copyright © 2002 Systek [email protected] Workshop SCEA for J2EE.

26
Copyright © 2002 Systek AS brodwall Workshop SCEA for J2EE

Transcript of Copyright © 2002 Systek [email protected] Workshop SCEA for J2EE.

Page 1: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Workshop SCEA for J2EE

Page 2: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Goals

• Look through the information needed for the certification

• Discuss questions for part I and problems for part II• Evaluate the presenter’s approach to part II

Page 3: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

SCEA Del I

• Common architectures• Legacy Connectivity• Enterprise JavaBeans• Enterprise JavaBeans Container Model• Protocols• Applicability of J2EE• Design Patterns• Messaging• I18N• Security

Page 4: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

SCEA Del II

• Create UML diagrams• Sequence or collaboration• Class• Component

• For Use Cases• Prepare Itinerary• Change Itinerary• Price Itinerary• Pay for Itinerary

Page 5: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Common Architectures

• Non-functional attributes• Reliability• Availability• Scalability• Extensibility• Maintainability

• Application architecture• Single tier/standalone• Two tier/client server• Multi-tier (web or three-tier)

Page 6: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Legacy Connectivity

• CORBA (RMI-IIIOP)• Mainframe (Screen scraping or object mapping)• JNI• XML• Advantages and drawbacks

Page 7: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

EJB

• Bean consists of one class and two interfaces• Home and remote interface

• Methods to be used are defined in remote and class• Local EJBs versus Remote EJBs• Transactions (ACID)

Page 8: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Services provided by the container

• Security• Persistence (for Entity Beans)• Life Cycle Management (know these)• Transaction monitoring• Pooling

Page 9: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Protocols

• HTTP (connection-oriented, session-less, easy to get through firewalls, default port 80)

• HTTPS (connection-oriented, session-oriented, somewhat easy through firewalls, secure, default port 443)

• JRMP (Procedure-calls, hard to get through firewalls, default port 1099)

• IIOP (CORBA, cannot marshal “behaviour” only state)

Page 10: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Applicability of J2EE

• Large-scale• Transactional!• Security• Heterogeneous

• Not always applicable!• Especially not EJBs!

Page 11: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Design Patterns

• Know the intent of all patterns• Creational

• Factory Method, Abstract Factory, Builder, Prototype, Singleton

• Structural• Adapter, Bridge, Composite, Decorator, Façade,

Flyweight, Proxy• Behavioral

• Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor

Page 12: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Messaging

• What is the difference between Asynchronous and Synchronous communication (in general)?

• “Queue” vs “Topic”• Queue: Point-to-Point (one receiver per message)• Topic: Publish subscribe (many receivers per message)

• Common usage (workflow processes, events (e.g. ticker), integration)

• Disconnected usage• Transactional queues

Page 13: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Internationalization

• Data input/output• Data formatting• Localizing content and presentation

Page 14: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

I18N (cont)

• Typical question: What must be internationalized?• (Usually: All of the above)• Messages to users, number/date formatting, currencies,

images (icons), sounds and other data• (Depends upon how far you’re moving)

• Typical question: What features of Java support I18N?• Unicode (char and String), Conversion (Reader and Writer

classes), Formatting and Collation (java.text.*), ResourceBundles.

• The role of the Locale class

Page 15: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Security

• Security concepts• Authentication• Authorization• Confidentiality

• Digital signatures and encryption technology• Certificates (PKI)

Page 16: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Security (cont)

• Java Security/trust model• What is applet signing (how does it work?)• What can an applet do/not do/do when signed?

• Firewalls• Packet filter• Application-level proxy• Stateful packet inspection

Page 17: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

What to expect on the exam

• Many “scenario questions”• The customer suggested this, is that a good idea?

What problems arise?• How is EJBs applicable here?• Many EJB tricky questions

• Some “what is the job of the architect”• Always: To produce the system that the customer

needs!!

Page 18: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

SCEA for J2EE part II

• Fly-by-Night• Integrated with payment backend• Integrated with Frequent Flyer backend• Web front-end for e-commerce orders• Somewhat weird use-cases

Page 19: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Use Case Overview

User

System

Find Itineraries

Display flight options

Select flight

Display seating options

Database TransMaster Frequent Flyer Subsystem

Find destination flight candidates

find free seats

Select seatreserve seat

Present payment options

get credit cards

get milage

Select payment option

[itinerary to be paid with credit card] Authorize transaction

[itinerary to be paid with miles] Spend miles

confirm seat reservation

update itinerary

Display and email confirmation

Find destination flight candidates

The seat is reserved onlyfor the time the HTTPsession is alive. After thesession times out, thereservation is rolled back.If the user later continues,the system will attempt tore-reserve the seat beforeforcing the user to chooseanother seat

create itinerary

Page 20: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Example Screenshot

Page 21: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Page 22: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Some questions

• How many destinations should be supported in one itinerary?

• Should Itineraries be stored in the DB before they are paid? If not, where?

• Should seats be reserved before an itinerary is paid?• (When should seats be reserved?)

• Should a user be able to change itinerary after he has paid?

Page 23: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Weird Use Case: Change Itinerary

• After the original is paid?• Should original be refunded?• What if creating new or refunding old fails?

Page 24: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Other questions:

• How much detail? (Fowler “Specification Level”)• What to put in the class diagram (Home, Remote

interfaces? Value Object classes)• What to put in the component diagram?

Page 25: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Example Component diagram:«JSP»

ItinerarySearch

«JSP»SearchResult

Selection

«JSP»SeatSelection

View

«JSP»ItineraryView

«JSP»PaymentView

«servlet»ItinerarySearch

Controller

«servlet»ItinaryControll

er

«servlet»SeatSelection

Controller

«servlet»PaymentContr

oller

«stateless»CustomerServ

ice

«stateless»ItineraryService

«entity»Itinery

«entity»Flight

TransMeta -credit card

IPayment

«data-access»FlightDataAcc

essObject

«data-access»ItineraryDataAccess

Object

«data-access»SegmentDataAccessObject

«data-access»CustomerDataAccessObject

«stateless»ItineryPayment

FrequentFlyerSubsystem

IPayment

«JSP»LoginView

«servlet»LoginControll

er

«servlet»CreateCustomerController

«JSP»CreateCustom

erView

Page 26: Copyright © 2002 Systek ASbrodwall@systek.no Workshop SCEA for J2EE.

Copyright © 2002 Systek AS [email protected]

Some links

• http://groups.yahoo.com/group/scea_j2ee/• http://groups.yahoo.com/group/scea_j2ee/files/SCE

A-Nutshell/• http://groups.yahoo.com/group/scea_j2ee/files/SCE

A%20Quick%20Reference.doc• http://suned.sun.com/US/certification/java/java_archj

2ee.html