Results 1 to 4 of 4

Thread: Reusable component architecture best practices?

  1. #1
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    87

    Default Reusable component architecture best practices?

    I would like to have some advice on the following problem

    - I would like to build reusable components, that I could plugin into new projects. What approach should I take and how do I accomplish this using eclipse, ant, ... I guess I need a shared library somewhere because holding jar files on a componet base is just duplicating the jars. So has anyone have any experience in putting those jars / build files in a central repository (and if so dou you use ant or maven ....)?

    - When deploying them on a server I don't won't each war/ear to hold the component so I just want that I deploy my component on the server so that all my app can make use of them. Is there a good way to deploy, let's call it services, I read for example in Weblogic you have something like that?

    - When creating Spring app ctx files, should each component hold the possible configuration the component can have or belong these cfg files in the project itself and by that keeping the module more abstract

    - I have a development, a test and a production environment, each having different database and other settings. These settings I have put into properties files and depending on which env I am in, i take the correct cfg file. Is this the correct way of working or are there better ways to switch cfg between test, dev and prod? I guess I should also think of migrating to jmx because for now the props file cannot be reloaded at runtime (don't think this is possible in Spring?)

    - Not Spring related: I have also a dev, test and prod database env (and that for each product), But I'm having difficulties of keeping them synchronised when i change something i have to change all of thme. Perhaps some people can share their thoughts on how one should keep different databases, tools vs manual sql update files???

    I would be great to hear advice from people who use Spring in large applications that share common components. If you like to share other issues that come along with using reusable components, please feel free to do so

    Grtz

    M

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    I would like to build reusable components...and if so dou you use ant or maven
    Maven has better support for this than Ant.
    When creating Spring app ctx files, should each component hold the possible configuration the component can have or belong these cfg files in the project itself and by that keeping the module more abstract
    I'd keep the contexts in the component if possible.
    It avoids duplication and illustrates which services are available within the component. Obviously some things, like datasources, would be wired up by the application. See New Spring ‘alias’ tag helps achieve lightweight component oriented assembly of applications

    I have a development, a test and a production environment, each having different database and other settings. These settings I have put into properties files and depending on which env I am in, i take the correct cfg file
    That's what we do.

  3. #3
    Join Date
    Nov 2004
    Location
    Hilversum - The Netherlands
    Posts
    1,054

    Default

    Quote Originally Posted by katentim
    I would like to build reusable components...and if so dou you use ant or maven
    Maven has better support for this than Ant.
    There are systems for ANT that also provide this functionality. Check ivy and maven2 also has support for this functionality so that it can be used from ANT. In the newest version of ANT there also will be support.

  4. #4
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    87

    Default Server + jar reuse

    And what about sharing jars in the application server ... are their issues that I need to keep in mind. I leek to have something like a "deployable module".

    The issues that I can think of are for example:
    - hot deployment ... if one module needs to be updated, I propably need to stop all the application, no?
    - The context file that are in the modules that are deployed, can my application find these in the module or should they be coppied to the applications that use this module?
    - And what about keeping versions of modules? If I choose to deploy them i.e. as jars, butone application still need to use an older version of the jar ... how can this be solved?


    - is JMX + config values in the database not a better solution then having just palin old property files?

    Thanks

Similar Threads

  1. Reusable 'Module' configuration files?
    By zanfolim in forum Architecture
    Replies: 6
    Last Post: Sep 28th, 2006, 06:52 AM
  2. datechooser component - first try
    By snpe in forum Swing
    Replies: 3
    Last Post: Mar 31st, 2005, 10:38 AM
  3. Architecture Design
    By SpringMan in forum Architecture
    Replies: 1
    Last Post: Mar 30th, 2005, 03:03 PM
  4. Replies: 3
    Last Post: Dec 14th, 2004, 07:04 AM
  5. shared buisness component.
    By djeang in forum Architecture
    Replies: 1
    Last Post: Oct 25th, 2004, 03:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •