Showing posts with label spring. Show all posts
Showing posts with label spring. Show all posts

Tuesday, April 22, 2008

Core Spring Course

I'm attending a Core Spring Training Course this week, held and organized here in Iceland by my company. I have finally managed to persuade my superiors to invest into Spring training for all the employees of our department. The course is held by Arjen Poutsma, the developer behind Spring Web Services project.

While I have been developing applications with Spring Framework for past few years, I am finding the Core Spring training course very informative and helpful. Most of the material covered so far is familiar and well-known to me, apart from the more advanced usage of Spring AOP, which I haven't used much so far. That is definitely going to change, I am sure. Every topic is followed by a very well designed lab where the newly learned material can be exercised.

Things to cover in the next two days are Spring MVC and Web Flow, configuring Spring Security, Remoting with Spring Web Services, etc. I sure hope we'll be covering (soon to be released) Web Flow 2.0 - I promised to write more about it when we start adopting it in projects, but we have not reached that point yet (one of the reasons is the fact that Web Flow haven't reached final 2.0 version).

While I prefer figuring how things work by experimenting on my own, it will be great to get information about Web Flow first-hand through the presentations and lab work on the course. Which brings me to the point -the real advantage and real value of this course is the chance to talk in person to people behind the Spring Framework, hear their opinion on things and get some good tips and advices (especially advices on AOP advices). Labs are in fact designed with that in mind.

I will write more about Spring AOP and Web Flow in the following days, so stick around.

Friday, February 22, 2008

Spring MVC easy way

Writing web applications using Spring MVC has never been easier, now that we have annotated controllers in Spring 2.5. Basically, it all boils down to just couple of things, from defining the viewResolver bean and the required XML configuration to scan for annotated based controllers to adding an annotation to (any) method in your controller class, just like this:
@RequestMapping(value="/url")
public ModelMap method()

Of course, there are few required beans you need to define for all that magic to work (shown in the Spring Framework documentation online) but I find that very acceptable and a big plus (showing how Spring is very flexible).

Some people might argue that the (now) old-fashioned way of defining the links the controllers respond to via urlMapping bean (SimpleUrlHandlerMapping) is similar to routes in Rails where everything (in regards to URL requests) is in one place. Then again, how many times are you going to change the URL locations and where does it look to be more natural - especially when you basically do all your work within the controller.

Similarly, this is how TurboGears (a web framework for my favorite language, python) handles request mappings (with a twist), where the name of the method in the controller declares the request mapping. That can be easily achieved with Spring MVC annotated controllers, too.

All this ease-of-use for writing web applications plus all the benefits of the Spring Framework - there's no need to switch to another framework, developers used to work with Spring can leverage all their knowledge and still be in the front lines, especially in regards to developing web applications.

Wednesday, November 21, 2007

Spring 2.5 is out

They finally released it - Spring Framework 2.5 is finally out. It comes with loads of new features and enhancements (you can read more about it in the announcement). Things that concern me the most and what I have been looking forward to put to paces are annotation-driven DI and annotation-based controllers in Spring MVC. What makes me happy is that the documentation is largely improved, which is always a great plus.

Next thing that I'm patiently waiting for is the release of Spring WebFlow 2.0, which looks extremely promising tool. I am following it up very closely, as I plan to introduce it in my company and start a project based on WebFlow.

During next few weeks, I'll make sure I write something about the new features.