• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring in Action Question/Re-Introduction

 
Ranch Hand
Posts: 493
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having old work experience using Agile Java Development with Spring, Hibernate, and Eclipse in which my then colleague's and I were introduced to Spring 2.X using Hemrajani Anil's (old) book before applying its concepts to our then work,  what approach would you recommend that I now take in trying to tackle the concepts mentioned in your book?  Are there certain concepts that have stayed the same, allowing me to focus on a few specific chapters?  Or have things changed so much that I should possibly leave this as reference material only?  
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm unfamiliar with the book you mentioned, but generally speaking, the core concepts (DI, AOP, loose-coupling, etc) are the same as before and most (not necessarily all) things still pretty much work as they once did. You can still configure Spring with XML, just like you could in Spring 1.0.

But the framework has evolved and there are new things you can do and better ways of doing things you could do in older versions. For example, with regard to persistence, you can certainly still inject a JPA `EntityManager` into a repository bean and use it to read and write data to a relational database. But you might consider using Spring Data JPA for persistence these days where in most cases you only need to write a repository interface and let the framework deal with the implementation. And while you can write XML configuration, Java configuration is the common practice these days...and relying on Spring Boot auto-configuration whenever possible is even a better option. And maybe you're accustomed to writing REST APIs with Spring MVC. But maybe you'd consider making those reactive with Spring WebFlux. Or, maybe dismiss HTTP altogether for your APIs and go with something like RSocket.

So yeah, while most old things will still work...new things may be better. Speaking for myself, having been in the Spring ecosystem since Spring 0.9, there's ALWAYS new stuff coming along and there are things I did back then that I do differently now It's an exciting and ever-evolving space to work in.
 
Charles O'Leary
Ranch Hand
Posts: 493
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm really looking forward to jumping back into things to witness these improvements first hand.  Thanks for the detailed breakdown Craig!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic