Summary

 < Free Open Study > 



Application design is an important facet of software development and is often neglected because of the ever-decreasing timescales of Internet development and time-to-market. Including time in the development process to perform design will ultimately save time in the long term. While it is very easy to put together a web application representing the business needs of a company, the lack of good design will result in an application that is expensive to maintain and extend.

We've covered two common architectures for building web applications in this chapter:

  • Model 1 - page-centric

  • Model 2 - programming-centric

During our discussion of these two architectures, we looked at the typical implementation strategies along with some of their characteristics, including:

  • Maintainability - how easy it is to keep the application running smoothly

  • Extensibility - the ease with which we can add new functionality to the system

  • Security

We then introduced some of the other J2EE components into the picture and this lead us to a discussion about how to partition functionality within the web application.

Following this we looked more closely at application design. We considered how designs are documented, introducing the concept of a design pattern, and the J2EE patterns catalog.

We then moved on to look at how a simple discussion forum application could be built using a Model 1 architecture. This was approached without any design consideration and subsequently we found some problems with authentication and duplication of business logic - both of which were intermingled within the view components - which adversely affect maintainability, extensibility and reusability.

Following on from this, we took a step back and looked at designing the application using a Model 2 architecture which makes use of a handful of J2EE patterns:

  • Front Controller

  • Intercepting Filter

  • View Helper

  • Service to Worker

We explored the purpose of these patterns and looked at how they are useful when we design our discussion forum to maximize maintainability, extensibility, and reusability During this we looked at some of the implementation strategies for these patterns and presented a new implementation for our example application.

In the next chapter we will look at how we can optimize and scale web applications effectively.

A

action classes

  • Apache Struts framework, 33

  • command and controller strategy, 29

Apache Struts framework

  • front controller pattern improvement, 33

application design

  • components, 3

  • considerations, 2

  • documentation principles, 8

    • design patterns, 8

    • J2EE patterns catalog, 9

    • patterns, reasons for using, 9

  • extending, Model 1 architecture used, 25

  • importance of good design, 1

  • J2EE web application design, 3

  • Model 1 architecture, introduction, 3

  • Model 2 architecture, introduction, 5

  • refactoring applications, 26

architectures

  • Model 1 introduction, 3

  • Model 2 introduction, 5

  • Model-View-Controller, 5

  • page-centric, 4

authentication scriptlet

  • Model 1 architecture, used in, 24

authorization

  • protecting data, 25

C

class model

  • entities, mapped to, 10

  • web based discussion forum, 10

command and controller strategy

  • action classes, 29

  • adding response, 36

  • communicating request type, 30

  • deleting response, 37

  • front controller pattern, 29

  • processing login, 35

  • processing response, 36

  • viewing response, 34

components

  • controller component, 5

  • entity beans, 7

  • roles in Model 2 architecture, 8

  • session beans, 8

  • View Helper component, 41

  • web application components, 3

controller component

  • building Model 2 discussion forum, 26

  • communicating request type, 30

  • Model-View-Controller architecture, 5

D

design patterns

  • application design documentation, 8

design see application design.

discussion forum, web based

  • application requirements, 9

  • class model, 10

  • entities, 10

  • Model 1 architecture, building using, 15–26

  • Model 2 architecture, building using, 26–46

  • Posting class code, 12

  • Response class code, 14

  • Topic class code, 13

  • Topics class, 15

  • User class code, 11

  • user interface, building, 15

E

entities

  • class model mapped to, 10

  • web based discussion forum, 10

entity beans

  • web application components, 7

extensibility

  • application design, 2

  • Model 1 architecture, 4

  • Model 2 architecture, 6

F

filters

  • intercepting filter, 37

Front Controller pattern

  • Apache Struts framework, 33

  • command and controller strategy, 29

  • implementing, example, 28

  • Model 2 architecture, 27

  • particular area of development, 45

