dimanche 12 mars 2017

True benefits of Spring Inversion of Control?

I'm working with Spring framework for two years now and sometimes I ask the question about what are real benefits of IoC. Consider some @Controler: on the one hand it safe time because it's created automatically, on the other hand it waste a time because of:

  1. Spring is starting slower becouse it must load this @Controler through reflection.
  2. It add some magic into whats really happening behind.
  3. The most important: you can't use DCEVM (enhanced Hot Swap) to simply modify or add Controler during runtime, so it enforce you to re-deploy again and again which takes lot of time.

The biggest problem with this architecture I consider point 3 - DCEVM. On the one hand programmer can use JRebel, on the other hand programmer would suffice with simply DCEVM. Imagine how it could looks like if everything will be coded without use of reflection - programmer can refresh everything with DCEVM Hot Swap during runtime.

So in my case, I would be possibly happier with framework which is not using reflectionso much. Right now re-deploy of single module on my project takes about 30s and I can't use JRebel because of some policy restrictions on my project. in addition JRebel isn't open source.

Could somebody explain what are real benefits of IoC as used in Spring Framework from his own point of view?

Thank you





Aucun commentaire:

Enregistrer un commentaire