Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Spring vs. I

  1. #1
    Join Date
    Nov 2006
    Location
    NC USA
    Posts
    5

    Post Spring vs. I

    Hi guys,
    Reading & researching about spring framework I realized that the IoC concept is GREAT, but beside that, there is a lot of work & effort that you have to put into xml config files to declare bean structures, each behavior exposed, properties, transactions, security, etc.

    then, I should choose between pay the price mixing some logic with tier communication or implement IoC concept maintaining large xml files.

    why large ?
    To describe you my business, we have like 500 tables in the oracle with 300 business logic objs and you can do the multiplication of the behaviors exposed.
    now, If I have to expose those biz logic I will need buy 100 HD RAID to hold the config/s file of spring (being exaggerated)

    Am I correct about the spring effort ?
    I'm just a newbie in spring, that's why I can have a wrong idea about spring implementation.

    Thank you.

    Rodrigo

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I think there are a million and one articles out there that will tell you why you should use spring. I have to say the configuration requirements have never put me off using spring.

    The configuration has to be done anyway either in code or XML. 2.0 has introduced lots of XML short cuts and there are also numerous other ways of cutting down the configuration. (annotations, auto wiring, inner beans etc...)

    I've seen have seen systems using hundreds of tables, domain objects and services. I can honestly say that Spring didn't make the situation any more complicated. It reduced the complexity and enabled us to remove in-house rolled services.

    When I write a new system and if Spring is appropriate, (and given its modular nature, lots of times it is,) I won't be worrying about the size of the configuration I'll be worrying about my customers bizarre requirements.

  3. #3
    Join Date
    Aug 2004
    Location
    Toronto, ON, Canada
    Posts
    101

    Default

    Quote Originally Posted by rasensio View Post
    Hi guys,
    Reading & researching about spring framework I realized that the IoC concept is GREAT, but beside that, there is a lot of work & effort that you have to put into xml config files to declare bean structures, each behavior exposed, properties, transactions, security, etc.
    Spring 2.0 allows you to create 'macros' for that. See http://www.springframework.org/docs/...sible-xml.html for more info. This is very useful if you have a lot of beans that look alike.

    then, I should choose between pay the price mixing some logic with tier communication or implement IoC concept maintaining large xml files.

    why large ?
    To describe you my business, we have like 500 tables in the oracle with 300 business logic objs and you can do the multiplication of the behaviors exposed.
    now, If I have to expose those biz logic I will need buy 100 HD RAID to hold the config/s file of spring (being exaggerated)
    Not necessarily. You can do all kinds of tricks in Spring. You could for example dynamically discover your business logic and create those beans at runtime.

    Am I correct about the spring effort ?
    I'm just a newbie in spring, that's why I can have a wrong idea about spring implementation.
    I think if you ask a more concrete question then we can definately point you in the right direction.

    Spring does many things. And possibly a lot of things that can help you to better structure/organize your application.

    S.

  4. #4
    Join Date
    Nov 2006
    Location
    NC USA
    Posts
    5

    Default

    as karldmoore said, I also want to be worried about what my customers want, not how to deal with configurations.

    I will read more about spring to realize if spring is really what I need.

    Thank you for the responses.

  5. #5
    Join Date
    Jul 2006
    Location
    Kolkata, India
    Posts
    217

    Default

    Quote Originally Posted by rasensio View Post
    as karldmoore said, I also want to be worried about what my customers want, not how to deal with configurations.
    And this is where the non-invasiveness of Spring kicks in. Spring does not intrude anywhere into your business logic. So once u have the IoC infrastructure and bean configurations in place, things really work like a charm and you can fully concentrate on modeling your domain.

    Cheers.

  6. #6
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Quote Originally Posted by debasishg View Post
    And this is where the non-invasiveness of Spring kicks in. Spring does not intrude anywhere into your business logic. So once u have the IoC infrastructure and bean configurations in place, things really work like a charm and you can fully concentrate on modeling your domain.
    Cheers.
    Agreed. Thats obviously intended, but one of its greatest strengths. Looking at the code, you can't tell that Spring is even involved. I think we had a handful of references to Spring in the last project. Its a small price to pay for the problems it solved.

    When you do look into Spring, bare in mind that you don't have to use it all. Its modular so you can use as little or as much as you want. Again another great feature.

    Are there some specific questions you are trying to answer regarding Spring?

  7. #7
    Join Date
    Nov 2006
    Location
    NC USA
    Posts
    5

    Default

    The truth is that I have my life solved with a very nice framework that send from faxes to rockets to the moon.
    But also I try to be up to date with technologies and spring seems that is here to stay.
    That's why I'm interested in learn it.

    Thank you all.
    Rodrigo

  8. #8
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Actually, everything that Spring does is simply something that needs to be done somewhere. You need to define your transactions and security somewhere. You need to define your dependencies and dependencies of your dependencies somewhere.

    Xml is more verbose then pure Java code, but I'd say if you would need 100Gb for Spring Xmls you would also need at least 75Gb for equivalent configuration with no Spring.

    To define a bean you need one line of xml. To define a dependency to that bean you need one line of xml. To define transactional behavior of your methods you need one line annotation per method + one line of xml for whole application. I really don't see how can one line of anything be optimized without leaving it out.

  9. #9
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Don't know about the Gb estimates, but I agree with the rest of it.

  10. #10
    Join Date
    Nov 2006
    Location
    NC USA
    Posts
    5

    Default

    I really see the value of IoC non intrusive and also "plug-in" different layers in each tier.
    and yes, it have to be done in somewhere, and if you can replace a part easily, yes, have to be better.

Posting Permissions

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