Results 1 to 4 of 4

Thread: Modelling Spring Deployment

  1. #1
    Join Date
    Sep 2004
    Posts
    17

    Default Modelling Spring Deployment

    I'm currently doing an application design. This design uses the standard DAO and Service patterns to provide access to the application's domain model. There are Dao interfaces, and the implementation classes extend HibernateDaoSupport. There are also service interfaces which provide roughly the same methods as the Dao, but at a higher level. The Service implementation classes have a Dao instance as a member variable, and provide a setter for injection, and delegate the appropriate calls to the Dao instance.


    This is all well and good, and a standard design technique. However, other injected objects, such as as the SessionFactory, Quartz Scheduler, etc... are shared amongst several services.

    I want to model the deployment of the application (which is where spring fits in) using UML. In this way, we can show where the objects are coming from, which implemenation classes are really used when there is only a static relationship with an interface.

    I have begun by creating deployment diagrams, using the "artifact" stereotype to represent the configuration files themselves, and created associations between the main application context, and each configuration file.

    Then, i have a deployment diagram for each configuration file which documents what beans are provided. When there is an injection, i create an association from the bean instance to the injected dependency.



    Has anyone else attempted this? Have you taken the same approach?

  2. #2
    Join Date
    Sep 2004
    Location
    Bonn/Germany
    Posts
    10

    Default

    Have you had a look at BeanDoc?

    http://springframework.sourceforge.net/beandoc/

    I have written a Maven plugin for BeanDoc (as much alpha and subject to change without notice as BeanDoc itself)

    http://www.schuerig.de/michael/java/...gin/index.html

    Michael

  3. #3
    Join Date
    Sep 2004
    Posts
    17

    Default BeanDoc

    BeanDoc is nice if you already have your deployment files setup, you can document them. However, in the design phase, this doesn't really help you model the inject dependencies, supplied beans, etc....

    I've actually decided that a component diagram makes more sense, since it typically is allowed to contain both artifacts (i'm debating between an artificact and component here) and object instances, whereas a deployment diagram typically does not contain object instances.

    I'm also leaing toward components for the spring bean files. The main reason is that my UML software (enterprise architect) represents artifacts with an included stereotype of <<artifact>>. Using a component allows me to stereotype spring bean files as <<spring-context>> and <<spring-beans>>. That would allow someone to write a generator which could take an XMI document and generate the appropriate files.

    Thoughts?

  4. #4
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default Re: Modelling Spring Deployment

    Quote Originally Posted by mattinger
    Has anyone else attempted this? Have you taken the same approach?
    I think this is a really promising idea and had a look at similar myself. One problem I found was that the XMI generated by various UML tools[*] seemed awfully inconsistent. At least one (Omondo) made constant references to values held in the central repository and others didn't expose relationships between any attributes or types in the same way.

    Do you know much about XMI? I don't - perhaps there's some way of generating a consistent dialect from multiple tools.

    If such a thing could be made tool-agnostic, I think this would be really powerful. The transforms could be managed with a simple extension to BeanDoc giving a nice end to end approach.
    [*]
    • Omondo UML eclipse plugin
      Poseidon UML
      Umbrello (KDE/Linux)


    Regards,
    Darren Davison.
    Public Key: 0xE855B3EA

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. JBoss 3.2.6 & Spring Deployment issues
    By difranr in forum Container
    Replies: 2
    Last Post: Sep 18th, 2005, 10:08 PM
  3. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  4. Replies: 1
    Last Post: May 4th, 2005, 02:43 PM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

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