This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/us/ Developing Java Web Applications Dr. Harry Chen CMSC 491S/691S February 11, 2008
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/us/
Developing Java Web Applications
Dr. Harry Chen
CMSC 491S/691S
February 11, 2008
Agenda
Web application architecture Java Servlet technologyWebWork: building webapps made easySpring: Inversion of Control (IoC)Maven: Java project management and
build tool
A canonical Web architecture
Do you see any technical issues in this architecture?
(1) The Class object “folderTagListener” is dynamically associated with “bookmarkManager” via a configuration file, not hardwired in the source of “bookmarkManager”. (2) Developers also fine tune the number of WorkerThread to be instantiated by “bookmarkManager” in the same configuration file.
(1)
(2)
Apache Maven
Jave project management
It concerns the management of library dependency, code building, unit testing, packaging and documentation.
- Why do you think it’s important to consider those issues when building software?
- Can you relate to what you have experienced in the past (in school or at work)?
Problems I have faced
When some JAR library changed, I have to manually download the JAR from the project web site.
Make sure dependency library are included in my CLASSPATH for building and testing
Decide the directory layout of my project (where is “src”, “classes”, “resources”).
Figure out how to write documentation and call “javadoc” in my project.
Apache Maven
Maven is an open source Java project management tool that simplifies many of the tedious tasks associated with Java programming.
Features I love very much: Library dependency management Build, test, and package Pre-defined directory layout for webapp dev.
http://maven.apache.org/
POM file
In “Make”, we have “Makefile” In “Maven”, we have “POM file” (pom.xml) In this POM file, you can define
JAR (version and package names) that should to be included in your build CLASSPATH (dependencies).
The layout of your project (where do you keep source, .class, other resources and configuration)
Information for generating documentation And many other stuff…