Announcement Announcement Module
Collapse
No announcement yet.
Modular Model - architecture in spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Modular Model - architecture in spring

    Hello,

    I am trying to build a system/framework, built with Spring, where the model definition grows over time through contributions from users/companies.

    What is the best way to do this? Is there an elegant method to building the model in a modular fashion? I would like to provide basic functionality (CRUD) in a core framework and then open up the data model and functionality to modular extension.

    I will be happy to hear your thoughts about what best practices are. I will be happy to further explain what I am trying to do.

    Looking forward to thoughts, suggestions and advice (be kind )

    Warm regards,

    Sirus.

  • #2
    Sirus,

    You might want to take a look at Impala, which has been designed with these kinds of applications in minds. It supports dynamic modules, on the fly enhancements, as well as mechanisms by which functionality added in modules can be exploited by other parts of the "core" system.

    Cheers,

    Phil Zoio
    Impala - simple dynamic modules for Spring
    http://www.impalaframework.org/
    http://impalablog.blogspot.com/

    Comment


    • #3
      Hello Phil,

      Thanks for pointer to Impala. It looks very interesting. I have been balking at implementing OSGi or Spring DM for obvious reasons and Impala might be light weight enough for me to jump in. I am not a Spring or Java expert, but have been coding for a while in multiple languages.. and I am always aware of my limitations as well as the learning curve for some of the packages.

      My requirement is to be able to break up the Model portion of the application so that the data model can be built by contributions from multiple users/communities. The issue arises if someone wishes to build a Model module where the behavior and properties required by the behavior could affect multiple classes. This calls for some kind of multiple inheritance or insetion of the class into the heirarchy at a higher point. Any thoughts on this?

      I am sort of leaning towards using Javassist to perform inserts... again don't know if I am opening a can of worms there.

      Thanks again and looking forward to thoughts.

      Philip/Sirus

      Comment


      • #4
        The vast majority of problems in software engineering stem from every-day developers trying to come up with "smart" and crafty solutions for simple problems. I am afraid that you might be on a quest to do just that...

        I don't understand what a "model" has to do with Spring, or any kind of framework, to begin with. A model (as well as Architecture) should not be affected by any particular technology. They are just the concepts that must always remain pure. The best way to maintain a modular model is to have a very clear and honest-to-life object model grouped by functionl domains and free of tier-specific technologies. That will allow that model to be easily expanded and built upon, reused in different applications, and distributed in flexible configurations.

        My $.2...

        Comment


        • #5
          Originally posted by siruscoder View Post
          My requirement is to be able to break up the Model portion of the application so that the data model can be built by contributions from multiple users/communities. The issue arises if someone wishes to build a Model module where the behavior and properties required by the behavior could affect multiple classes. This calls for some kind of multiple inheritance or insetion of the class into the heirarchy at a higher point. Any thoughts on this?
          Sirus,

          Sounds like quite a tricky one. Impala follows a fairly standard classloader model where classes defined in a particular module (say A) are visible to dependents, say B or C, but not vice versa. If you have already published interfaces in A, then you could use a new module D to add new behaviour which could be dynamically made available to B or C.

          What you are suggesting is some way of using a new module, say D, to change the class definitions coming from A. You could probably do something with JavaAssist (which is pretty much what a tool like JavaRebel does), although it is also the sort of thing you can probably do with Groovy more easily through its metadata programming model.

          Without wishing to put you off though, you'd really need to know what you are doing if you were going to try do something very clever here.

          Phil Zoio
          Impala - simple dynamic modules for Spring
          http://www.impalaframework.org/
          http://impalablog.blogspot.com/

          Comment


          • #6
            Phil and Constantine,

            Thanks for the replies and great suggestions.

            As you can probably tell, I know exactly what I need to do .. so exploring what the best practices are and keeping a very open mind.

            My needs are probably best met through declarative domain modelling techniques.. and there is an interesting post about some of the available techniques. The problem with most of the techniques is that the domain definitions are not first class types in the programming language (using xml to model data is an example). The post is at http://www.wadoku.de/wiki/display/DEV/Data+Modelling

            Thanks!

            Philip/Siruscoder

            Comment

            Working...
            X