• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic