Download presentation
Presentation is loading. Please wait.
Published byAntoine Wamble Modified over 9 years ago
1
AppFuse Architecture Directory Structure, Build/Test/Deploy Processes
2
Project Structure Directory structure –Simpler is better –Map to artifacts –Customizations/personalization's –IDE issues –Separate source from artifacts - cleanable
3
Top-level Directory Structure bin – automation scripts lib – 3 rd party libraries (i.e. Struts and Hibernate) metadata – SQL scripts, server configurations and XDoclet fragments src – Java source files test – JUnit, Cactus, StrutsTestCase tests tools – Strutsgen: a tool for generating JSPs from ActionForms web – JSPs, properties files, images, scripts, stylesheets
4
Open Source Dependencies Ant-contrib – use “propertycopy” task in build process Checkstyle – used to verify that coding standards are followed Dbunit – cleans/loads data into database before tests are run Display Tag – used to display list screens (including sorting/paging) Hibernate – persistence engine Cactus – for unit testing server-side java code Log4j – logging framework, includes e-mailing errors Struts – web application framework, we use JSPs and Servlets Java2HTML – creates HTML pages of.java files … continued
5
Open Source Dependencies, cont. JUnitDoclet – generates skeleton test cases for a class’s methods PMD – inspects code for unused variables, parameters, etc. StrutsMenu – navigation system StrutsTestCase – extension of Cactus to test Struts’ Actions WebTest – used to test JSPs XDoclet – code and deployment descriptor generator
6
Java Directory Structure src & test common ejb web org.appfuse…
7
Ant Build File XML format In project root directory Default name: build.xml Declarative - define steps, not scripty details Defines a single project A project contains targets Targets contain tasks
8
AppFuse Tasks Main tasks in appfuse project –clean –ejbdoclet and webdoclet –compile-module (where module is common, web or ejb) –package-module –deploy –test-module
9
build/deploy process
10
Test process
11
XDoclet’s Role Generates Hibernate mapping files (.hbm.xml) - Generates Struts’ ActionForms from POJOs - Generates Validator’s validation.xml from ActionForms - Generates web.xml and struts- config.xml -
12
XDoclet Examples Hibernate: User.java –@hibernate.class table=“app_user" Generating ActionForms: User.java –@struts.form include-all="true" extends=“BaseForm"
13
XDoclet Examples, cont. Generating entries in struts-config: UserAction.java –@struts.action path="/saveUser" name=“userForm“ scope="request" validate="true" parameter="action" input=“editUser"
14
User Interface Constructed with Tiles – web/layouts/baseLayout.jsp controls the entire layout of the site. Uses Struts JSP tags for editing/saving forms. Uses JSTL for conditionals, includes and messages.
15
User Interface, cont. XHTML 1.0 and CSS 2.0 –Allows validation –Cleaner HTML (all attributes lowercase, etc) –DOCTYPE switching
16
More Resources AppFuse Project Homepage –http://raibledesigns.com/appfuse –http://raibledesigns.com/appfuse/tutorials Java Development with Ant –http://www.ehatchersolutions.com/JavaDevWithAnt Enhance J2EE component reuse with XDoclet –http://www.arc-mind.com/papers/ws-j2x-ltr.pdf Step-by-Step tutorial on using XDoclet to write your own custom templates –http://www.arc-mind.com/papers/xdoclet2.pdf Ant, JUnit, XDoclet Presentations –http://ehatchersolutions.com/downloads/presentations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.