Appliweb

All dimensions of your web developments

Affichage des articles marqués spring

Since google « offered » Java support to their cloud platform , I just see java coming everywhere now.

While Oracle is getting rid of the OS to run directly Java on VM hypervisors, I see VMware (Spring) and salesforce.com doing the same….

Not talking about the Android Platform, which is now the most dangerous concurrent to IPhone…

Who said Java is dead ? I just think they’re plain wrong….

Hi,

I found some other neat things while editing Spring files in my project using IDEA.

1- Searching for the Usage of a class shows  where it is used in Spring XML files:

Here you can see it has found that DbHelper is used in several spring xml files. Cool !

2- Completion works for .properties values

When you edit a Spring file, you can  set values by referencing a property defined in a .properties file.
For example, in the screenshot below, by using ${DbSchema.commun} as a value of an bean attribute, Spring can be instructed to load the masteri.properties file, and replace  ${DbSchema.commun} with the value defined there.

IDEA is so smart (well it’s development team is), that code completion will display the properties defined in the .properties files!

Another very handy feature….

GC

As a Java architect, I’m using Spring as a daily basis.

Spring is a refreshing library in a sense that it allows you to do simply complicated things.
Like using JPA, Jdbc and Hibernate in the same web project but in different transactions.

However, there is one thing very annoying in it:

Spring objects are usually not subclassable.

They always use private members, and most of the time with no getter at all !
That means I cannot change or add behavior to this classes without changing Spring code itself !

For example, there is no way I can access to the  underlying xstream object wrapped by the XstreamMarshaller !
I need to configure xstream more than what the Spring XStreamMarshaller offers, but I can’t do it easily.

The Spring objects are obviously well-designed and thought-out, but they cannot offer all the functionalities needed by all the projects !
You can explain me that they do this for preventing changes into their objects from impacting project’s code.

As always, I don’t agree with this:
When I subclass a class, I’m really heavily coupled to it, especially in Java where you cannot extends more than one class.
So i’m heavily dependent on the base class. I have never seen big changes in a base class not impacting derived classes !

I think this would be  a good thing if Spring allows us to use their classes like standard Java classes.

GC.