FrontController servlet

  • mapping to URI/controller/*, 30

H

helper components

  • View Helper pattern, 41

home page, discussion forum

  • Model 1 architecture, 15

I

Intercepting Filter pattern

  • implementing, 39

  • Model 2 architecture, 37

  • particular area of development, 45

  • user verification, 38

J

J2EE (Java 2.0 Platform Enterprise Edition)

  • web application design, 3

J2EE components see components.

J2EE patterns catalog

  • application design documentation, 9

  • web site, 9

J2EE patterns see patterns.

L

login, command and controller strategy

  • processing in discussion forum, 35

login, Model 1 architecture

  • anonymous responses in discussion forum, 17

  • processing in discussion forum, 18

M

maintainability

  • application design, 2

  • Model 1 architecture, 4

  • Model 2 architecture, 6

Model 1 (page-centric) architecture

  • adding response in discussion forum, 21

  • authentication scriptlet, 24

  • building web based discussion forum, 15–26

  • deleting response in discussion forum, 22

  • extending the application, 25

  • extensibility, 4

  • home page, discussion forum, 15

  • introduction, 3

  • login page, discussion forum, 17

  • login processing, discussion forum, 18

  • maintainability, 4

  • page flow of discussion forum, 23

  • processing response in discussion forum, 22

  • security, 4

  • viewing responses in discussion forum, 19

Model 2 (programming-centric) architecture

  • adding response in discussion forum, 36

  • building web based discussion forum, 26–46

  • component roles, 8

  • controller component, 26

  • deleting response in discussion forum, 37

  • extensibility, 6

  • front controller pattern, 27

  • Intercepting Filter pattern, 37

  • introduction, 5

  • J2EEcomponents, 6

  • maintainability, 6

  • processing login in discussion forum, 35

  • processing response in discussion forum, 36

  • security, 6

  • Service to Worker pattern, 44

  • View Helper pattern, 41

  • viewing responses in discussion forum, 33

Model-View-Controller (MVC) architecture, 5

P

page flow of discussion forum

  • Model 1 architecture, 23

page-centric architecture see Model 1 (page-centric) architecture.

password

  • wrapping with user id, example, 11

patterns

  • front controller, 27

  • Intercepting Filter pattern, 37

  • problems addressed by various, 45

  • reasons for using in application design, 9

  • Service to Worker pattern, 44

  • View Helper pattern, 41

Posting class

  • code for web based discussion forum, 12

programming-centric architecture see Model 2 (programming-centric) architecture.

R

refactoring applications, 26

request type, communicating

  • command and controller strategy, 30

Response class

  • code for web based discussion forum, 14

response, command and controller strategy

  • adding to discussion forum, 36

  • deleting in discussion forum, 37

  • processing in discussion forum, 36

  • viewing in discussion forum, 34

response, Model 1 architecture

  • adding to discussion forum, 21

  • deleting in discussion forum, 22

  • processing in discussion forum, 22

  • viewing in discussion forum, 19

reuseability

  • application design, 2

S

scriptlets

  • authentication scriptlet, 24

security

  • Model 1 architecture, 4

  • Model 2 architecture, 6

Service to Worker pattern

  • Model 2 architecture, 44

servlets

  • FrontController servlet mapping to URI/controller/*, 30

servlets, controller component

  • communicating request type, 30

session beans

  • web application components, 8

Struts framework, Apache

  • front controller pattern improvement, 33

  • web site, 33

T

Topic class

  • code for web based discussion forum, 13

Topics class

  • discussion forum, home page, 15

U

User class

  • code for web based discussion forum, 11

user id

  • wrapping with password, example, 11

user interface, web based discussion forum

  • building using Model 1 architecture, 15

  • verification using intercepting filter pattern, 38

V

View Helper pattern

  • advantages, 42

  • Model 2 architecture, 41

  • particular area of development, 45

W

web based discussion forum see discussion

  • forum, web based, 9



 < Free Open Study > 



Professional Java Servlets 2.3
Professional Java Servlets 2.3
ISBN: 186100561X
EAN: 2147483647
Year: 2006
Pages: 130

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net