• Post Reply Bookmark Topic Watch Topic
  • New Topic

we are using the Spring Framework, does it work with FP java 8 ?  RSS feed

 
Jean-Pierre Delouche
Greenhorn
Posts: 2
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are mainly using Java 6 with Spring, is there a possibility to switch to FP Java 8 with any benefits ?
 
Pierre-Yves Saumont
Author
Ranch Hand
Posts: 103
17
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jean-Pierre,

The benefits are the same as if not using Spring. However, using Spring has some consequences. Spring allows for two types of beans: property based and constructor based. Property based were traditionally preferred because they allow cyclic references between beans. Of course, there should not be any cyclic reference in any programs, whether they be functional or imperative, but that's the way many Spring application are build. Switching to functional programing will imply using immutable beans. This type of beans may not be property based because it implies using no args constructors and setting properties after construction. The consequence is that the properties may not be made final. Beside this, there is no incompatibilities between Spring and functional programming. But this might be a huge change for some programmers!

Pierre-Yves
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jean-Pierre Delouche, welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!