AppFuse JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile
  • AppFuse
  • APF-95

Modify AppGen to work with iBATIS

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major 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.
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    appfuse.zip
    11/Jul/05 9:23 AM
    443 kB
    Matt Raible
    1. File
      appfuse-spring-1.8/.classpath 6 kB
    2. File
      appfuse-spring-1.8/.cvsignore 0.2 kB
    3. File
      appfuse-spring-1.8/.m7project 0.7 kB
    4. File
      appfuse-spring-1.8/.project 0.8 kB
    5. File
      appfuse-spring-1.8/.springBeansProject 0.3 kB
    6. File
      appfuse-spring-1.8/anthill.version 0.0 kB
    7. File
      appfuse-spring-1.8/appfuse.iml 36 kB
    8. File
      appfuse-spring-1.8/appfuse.ipr 19 kB
    9. File
      appfuse-spring-1.8/build.properties 2 kB
    10. XML File
      appfuse-spring-1.8/build.xml 58 kB
    11. XML File
      appfuse-spring-1.8/compile-jsp.xml 4 kB
    12. File
      appfuse-spring-1.8/database.properties.reference 5 kB
    13. File
      appfuse-spring-1.8/deploy-demo.sh 0.9 kB
    14. XML File
      appfuse-spring-1.8/jboss-build.xml 57 kB
    15. Text File
      appfuse-spring-1.8/LICENSE.txt 11 kB
    16. XML File
      appfuse-spring-1.8/metadata/.../jboss.xml 5 kB
    17. XML File
      appfuse-spring-1.8/metadata/.../tomcat.xml 8 kB
    18. File
      appfuse-spring-1.8/metadata/.../CVS/Entries 0.4 kB
    19. File
      appfuse-spring-1.8/metadata/.../Repository 0.0 kB
    20. File
      appfuse-spring-1.8/metadata/.../CVS/Root 0.0 kB
    21. File
      appfuse-spring-1.8/metadata/.../CVS/Template 0.8 kB
    22. XML File
      appfuse-spring-1.8/.../geronimo-jetty.xml 3 kB
    23. XML File
      appfuse-spring-1.8/.../geronimo-realm.xml 0.9 kB
    24. XML File
      appfuse-spring-1.8/.../appfuse-ds.xml 1 kB
    25. XML File
      appfuse-spring-1.8/.../jboss-web.xml 0.3 kB
    26. XML File
      appfuse-spring-1.8/metadata/.../log4j.xml 6 kB
    27. XML File
      appfuse-spring-1.8/.../login-config.xml 2 kB
    28. XML File
      appfuse-spring-1.8/.../resin-web.xml 1 kB
    29. XML File
      appfuse-spring-1.8/.../resin-web-2.1.xml 2 kB
    30. XML File
      appfuse-spring-1.8/.../resin-web-2.1-ready.xml 2 kB
    Showing 30 of 476 items Download Zip
    Show
    Zip Archive
    appfuse.zip
    11/Jul/05 9:23 AM
    443 kB
    Matt Raible
  2. Hide
    Zip Archive
    extras.zip
    11/Jul/05 9:23 AM
    41 kB
    Matt Raible
    1. XML File
      extras/appgen/build.xml 29 kB
    2. File
      extras/appgen/src/action-servlet.xdt 1 kB
    3. File
      extras/appgen/src/ActionTest.xdt 4 kB
    4. File
      extras/appgen/src/Constants.xdt 0.5 kB
    5. File
      extras/appgen/src/ControllerTest.xdt 1.0 kB
    6. File
      extras/appgen/src/detailed/Action.xdt 7 kB
    7. File
      extras/appgen/.../context-hibernate.xdt 0.3 kB
    8. File
      extras/appgen/.../context-ibatis.xdt 0.5 kB
    9. File
      extras/appgen/.../context-service.xdt 0.5 kB
    10. File
      extras/appgen/.../detailed/Controller.xdt 2 kB
    11. File
      extras/appgen/src/detailed/DAO.xdt 2 kB
    12. File
      extras/appgen/.../detailed/DAOHibernate.xdt 4 kB
    13. File
      extras/appgen/src/detailed/DAOiBatis.xdt 4 kB
    14. File
      extras/appgen/src/detailed/DAOTest.xdt 7 kB
    15. File
      extras/appgen/.../FormController.xdt 4 kB
    16. File
      extras/appgen/src/detailed/Manager.xdt 2 kB
    17. File
      extras/appgen/.../detailed/ManagerImpl.xdt 3 kB
    18. File
      extras/appgen/.../detailed/ManagerTest.xdt 6 kB
    19. File
      extras/appgen/src/detailed/Search.xdt 5 kB
    20. File
      extras/appgen/.../detailed/SearchFilters.xdt 5 kB
    21. File
      extras/appgen/src/detailed/SQL.xdt 4 kB
    22. File
      extras/appgen/.../sql-map-config.xdt 0.3 kB
    23. File
      extras/appgen/.../detailed/Validation.xdt 0.7 kB
    24. File
      extras/appgen/src/Form_jsp.xdt 3 kB
    25. File
      extras/appgen/src/FormControllerTest.xdt 3 kB
    26. File
      extras/appgen/src/FormKeys.xdt 1 kB
    27. File
      extras/appgen/src/generic/Action.xdt 7 kB
    28. File
      extras/appgen/.../generic/action-servlet.xdt 2 kB
    29. File
      extras/appgen/.../generic/context-ibatis.xdt 0.5 kB
    30. File
      extras/appgen/.../context-service.xdt 0.5 kB
    Showing 30 of 41 items Download Zip
    Show
    Zip Archive
    extras.zip
    11/Jul/05 9:23 AM
    41 kB
    Matt Raible

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Source
Hide
Permalink
Matt Raible added a comment - 11/Jul/05 9:23 AM
More comments from Bobby on the mailing list:

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!
Show
Matt Raible added a comment - 11/Jul/05 9:23 AM More comments from Bobby on the mailing list: 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!
Hide
Permalink
Matt Raible added a comment - 15/Sep/05 7:35 PM
Also, see: https://appfuse.dev.java.net/issues/show_bug.cgi?id=177
Show
Matt Raible added a comment - 15/Sep/05 7:35 PM Also, see: https://appfuse.dev.java.net/issues/show_bug.cgi?id=177
Hide
Permalink
Matt Raible added a comment - 13/Jan/06 6:39 AM
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 - 13/Jan/06 6:39 AM 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
Permalink
Matt Raible added a comment - 04/Apr/06 9:50 PM
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
Show
Matt Raible added a comment - 04/Apr/06 9:50 PM 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
Permalink
Matt Raible added a comment - 05/Apr/06 6:50 PM
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 - 05/Apr/06 6:50 PM 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).
Hide
Permalink
Matt Raible added a comment - 05/Apr/06 7:11 PM
iBATIS AppGen support, as well as Middlegen support now in CVS.
Show
Matt Raible added a comment - 05/Apr/06 7:11 PM iBATIS AppGen support, as well as Middlegen support now in CVS.

People

  • Assignee:
    Matt Raible
    Reporter:
    Matt Raible
Vote (0)
Watch (0)

Dates

  • Created:
    11/Jul/05 9:16 AM
    Updated:
    02/Feb/07 6:48 PM
    Resolved:
    05/Apr/06 7:11 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for AppFuse. Try JIRA - bug tracking software for your team.