java - uml java xml
TRANSCRIPT
-
8/17/2019 Java - Uml Java XML
1/55
TS-641, Enterprise Application Development Using UML, Java, and XML1
Enterprise Application
Development Using UML,Java™ Technology and XML
Will HoweryCTOPassage Software LLC
-
8/17/2019 Java - Uml Java XML
2/55
TS-641, Enterprise Application Development Using UML, Java, and XML2
Introduction
• Effective management and modeling of
enterprise applications• Web and business-to-business applications
• Messaging environments
– Loosely coupled – Asynchronous
– Fault tolerant
• Java technology provides the descriptive language• XML provides the data representation
• UML provides the notational language
• Manage complexity for deploying n-tierenterprise applications
-
8/17/2019 Java - Uml Java XML
3/55
TS-641, Enterprise Application Development Using UML, Java, and XML3
Overview
• A process and examples for building UML
applications with XML messages throughmultiple distributed server containers
• Illustrate a complete UML design for n-tier
application web development• Implement a web based logon and user
profile application
• Utilizing – UML
– Java technology – XML DTD/schema definitions
-
8/17/2019 Java - Uml Java XML
4/55
TS-641, Enterprise Application Development Using UML, Java, and XML4
Tools
• Examples presented in UML using Rational
Rose with UML Factory• The examples will be implemented with
JAR components that can be deployed
into multiple configurations• UML Factory will generate, deploy, and
animate the examples through the UMLdiagrams
-
8/17/2019 Java - Uml Java XML
5/55
TS-641, Enterprise Application Development Using UML, Java, and XML5
Technologies
• UML:
– Unified Modeling Language will describe thestatic and dynamic behavior for applications
• XML:
– Extensible Markup Language describesdocument information for building pages andcarrying messages through the application tiers
• JSP™ components:
– JavaServer Pages™ technology-basedcomponents are used to define dynamicHTML interface pages
-
8/17/2019 Java - Uml Java XML
6/55
TS-641, Enterprise Application Development Using UML, Java, and XML6
Technologies
• XSL:
– Extensible Style Sheet language is used totransform the XML documents into dynamicHTML interface pages
• EJB™ specification – Enterprise JavaBeans™ specification is used
for data access and manipulation
• JMS:
– Java™ Message Service API provides anasynchronous fault tolerant messagingcapability between application tiers
-
8/17/2019 Java - Uml Java XML
7/55TS-641, Enterprise Application Development Using UML, Java, and XML7
Sample JSP™ Client to
J2EE™ Application Container
XML to JSP
conversions
Web
Server
JSP
Client
ejb
Container
HTTP
XML over RMI or IIOP
Session Bean
State Machine
Data
Base
JDBC
-
8/17/2019 Java - Uml Java XML
8/55TS-641, Enterprise Application Development Using UML, Java, and XML8
UML Model Overview
• Use Case Diagram
• Collaboration Diagram
• Class Diagrams
• State Diagrams• Activity Diagrams
• Deployment Diagram
-
8/17/2019 Java - Uml Java XML
9/55TS-641, Enterprise Application Development Using UML, Java, and XML9
Modeling the Application
• Use Case
– Use Case Diagrams define the high-levelinteractions between external actors and systemprocesses. The Use Case diagram must havean actor, an interaction, and a process
MainProcess
LogonProcessGPublic
SetProfile
Register
Logon
-
8/17/2019 Java - Uml Java XML
10/55TS-641, Enterprise Application Development Using UML, Java, and XML10
Alternate Implementations
• Realize
– The “realize” stereotype on a Use Caseinteraction defines alternate mechanismsfor implementing the same process
GPublic SetProfile
JSP Logon
(from JSP Implementation)
XSL Logon
(from XSL Implementation)
LogonProcess
Logon
-
8/17/2019 Java - Uml Java XML
11/55TS-641, Enterprise Application Development Using UML, Java, and XML11
User Artifacts
• Each interaction on a Use Case process
contains artifacts, these artifacts are tangibleattributes provided to the Actor or inputartifacts from the Actor to the process.
For a Logon: – UserName
– UserPassword
LogonProcess
Logon
GPublic
-
8/17/2019 Java - Uml Java XML
12/55TS-641, Enterprise Application Development Using UML, Java, and XML12
Collaboration Diagram
• Collaboration Diagrams define theimplementation for each Use Caseinteraction
LogonPage :
(Logical
UserValidation :
(Logical
TryAgain Page :
(Logical
FailPage :
(Logical
MainMenuPage :
(Logical
1: Submit
4: Retry
5: Submit 3: Fail
2: Good
-
8/17/2019 Java - Uml Java XML
13/55TS-641, Enterprise Application Development Using UML, Java, and XML13
Storyboard Interface Objects
• Storyboard interface objects identify userinput and output artifacts. These objects willidentify the types of artifacts used within thesystem for the Use Case interaction
LogonPage :
LogonPageSB
UserValidation :
(Logical
1: Submit
5: Submit 3: Fail
2: Good
TryAgain Page :
TryAgainSB
FailPage :
FailLogonSB
MainMenuPage :
MainMenuSB
4: Retry
LogonPageSB
UserNameLabel : Label = User Name:
UserName : Edit = UserName
PasswordLabel : Label = Password:
Password : Password = UserPassword
Hidden1 : Hidden = SomeField
rule : rule = LogonValidation event=logoSubmit : link = Submit
-
8/17/2019 Java - Uml Java XML
14/55TS-641, Enterprise Application Development Using UML, Java, and XML14
Decision Control Process
Flow Objects• Through the Collaboration diagram choices
or decisions are made directing the diagramflow. Control process flow objects define thedomain logic class specifications that willgovern these decisions
LogonPage :
LogonPageSB
UserValidation :(Logical
1: Submit
5: Submit 3: Fail
2: Good
TryAgain Page :
TryAgainSB
FailPage :
FailLogonSB
MainMenuPage :
MainMenuSB
4: Retry
Decision Object
-
8/17/2019 Java - Uml Java XML
15/55TS-641, Enterprise Application Development Using UML, Java, and XML15
LogonPageSB
UserNameLabel : Label = User Name:
UserName : Edit = UserName
PasswordLabel : Label = Password:
Password : Password = UserPassword
Hidden1 : Hidden = SomeField
rule : rule = LogonValidation event=logoSubmit : link = Submit
Events
• Collaboration Diagram events show the
linking between various collaborationdiagram objects
LogonPage :LogonPageSB
UserValidation :
(Logical
1: Submit
5: Submit 3: Fail
2: Good
TryAgain Page :TryAgainSB
FailPage :FailLogonSB
MainMenuPage :
MainMenuSB
4: Retry
-
8/17/2019 Java - Uml Java XML
16/55TS-641, Enterprise Application Development Using UML, Java, and XML16
LogonPageSB
UserNameLabel : Label = User Name:
UserName : Edit = UserName
PasswordLabel : Label = Password:
Password : Password = UserPasswordHidden1 : Hidden = SomeField
rule : rule = LogonValidation event=logoSubmit : link = Submit
Storyboard Class
Specifications• The storyboard class specification identifies
the ordered set of artifacts and events thatthis storyboard object element will contain
Artifacts
-
8/17/2019 Java - Uml Java XML
17/55TS-641, Enterprise Application Development Using UML, Java, and XML17
HTML Pages
• Each storyboard class specification is linked
to an HTML page that will be processed tocreate the XSL or JSP interface definition
-
8/17/2019 Java - Uml Java XML
18/55TS-641, Enterprise Application Development Using UML, Java, and XML18
HTML Pages
• The HTML pages will contain tokens
identifying the XML abstract semanticnames representing the use caseartifacts coming and going from the
control process flow
-
8/17/2019 Java - Uml Java XML
19/55TS-641, Enterprise Application Development Using UML, Java, and XML19
XML DTD/Schema Modeling
• Modeling the XMLschema information
within UML provides avisual representation ofthe XML documentsstructure. The modeledXML document also
provides runtimeinformation and modeltime checking forcollating the use caseartifacts with the XML
elements – Sample CompanyPerson XML relatingto the LogonPage
logonFormToPersonCtlUserName = PersonCtlUserName
Password = PersonCtlPassword
LogonPageDTD
getXML_PersonCtlPersonId()
getXML_PersonCtlFirstName()
getXML_PersonCtlMiddleName()
getXML_PersonCtlLastName()
getXML_PersonCtlUserName()
getXML_PersonCt lPassword()
getXML_UserName() getXML_Password()
getXMLMapPersonCtl()
getXMLMapLogonPageSB()
PersonCtl
PersonId : Integer
FirstName : String
MiddleName : String
LastName : String
UserName : String
Password : String
(from DataAccess)
LogonPageSB
UserNameLabel : Label = User Name:
UserName : Edit = UserName
PasswordLabel : Label = Password:Password : Password = UserPassword
Hidden1 : Hidden = SomeField
rule : rule = LogonValidation event=logo
Submit : link = Submit
(from StoryBoardObjects)
-
8/17/2019 Java - Uml Java XML
20/55TS-641, Enterprise Application Development Using UML, Java, and XML20
XML Mappings
• UML Factory provides an abstract mapping
between XML elements and semantic names.These Mappings allow isolation between thearbitrary physical representation of a data element,and a logical name or handle to access and
manipulate that element – Semantic Names
• Semantic Names identify abstract textual identifiers forelements, or attributes, within the XML document
– XML Element Mappings
• XML element mappings identify the arbitrary physical XMLelement definition. The XML mappings identify XML text,
cardinality, attributes, and schema information
-
8/17/2019 Java - Uml Java XML
21/55TS-641, Enterprise Application Development Using UML, Java, and XML21
XML Mapping Example
• Generated semantic mappings to sample
Company Person XML mXMLMaptestDTD = new XMLMap(); mXMLMaptestDTD.addMapping("TestXML", "xml"); mXMLMaptestDTD.addMapping("XmlName", "xml/name"); mXMLMaptestDTD.addMapping("Company", "xml /company"); mXMLMaptestDTD.addMapping("CompanyName", "xml/company#name"); mXMLMaptestDTD.addMapping("CompanyCity", "xml/company#city"); mXMLMaptestDTD.addMapping("Person", "xml/company* /person"); mXMLMaptestDTD.addMapping("FirstName", "xml/company/person#fname"); mXMLMaptestDTD.addMapping("LastName", "xml/company/person#lname");
-
8/17/2019 Java - Uml Java XML
22/55TS-641, Enterprise Application Development Using UML, Java, and XML22
XML Mappings to
“JSP™
tags”• The token semantic names within the HTML
page associate with storyboard classspecifications are substituted with methodsto extract semantic data from the XML
document representing the Storyboardinterface object
-
8/17/2019 Java - Uml Java XML
23/55TS-641, Enterprise Application Development Using UML, Java, and XML23
XML Mappings to XSL tags
• In like manner, the token semantic names
within the HTML page associated withstoryboard class specifications are replacedwith XSL syntax to transform the XML
document representing the Storyboardinterface object
-
8/17/2019 Java - Uml Java XML
24/55TS-641, Enterprise Application Development Using UML, Java, and XML24
Storyboard Events
• The storyboard class specification objects
contain events that will fire into theapplication, transitioning through thedesigned collaboration diagrams
– If the target object of a collaboration diagramevent is another interface element then thatstoryboard interface element will be displayed
– If the target object is a decision point then theclass specification defined for that decision logicwould be sent the event through the UML statemachine implementation
-
8/17/2019 Java - Uml Java XML
25/55TS-641, Enterprise Application Development Using UML, Java, and XML25
LogonPageSB
UserNameLabel : Label = User Name:
UserName : Edit = UserName
PasswordLabel : Label = Password:
Password : Password = UserPasswordHidden1 : Hidden = SomeField
rule : rule = LogonValidation event=logoSubmit : link = Submit
Storyboard Events
• The Logon Page Submit link event
LogonPage :
LogonPageSB
UserValidation :
(Logical
1: Submit
5: Submit 3: Fail
2: Good
TryAgain Page :
TryAgainSB
FailPage :
FailLogonSB
MainMenuPage :
MainMenuSB
4: Retry
-
8/17/2019 Java - Uml Java XML
26/55
TS-641, Enterprise Application Development Using UML, Java, and XML26
Collaboration Decisions
• Decisions are implemented by UML logical classes
LogonValidation
MaxTries : int = 3
CurrentTries : int
Validated : boolean
SubmitValidate(theWidl : Widl) : v oid
LogonValidation() : void
setMaxTries(aMaxTries : int) : void
getMaxTries() : int
setCurrentTries(aCurrentTries : int) : void
getCurrentTries() : int
setValidated(aValidated : boolean) : void
getValidated() : boolean
inWidl(theWidl : Widl) : boolean
isValid() : boolean
isMaxAttempts() : boolean
GoodGood(theWidl : Widl) : v oid
FailFail(theWidl : Widl) : v oid
RetryRetry (theWidl : Widl) : v oid
DoneEnd(theWidl : Widl) : v oid
setPersonCtl(aPersonCtl : PersonCtl) : v oid
getPersonCtl() : PersonCtl
LogonPage :
LogonPageSB
UserValidation :
(Logical
1: Submit
5: Submit 3: Fail
2: Good
TryAgain Page :
TryAgainSB
FailPage :
FailLogonSB
MainMenuPage :
MainMenuSB
4: Retry
-
8/17/2019 Java - Uml Java XML
27/55
TS-641, Enterprise Application Development Using UML, Java, and XML27
Control Process
Flow Class Specification• The control process flow class specification
provides the logical implementation makingdecisions through the use case collaborationprocess. The UML control process flow stereotypedclass specification is generated into Java™ source
code with all the static and dynamic behaviorrequired for:
– Receiving input events
– Managing persistent data – Manipulating Interface XML documents
– Returning information to the process
– Maintaining state information of the application
-
8/17/2019 Java - Uml Java XML
28/55
TS-641, Enterprise Application Development Using UML, Java, and XML28
Receiving Events
• When a user activates an event from an
interface object, that event is sent into thestate machine. All information coming intothe state machine is contained within an XML
document
-
8/17/2019 Java - Uml Java XML
29/55
TS-641, Enterprise Application Development Using UML, Java, and XML29
Control Process
Class State MachinesStart
End
Validate
Retry
Fail
Good
Done[ Continue ]
Done[ Continue ]
Done[ Continue ]Se ts Widl Return
results="Retry"
Sets Widl Return
results="Good"
Sets Widl Return
resul ts=" Fai l"
Good[ isValid() ]
Fail[ i sMaxAttempts() && !i sValid( ) ]Retry[ !i sMaxAttem pts() && !isVali d() ]
SubmitLogonValidation
MaxTries : int = 3
CurrentTries : intValidated : boolean
SubmitValidate(theWidl : Widl) : v oid
LogonValidation() : void
setMaxTries(aMaxTries : int) : void
getMaxTries() : int
setCurrentTries(aCurrentTries : int) : void
getCurrentTries() : int
setValidated(aValidated : boolean) : void getValidated() : boolean
inWidl(theWidl : Widl) : boolean
isValid() : boolean
isMaxAttempts() : boolean
GoodGood(theWidl : Widl) : v oid
FailFail(theWidl : Widl) : v oid
RetryRetry (theWidl : Widl) : v oid
DoneEnd(theWidl : Widl) : v oid
setPersonCtl(aPersonCtl : PersonCtl) : v oid getPersonCtl() : PersonCtl
-
8/17/2019 Java - Uml Java XML
30/55
TS-641, Enterprise Application Development Using UML, Java, and XML30
WIDL
• WIDL is a Web Interface Definition Language specification
– The WIDL contains an event, process, and structured recordsdefining behavior and data together within a single XMLdocument package
– Event or Method
• The method described within the WIDL is the event name cominginto the state machine
– Process
• The WIDL process attribute identifies the executable Java classthat will receive the WIDL and respond to the method event. The
process name can be a fully qualified Java class or an abstractobject name. Containers receiving the WIDL input from eithersession beans, JMS messaging Queue implementations etc., musthave a mechanism to late bind the WIDL event to the correctprocess
-
8/17/2019 Java - Uml Java XML
31/55
TS-641, Enterprise Application Development Using UML, Java, and XML31
WIDL Records
The WIDL contains three records for input information, outputinformation and return information. These records can be populated
with attributes or complete XML documents• Input Record
– Our example for the Web application will use the input record to containinformation coming from the Web interface into the
process logic• Output Record
– The example WIDL use the output record of the WIDL to containReturn Page or XML document information back to the Web interface
• Return Record – The WIDL return record contains results information for evaluating
decisions to the collaboration process flow. The result Attribute withinthe WIDL Return record contains the return events from the controlprocess flow class specification
-
8/17/2019 Java - Uml Java XML
32/55
TS-641, Enterprise Application Development Using UML, Java, and XML32
State Machines
• State machines define the possible events coming
into a dynamic class and the state transitions forthose events. The state machine diagram providesa readable definition of the dynamic behavior for agiven class specification
LogonPage :
LogonPageSB
UserValidation :
(Logical
1: Submit
5: Submit 3: Fail
2: Good
TryAgain Page :
TryAgainSB
FailPage :
FailLogonSB
MainMenuPage :
MainMenuSB
4: Retry
Start
Validate
Retry
Fail
Good
Done[ Continue ]
Done[ Con
Done[ Continue ]Sets Widl Return
results="Retry"
Sets Widl Return
results="Good"
Good[ isVal id() ]
Fail [ i sMaxAttempts() && !i sValid( ) ]Retry[ !isMaxAttempts() && !isValid() ]
Submit
-
8/17/2019 Java - Uml Java XML
33/55
TS-641, Enterprise Application Development Using UML, Java, and XML33
States and Transitions
• States
– States define the process stops through thestate machine
• Event Transitions
– Transitions define the event causing a transitionfrom one state to another state
• Event State Methods
– Event state methods are the implied actionbehaviors when an event transition occurs.These event state methods are implemented
through UML activity diagrams
-
8/17/2019 Java - Uml Java XML
34/55
TS-641, Enterprise Application Development Using UML, Java, and XML34
State Diagram Elements
Start
Validate
Retry
Fail
Good
Done Continue
Done[ Continue ]
Se ts Widl Return
Sets Widl Return
results="Good"
Goo d[ isVa lid() ]
Fail [ isMaxAttempts() && !i sValid( ) ]Retry[ !isMaxAttempts() && !isVal id() ]
Submit
Event Transition
Event State Method
State
-
8/17/2019 Java - Uml Java XML
35/55
TS-641, Enterprise Application Development Using UML, Java, and XML35
State Timing
• Guard Conditions
– Guard conditions imply a synchronous transition exiting agiven state. The guard conditions contain boolean logic todetermine which exit transition will be traversed
• Asynchronous
– Asynchronous events have no guard conditions and aretriggered from some external source. That source istypically a user interface link artifacts
• Synchronous – Synchronous events transition automatically and internal
to the state machine. Synchronous eventsare identified as exit events from a state containing guard
conditions
-
8/17/2019 Java - Uml Java XML
36/55
TS-641, Enterprise Application Development Using UML, Java, and XML36
Transition Timing Example
Start
Validate
Retry
Fail
Good
Done Continue
Done[ Continue ]
Se ts Widl Return
Sets Widl Return
results="Good"
Goo d[ isVa lid() ]
Fail [ isMaxAttempts() && !i sValid( ) ]Retry[ !i sMaxAttempts() && !isValid() ]
Submit
Asynchronous Transition
Synchronous Guarded Transition
-
8/17/2019 Java - Uml Java XML
37/55
TS-641, Enterprise Application Development Using UML, Java, and XML37
Setting Animation Points
• Within the state machine any transition can be
identified within the UML diagram as an animationpoint. When the application is executed the UMLdocument will be displayed selecting the animationlocation
Start
Validate
Retry
Fail
Good
Sets Widl Return
results="Good"
Goo d[ isVa lid() ]
Fail [ isMaxAttempts() & & !i sValid() ]Retry[ !isMaxAttempts() && !isVal id() ]
Submit
Animation Point
-
8/17/2019 Java - Uml Java XML
38/55
TS-641, Enterprise Application Development Using UML, Java, and XML38
Activity Diagrams
• Activity Diagrams implement the behavior of
algorithms for UML class specificationmethods
S t a r t
V a l i d a t e
Ret ry
F a i l
G o o d
D o n e [ C o n t i n u e ]
D o n e [ C o n t i n u e ]
D o n e [ C o n t i n u e ]S e ts W i d l R e t u r n
resu l t s= "Re t ry "
S e t s W i d l R e t u r n
r e s u l t s = " G o o d "
G o o d [ is V a l i d () ]
F a i l [ i sM a x A t t e m p t s () & & ! i sV a l i d ( ) ]R e t r y [ !i sM a x A t t e m p t s( ) & & ! i sV a l i d ( ) ]
S u b m i t
Event State Method
UML Obj t
-
8/17/2019 Java - Uml Java XML
39/55
TS-641, Enterprise Application Development Using UML, Java, and XML39
UML Object
Navigation Notation• Activity Diagrams are represented in UML Object
Navigation Notation. This notation manipulates theobjects with their public attributes and methods.Using the object notation and Activity Editor withinUML Factory you can define the complete behavior
for a method implementation
sUserName = theWidl.getInputParameter( "UserName" )sPassWord = theWidl.getInputParameter( "Password" )this.setValidated( false )
-
8/17/2019 Java - Uml Java XML
40/55
TS-641, Enterprise Application Development Using UML, Java, and XML40
Designing an Activity
-
8/17/2019 Java - Uml Java XML
41/55
TS-641, Enterprise Application Development Using UML, Java, and XML41
Accessing a Data Base
• Through the activity diagram
implementations we can manipulate ourdatabase objects, defining the operations forall our database elements as required
aPerson.PersonCtl( )
aPerson.setFirstName( sUserName )aPerson.setPassword( sPassWord )this.setValidated( aPerson.load( ) )
-
8/17/2019 Java - Uml Java XML
42/55
TS-641, Enterprise Application Development Using UML, Java, and XML42
Manipulating XML
• Within the activity diagrams we also definethe XML manipulation for retrieving andbuilding the XML documents going betweenthe process flow logic and user interfaceelementssValue= new String( "PassageSoftware" );
aXMLMap.insert( this.getXML_CompanyName( ), sValue );sValue= new String( "Richmond, VA" );aXMLMap.insert( this.getXML_CompanyCity( ), sValue );
aXMLMap.insert( this.getXML_Person_NODE( ), null );sName= new String( "Dick" );
sLName= new String( "Douglas" );aXMLMap.insert( this.getXML_FirstName( ), sName );aXMLMap.insert( this.getXML_LastName( ), sLName );
-
8/17/2019 Java - Uml Java XML
43/55
TS-641, Enterprise Application Development Using UML, Java, and XML43
Intelligent Advisor Code view
• The UML Factory Intelligent Adviser allowsus to view the code generation results while
designing the UML activity diagrams
-
8/17/2019 Java - Uml Java XML
44/55
TS-641, Enterprise Application Development Using UML, Java, and XML44
Setting Animation Points
• Any activity within the activity diagrams canalso have animation points defined. When
the application is executing the activitydiagram will display and select the activitieswith animation settings
Animation Points
-
8/17/2019 Java - Uml Java XML
45/55
TS-641, Enterprise Application Development Using UML, Java, and XML45
Generating the Application
• After the static and dynamic elements of our
application are defined we can organizethese elements into UML ComponentDiagrams to define deployment definitions.
From the components definitions we canthen generate the complete Java class code,compile the code and package it into the
appropriate application JAR
Collaboration Diagram
-
8/17/2019 Java - Uml Java XML
46/55
TS-641, Enterprise Application Development Using UML, Java, and XML46
Collaboration Diagram
XML Generation• The collaboration diagram information for
our use case definitions is also generatedinto an XML description document identifyingthe interface elements, XML mappings, and
control process flow information. This XMLdocument then becomes the basis forexecution through the application
– The XML document defines the process flowthrough the application
– The engine that iterates the collaborationdiagram XML document was also designed
and generated from a UML model
Control Process
-
8/17/2019 Java - Uml Java XML
47/55
TS-641, Enterprise Application Development Using UML, Java, and XML47
Control Process
Flow Generation• Dynamic behavior represented within an
application is designed within a controlprocess flow class specification. Thefollowing sections will briefly illustrate the
generation processing capabilities fordynamic behavior within a UML environment.The following code examples were
completely generated from the UML model
Generating the UML
-
8/17/2019 Java - Uml Java XML
48/55
TS-641, Enterprise Application Development Using UML, Java, and XML48
Generating the UML
Class Specification• Looking at the State Machine implementation
– Current State
– Incoming Event
– Synchronous Transitions
– Asynchronous Transitions
– Start and End States• Packages, imports, declarations
– Java package specifications can be explicitly or implicitlydefined by the class locations within the UML model
• Association and Attribute implementations – Association implementations generate both the container
and access methods for the stereotyped association.The type of container and resulting access methods
are defined by the stereotype applied to theassociation between class specifications
-
8/17/2019 Java - Uml Java XML
49/55
TS-641, Enterprise Application Development Using UML, Java, and XML49
Method Implementation
• Activity Diagram Method Implementations
– Activity diagrams are generated following the UML ObjectNotation. The activity generation can be viewed with eitheras a fully generated class or using the Intelligent Advisor codewindow
• Round Trip engineering
– Roundtrip engineering allows developers to hand edit codegenerated from the UML Diagram. By Identifying elementswhich have been hand edited, the UML Factory generator willleave the method implementation as edited without forward
generating from the model. The developer controls thegranularly of roundtrip engineering
• UML Model Animation code
– Animation points placed within the code can be turnedoff for individual points, the entire model being generated,and also ignored, from run time configuration properties
-
8/17/2019 Java - Uml Java XML
50/55
TS-641, Enterprise Application Development Using UML, Java, and XML50
Executing the Architectures
• The following demonstrations will walk
through executing the various architecturesfrom the complete components on differenttypes of application servers
Sample JSP™ Client to
-
8/17/2019 Java - Uml Java XML
51/55
TS-641, Enterprise Application Development Using UML, Java, and XML51
Sample JSP™ Client to
J2EE™ Application Container
XML to JSP
conversions
Web
Server
JSP
Client
ejb
Container
HTTP XML over RMI or IIOP
Session Bean
State M achine
Data
Base
JDBC
Using the Java™ Message Service
-
8/17/2019 Java - Uml Java XML
52/55
TS-641, Enterprise Application Development Using UML, Java, and XML52
Using the Java™ Message Service API (JMS) for Communications
HTML
Client
Web
Server
XML/XSL to HTML
Conversion
JMS Message
Que
EJB
Container
Session Bean
State Machine
Data
Base
HTTP
Publish/Subscribe XML ObjectPublish/Subscribe XML Object
EJB/JDBC
-
8/17/2019 Java - Uml Java XML
53/55
TS-641, Enterprise Application Development Using UML, Java, and XML53
Summary
• This concludes the presentations and
demonstrations for building n-tier enterpriseapplications with UML and XML datarepresentations
• The demonstrations have illustrated the abilityto completely model both static and dynamicapplication behavior within a UML model
• The UML model also defined components and
deployment into multiple configurations• The modeled demonstration illustrated the ability to
use the same components within different J2EE™
platform-enabled implementations on multiplearchitectural environments
Enterprise Development
-
8/17/2019 Java - Uml Java XML
54/55
TS-641, Enterprise Application Development Using UML, Java, and XML54
Enterprise Development
Benefits• Enterprise computing can improve the software
development process by combining thedescriptive power of the UML notation, andthe flexible data representation and distributioncapabilities of XML with the object oriented,
network, and portable capabilities of Javatechnology
• Combining these technologies enables
organizations to manage components increasingreuse, visibility, and implementationunderstanding; effectively reducing thecomplexity and total cost of ownership for
deploying n-tier enterprise applications
-
8/17/2019 Java - Uml Java XML
55/55