Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8
-
Fix Version/s: 1.9.1
-
Component/s: Tools - AppGen
-
Labels:None
Description
From Bobby Diaz (Bobby - AT - magiconsoftware.com) via e-mail:
I have only been using AppFuse for about a month now but have made several modifications to accommodate the requirements of a couple of projects that I am currently working on. I wanted to take this time to give back some of the knowledge I have acquired. Before I spend too much time writing tutorials or diffs of everything I have changed, please take a look at the list below and let me know if any of you would be interested in any of these subjects:
My Configuration for AppFuse - Spring MVC / iBATIS / Oracle 9i
iBATIS
Added AppGen template for DAOiBatis implementation
Added AppGen template for SQL.xml (required changes to FormTagsHandler and MethodExTagsHandler)
getXyxs() method in SQL.xml will use POJO properties to define search criteria.
DisplayTag
Added ability for custom searching / sorting / paging / exporting using custom List implementation to optimize search queries and still report total record count
Extended ELColumnTag to allow for custom sorting (DisplayTagColumnTag.java)
Added DateColumnDecorator and DateTimeColumnDecorator classes.
POJO's
Added AppGen template to extend POJO functionality for use with custom searching (e.g. PersonSearch.java)
Added SearchStringBuilder class to generate generic search queries using POJO methods.
Modified BaseObject.java to support custom searching using a toSearchString() method and pageNum / pageSize properties.
Controllers
Added GenericSearchController.java to handle all xyxList.jsp actions and allow for custom searching.
Modifed AppGen template for action-servlet.xml to initialize a GenericSearchController with specific properties for each page.
Added code to StartupListener.java to register data type converters to be used during BeanUtils.populate() so that all POJO properties do not have to be strings.
Added ContollerUtil.java for use with custom searching / sorting / paging / exporting.
Middlegen
Added extras/middlegen to be able to auto-generate POJO's if database tables already exist.
Configured middlegen to generate all hibernate specific xdoclet attributes so table and column names and properties are available to AppGen.
Configured middlegen to generate equals(), hashCode(), and toString() methods.
JSP's
Added AppGen template to generate xyzListFiters.jsp to be used as search criteria and included in xyzList.jsp
Modifed AppGen template for xyzList.jsp to include custom search functions and criteria form.
Added AppGen template to generate @spring.validator xdoclet attributes for required (not-null) fields.
Added SearchFiltersTag.java for use with custom searching (collapsible div to show / hide filters after a search)
Added CustomSortingTag.java for use with custom searching / sorting / paging / exporting.
AppGen
Added hooks for all new templates and their respective merge functionality
Added ability to specify sub-package name (i.e. org.appfuse.admin or org.appfuse.common) for model and generated code.
I have only been using AppFuse for about a month now but have made several modifications to accommodate the requirements of a couple of projects that I am currently working on. I wanted to take this time to give back some of the knowledge I have acquired. Before I spend too much time writing tutorials or diffs of everything I have changed, please take a look at the list below and let me know if any of you would be interested in any of these subjects:
My Configuration for AppFuse - Spring MVC / iBATIS / Oracle 9i
iBATIS
Added AppGen template for DAOiBatis implementation
Added AppGen template for SQL.xml (required changes to FormTagsHandler and MethodExTagsHandler)
getXyxs() method in SQL.xml will use POJO properties to define search criteria.
DisplayTag
Added ability for custom searching / sorting / paging / exporting using custom List implementation to optimize search queries and still report total record count
Extended ELColumnTag to allow for custom sorting (DisplayTagColumnTag.java)
Added DateColumnDecorator and DateTimeColumnDecorator classes.
POJO's
Added AppGen template to extend POJO functionality for use with custom searching (e.g. PersonSearch.java)
Added SearchStringBuilder class to generate generic search queries using POJO methods.
Modified BaseObject.java to support custom searching using a toSearchString() method and pageNum / pageSize properties.
Controllers
Added GenericSearchController.java to handle all xyxList.jsp actions and allow for custom searching.
Modifed AppGen template for action-servlet.xml to initialize a GenericSearchController with specific properties for each page.
Added code to StartupListener.java to register data type converters to be used during BeanUtils.populate() so that all POJO properties do not have to be strings.
Added ContollerUtil.java for use with custom searching / sorting / paging / exporting.
Middlegen
Added extras/middlegen to be able to auto-generate POJO's if database tables already exist.
Configured middlegen to generate all hibernate specific xdoclet attributes so table and column names and properties are available to AppGen.
Configured middlegen to generate equals(), hashCode(), and toString() methods.
JSP's
Added AppGen template to generate xyzListFiters.jsp to be used as search criteria and included in xyzList.jsp
Modifed AppGen template for xyzList.jsp to include custom search functions and criteria form.
Added AppGen template to generate @spring.validator xdoclet attributes for required (not-null) fields.
Added SearchFiltersTag.java for use with custom searching (collapsible div to show / hide filters after a search)
Added CustomSortingTag.java for use with custom searching / sorting / paging / exporting.
AppGen
Added hooks for all new templates and their respective merge functionality
Added ability to specify sub-package name (i.e. org.appfuse.admin or org.appfuse.common) for model and generated code.
-
Hide
- appfuse.zip
- 11/Jul/05 9:23 AM
- 443 kB
- Matt Raible
-
- appfuse-spring-1.8/.classpath 6 kB
- appfuse-spring-1.8/.cvsignore 0.2 kB
- appfuse-spring-1.8/.m7project 0.7 kB
- appfuse-spring-1.8/.project 0.8 kB
- appfuse-spring-1.8/.springBeansProject 0.3 kB
- appfuse-spring-1.8/anthill.version 0.0 kB
- appfuse-spring-1.8/appfuse.iml 36 kB
- appfuse-spring-1.8/appfuse.ipr 19 kB
- appfuse-spring-1.8/build.properties 2 kB
- appfuse-spring-1.8/build.xml 58 kB
- appfuse-spring-1.8/compile-jsp.xml 4 kB
- appfuse-spring-1.8/database.properties.reference 5 kB
- appfuse-spring-1.8/deploy-demo.sh 0.9 kB
- appfuse-spring-1.8/jboss-build.xml 57 kB
- appfuse-spring-1.8/LICENSE.txt 11 kB
- appfuse-spring-1.8/metadata/.../jboss.xml 5 kB
- appfuse-spring-1.8/metadata/.../tomcat.xml 8 kB
- appfuse-spring-1.8/metadata/.../CVS/Entries 0.4 kB
- appfuse-spring-1.8/metadata/.../Repository 0.0 kB
- appfuse-spring-1.8/metadata/.../CVS/Root 0.0 kB
- appfuse-spring-1.8/metadata/.../CVS/Template 0.8 kB
- appfuse-spring-1.8/.../geronimo-jetty.xml 3 kB
- appfuse-spring-1.8/.../geronimo-realm.xml 0.9 kB
- appfuse-spring-1.8/.../appfuse-ds.xml 1 kB
- appfuse-spring-1.8/.../jboss-web.xml 0.3 kB
- appfuse-spring-1.8/metadata/.../log4j.xml 6 kB
- appfuse-spring-1.8/.../login-config.xml 2 kB
- appfuse-spring-1.8/.../resin-web.xml 1 kB
- appfuse-spring-1.8/.../resin-web-2.1.xml 2 kB
- appfuse-spring-1.8/.../resin-web-2.1-ready.xml 2 kB
-
Hide
- extras.zip
- 11/Jul/05 9:23 AM
- 41 kB
- Matt Raible
-
- extras/appgen/build.xml 29 kB
- extras/appgen/src/action-servlet.xdt 1 kB
- extras/appgen/src/ActionTest.xdt 4 kB
- extras/appgen/src/Constants.xdt 0.5 kB
- extras/appgen/src/ControllerTest.xdt 1.0 kB
- extras/appgen/src/detailed/Action.xdt 7 kB
- extras/appgen/.../context-hibernate.xdt 0.3 kB
- extras/appgen/.../context-ibatis.xdt 0.5 kB
- extras/appgen/.../context-service.xdt 0.5 kB
- extras/appgen/.../detailed/Controller.xdt 2 kB
- extras/appgen/src/detailed/DAO.xdt 2 kB
- extras/appgen/.../detailed/DAOHibernate.xdt 4 kB
- extras/appgen/src/detailed/DAOiBatis.xdt 4 kB
- extras/appgen/src/detailed/DAOTest.xdt 7 kB
- extras/appgen/.../FormController.xdt 4 kB
- extras/appgen/src/detailed/Manager.xdt 2 kB
- extras/appgen/.../detailed/ManagerImpl.xdt 3 kB
- extras/appgen/.../detailed/ManagerTest.xdt 6 kB
- extras/appgen/src/detailed/Search.xdt 5 kB
- extras/appgen/.../detailed/SearchFilters.xdt 5 kB
- extras/appgen/src/detailed/SQL.xdt 4 kB
- extras/appgen/.../sql-map-config.xdt 0.3 kB
- extras/appgen/.../detailed/Validation.xdt 0.7 kB
- extras/appgen/src/Form_jsp.xdt 3 kB
- extras/appgen/src/FormControllerTest.xdt 3 kB
- extras/appgen/src/FormKeys.xdt 1 kB
- extras/appgen/src/generic/Action.xdt 7 kB
- extras/appgen/.../generic/action-servlet.xdt 2 kB
- extras/appgen/.../generic/context-ibatis.xdt 0.5 kB
- extras/appgen/.../context-service.xdt 0.5 kB
Activity
Hide
Matt Raible
added a comment -
Hide
Matt Raible
added a comment -
I'd love to get this into 1.9, particularly the iBATIS stuff - but it's probably better that I wait. I'm leaving on vacation in a couple of days and I'd like to do 1.9 before that. The hard part is going to be making sure the other installers work well with the iBATIS installer.
Show
Matt Raible
added a comment - I'd love to get this into 1.9, particularly the iBATIS stuff - but it's probably better that I wait. I'm leaving on vacation in a couple of days and I'd like to do 1.9 before that. The hard part is going to be making sure the other installers work well with the iBATIS installer.
Hide
Matt Raible
added a comment -
Finished integrating Middlegen. Now AppGen prompts you to generate from "pojo" or "table". I've updated AppGen's documentation accordingly.
http://raibledesigns.com/wiki/AppGen.html
http://raibledesigns.com/wiki/AppGen.html
Show
Matt Raible
added a comment - Finished integrating Middlegen. Now AppGen prompts you to generate from "pojo" or "table". I've updated AppGen's documentation accordingly.
http://raibledesigns.com/wiki/AppGen.html
Hide
Matt Raible
added a comment -
I've finished integrating AppGen support for iBATIS - thanks to Bobby Diaz for writing it. A nice clean implementation to boot!
One change I made vs. the patch here is that there are no bean registrations required for the generic DAO and manager. Rather, it works similar to the Hibernate implementation (generic "dao" and "manager" beans).
As far as search, the solution posted here is good - but I'd rather wait and use something like Lucene.
Feature for 2.1: Search (using Lucene) and allow all objects in application to be searched from a single screen (google style). Also, integrating paging with the displaytag, dataTable (JSF) and contrib:Table (Tapestry).
One change I made vs. the patch here is that there are no bean registrations required for the generic DAO and manager. Rather, it works similar to the Hibernate implementation (generic "dao" and "manager" beans).
As far as search, the solution posted here is good - but I'd rather wait and use something like Lucene.
Feature for 2.1: Search (using Lucene) and allow all objects in application to be searched from a single screen (google style). Also, integrating paging with the displaytag, dataTable (JSF) and contrib:Table (Tapestry).
Show
Matt Raible
added a comment - I've finished integrating AppGen support for iBATIS - thanks to Bobby Diaz for writing it. A nice clean implementation to boot!
One change I made vs. the patch here is that there are no bean registrations required for the generic DAO and manager. Rather, it works similar to the Hibernate implementation (generic "dao" and "manager" beans).
As far as search, the solution posted here is good - but I'd rather wait and use something like Lucene.
Feature for 2.1: Search (using Lucene) and allow all objects in application to be searched from a single screen (google style). Also, integrating paging with the displaytag, dataTable (JSF) and contrib:Table (Tapestry).
Show
Matt Raible
added a comment - iBATIS AppGen support, as well as Middlegen support now in CVS.
Here is the project I was using to set up the demo (minus the lib folder).
I figured it might be easier for you to setup and/or modify if you had all
of the code. I am also attaching my extras folder from another project
where I made all of the modifications. I tried to clean up as much as I
could, but let me know if you have any questions or comments about any of
it.
One last thing, after reading your message about using Annotations in the
next major release of AppGen, I slapped together a rough example to generate
the ibatis SQL.xml file to see what it would take. I was able to generate
the exact output I got from using xdoclet templates in no time. I would
definitely be interested in helping with that project!