Reusable Development Components from the Java(TM) 2 Platform, Enterprise Edition (J2EE(TM)) and Open Source Projects

titteringcluckΛογισμικό & κατασκευή λογ/κού

10 Νοε 2012 (πριν από 5 χρόνια και 4 μέρες)

248 εμφανίσεις

Session # 2645

Reusable Development
Components from the
Java(TM) 2 Platform,
Enterprise Edition (J2EE(TM))
and Open Source Projects

Rob Weaver

Architect

Quovera

Session # 2645

2

Overall Presentation Goal

or Primary Purpose

Building reusable development
components helps us decrease time
to market and increase software
quality.

Session # 2645

3

Learning Objectives


As a result of this presentation, you will

be able to:


Understand “real world” reusable component
development


Know about some of the strengths and
weaknesses of reusable code


Learn some best practices.



Session # 2645

4

Qualifications


Quovera (formerly Millennia Vision Corporation)


Founded in 1995 as “Millennia Vision Corporation (MVC)”


Strong High
-
Tech Industry Background


Profitable 5 Years Without Outside Funding


Experience


Consultants with 10+ years experience


Over 200 clients for whom we have completed over 300
projects


Differentiators


Architecture Technology Office (ATO)


Program Management Office (PMO)

Session # 2645

5

Qualifications



Rob Weaver is a Web Architect for Quovera


Member of Quovera’s Architecture and
Technology Office.


Proponent of the web since 1995 when he
joined Excite to become a webmaster.



Session # 2645

6

Qualifications


Will Andrews


Technical Director for Quovera


Member of Quovera’s Architecture and Technology
Office.


Has been web enabling applications since 1997 at
PricewaterhouseCoopers
.



Session # 2645

7

Reuse: the Holy Grail of software
development


We can be freed from making the same
mistakes over and over again, and happily
pursue finding entirely new ones.



Reuse is one of the benefits of an object
oriented language because OO is built
around it.


Session # 2645

8

Agenda


Introduction


Example of using reusable components


Design decisions and patterns


Reference Framework


Challenges


Summary


Q & A

Session # 2645

9

Reusable code


more design,
less development


Architecture and Technology Office Modeled
Systems (ATOM)


Reference Framework Architecture


Technologies


Reusable Components


Additional Services


Layers


Design Pattern Information Flow

Session # 2645

10

Reusable code


more design,
less development


Open Source projects


Open source components need to be well
understood


Design considerations


Keep framework lightweight


Components need to be flexible


Session # 2645

11

Open Source projects


