Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Spring config bloat

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi List

It seems to me, that although the java-code becomes slimmer and more easy to read, it goes the opposite way with the amount of configuration files used for setting up the framework. Is this observation correct?

Best regards,

S�ren Berg Glasius
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree that Spring's configuration files tend to become rather big.
There's an old saying that goes something like "you can't get rid of complexity but you can hide it"...
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes the bloat could bea problem. But
Application Context
allows for multiple config files.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, but those multiple context files can still be an annoyance. That said, you can do pretty much by splitting your configurations across the files sensibly.
 
Author
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to say that, in my mind, this talk of configuration bloat is almost irrelevant. The amount of time you spending coding configuration in Spring compared to actual coding is negligible.

The configuration files allow you to express the metadata of your application in a very intuitive manner and they benefit from being easier to read than write.

There are a couple of areas where we are going to provide 'shortcuts' in the config file for 1.2 or 1.3, but there is very little else we can do to reduce the amount of code if we want to keep the flexibility.

If you are not looking for all that flexibility, then you can use properties files instead of XML as shown in Pro Spring.

Rob
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic