Announcement Announcement Module
Collapse
No announcement yet.
Should I write my own XMLBeanFactory? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Should I write my own XMLBeanFactory?

    I have just recently discovered Spring and am about to begin a project where IoC will be very useful. Its a reporting engine where each report will involve configuring multiple report "modules" which map directly to implementing classes. The problem is, the reports will be configured by someone who may not be familiar with Spring or even Java. I envision using an XML tag-set customized to their needs and much more descriptive (using terms they are familiar with) than Spring's configuration format.

    The trick will be mapping these XML tags to bean implementations. From the reading I've done, I see two possibilities:
    1. Create my own BeanFactory implementation (possibly an extension of XMLBeanFactory)
    2. Use XSL to transform the original report descriptor into a Spring configuration XML
    To create my own BeanFactory implementation seems like a massive undertaking, but the solution is going to be complex either way. It also seems to me that the XSL approach may be more flexible. Do you have any thoughts on the pros and cons of these two solutions? Perhaps you can see a better solution. Thanks for your help.

  • #2
    Your use case is ideal for XSLT. That certainly seems simpler and more future-proof than rewriting the bean factory class.

    Comment


    • #3
      I would go for XSLT - a lot more flexible and compatible with future releases (basically just rephrasing what rhasselbaum wrote).

      Comment

      Working...
      X