Apache
(http://www.apache.org/)


Tomcat
(http://jakarta.apache.org/)


Struts
(http://jakarta.apache.org/)


JDOM
(http://www.jdom.org)


Netbeans
(http://www.netbeans.org/)

Session # 2645

12

Design considerations


Keep framework lightweight


Components need to be flexible


Open source components need to be well
understood

Session # 2645

13

Agenda


Introduction


Example of using reusable components


Design decisions and patterns


Reference Framework


Challenges


Summary


Q & A

Session # 2645

14

Eating our own dog food

Quovera Time and Accounting


Secure web
-
deployed time and expense (TimeX) reporting module


Mission
-
critical for a consulting company


Replace Excel solution


Easy to use


Leverages reusable components


Database design


Back
-
end PL/SQL utilities (email, user security, etc.)


Java classes


Fast


Light
-
weight client


High availability

Session # 2645

15

Design Decisions


JSP solution


Fulfills high
-
availability, fast, web
-
enabled
requirements


Base the system on Quovera ATOMS and
Reference Framework


A
rchitecture and
T
echnology
O
ffice
M
odeled
S
ystems


Uses Model
-
View
-
Controller architecture

Session # 2645

16

Model
-
View
-
Controller (MVC)


SmallTalk strategy recently promoted by
Sun


Model

= data and values, validation, ranges


View

= display


Controller

= what happens

when user interacts with

the component

M

C

V

Session # 2645

17

More on MVC


The MVC separation allows you to plug in different
front
-
end clients


Provides a separation in development, too


Model is driven by data design


Controller is driven by process design


View is driven by screen design


Different development skills for different styles of
presentation (application vs JSP)


Swing attempted this but ended up with a
separable
model architecture


View and Controller layer are merged

M

C

V

Session # 2645

18

Agenda


Introduction


Example of using reusable components


Design decisions and patterns


Reference Framework


Challenges


Summary


Q & A

Session # 2645

19

Reference Framework Architecture

Design Pattern Information Flow

View
View
Controller
Model
XML, Result Sets,
Data Objects
Session # 2645

20

Model
Relational Database,
XML Data Store
View
HTML, JavaScript,
Java Server Pages,
Servlets
View
Enterprise Java Beans,
Messaging-Oriented
Middleware, Java
Controller
Reference Framework Architecture

Technologies

Session # 2645

21

Model
User/Group Profiling,
Event Notification,
Messaging,
Business Rules,
Application Security
View
Display Elements,
XSL Transformation,
Custom Tag Libraries,
Common Web Servlet
View
Common Validation Rules,
ACL Modeled Security,
Session Handler,
Generic Page Processor
Controller
Reference Framework Architecture

Reusable Components

Session # 2645

22

Services
Java Mail,
DB Connection Pooling,
Generic Workflow,
Audit and Logging,
Job Scheduling,
External Security
Integration,
Data Driven Lookups,
JMS Messaging,
XML Message Broker,
JNDI Lookups
Reference Framework Architecture

Additional Services

Session # 2645

23

Reference Framework Architecture

Layers

Web Server
Application Server
Database Server
Technology
Reusable
Components
Services
Information
Flow
HTML,
JavaScript,
JSP, Servlets
EJB,
Message-Oriented
Middleware, Java
Relational
Database,
XML Data Store
Display Elements,
XSL Transformation,
Custom Tag Libraries,
Common Web Servlet
Common Validation
Rules,
ACL Modeled Security,
Session Handler,
Generic Page Processor
User/Group
Profiling,
Event Notification,
Messaging,
Business Rules,
Application Security
Java Mail, DB Connection Pooling, Generic Workflow, Audit and
Logging, Job Scheduling, External Secuity Integration, Data Driven
Lookups, JMS Messaging, XML Message Broker, JNDI Lookups
XML, Result Sets, Data Objects
Session # 2645

24

TimeX MVC Usage


Single servlet for
Controller

function


Business logic is provided by support
classes (Handlers)


Handlers use data objects (classes) to
interact with the database (
Model
)


Usually static methods to call a SQL
statement or database procedure


One handler per JSP


This supplies the
View


Session # 2645

25

Process Summary

Session # 2645

26

Process Summary

1.
Call servlet

2.
Gather request parameters, store session info

3.
Check privileges

4.
Get the proper handler

5.
Initialize the handler, validate if necessary

6.
Check the request action sent (
LOAD,
FORWARD,SAVE_FORWARD, SAVE_LOOP

7.
Get next handler if action is
FORWARD

or
SAVE_FORWARD

8.
Dispatch request to the proper JSP

Session # 2645

27

Struts Components and Request
Lifecycle


Session # 2645

28

TimeX User Interface


Login





Select a time period

Session # 2645

29

Enter Time


One day at a time

Session # 2645

30

Submit Time Report


Employee is done with report




Status changes to submitted






Approver must review and approve

Session # 2645

31

Expense Report


Follows similar flow up to the entry form

Session # 2645

32

Quovera Time and Expense Reporting
Requirements


Secure web
-
deployed time and expense
(TimeX) reporting module


Mission
-
critical for a consulting company


Replace Excel solution


Easy to use

Session # 2645

33

Quovera Time and Expense Reporting
Requirements


Leverages reusable components


Database design


Back
-
end PL/SQL utilities (email, user
security, etc.)


Java classes


Fast


Light
-
weight client


High availability

Session # 2645

34

Design Decisions


JSP solution


Fulfills high
-
availability, fast, web
-
enabled
requirements


Base the system on Quovera ATOMS and
Reference Framework

Session # 2645

35

Design Decisions


Utilize Open source components


Uses Model
-
View
-
Controller architecture


Model
-
View
-
Controller (MVC)


Model

= data and values, validation, ranges


View

= display


Controller

= what happens when user
interacts with the component

Session # 2645

36

TimeX MVC Usage


Single servlet for
Controller

function


Business logic is provided by support classes
(Handlers)


Handlers use data objects (classes) to
interact with the database (
Model
)


Usually static methods to call a SQL statement or
database procedure


One handler per JSP (
View)

Session # 2645

37

Agenda


Example of using reusable components


Design decisions and patterns


Reference Framework


Challenges


Summary


Q & A

Session # 2645

38

Challenges in utilizing the
framework


Client dictates technologies


Components often have dependencies


Some risk when compared to commercial
products

Session # 2645

39

Agenda


Introduction


Example of using reusable components


Design decisions and patterns


Reference Framework


Challenges


Summary


Q & A

Session # 2645

40

Summary


You are already using reusable
development components when you code in
Java !


Design patterns are more reusable than
components


Open source is useful and fun


Blah, blah, blah …

End

Session # 2645

41

Agenda


Introduction


Example of using reusable components


Design decisions and patterns


Reference Framework


Challenges


Summary


Q & A

Session # 2645

Session # 2645

43

Thank You !

http://www.quovera.com/

Corporate Headquarters

275 Shoreline Drive, Suite 520

Redwood City, CA 94065

Phone:

650
-
232
-
6300

Fax:

650
-
232
-
6301

Session # 2645