SpringOne 2GX 2012 Web Track: What's New in Spring MVC 3.2 + Extending Spring MVC with Spring Mobile and JavaScript

News | Pieter Humphrey | November 16, 2012 | ...

 

What's New in Spring MVC 3.2

Following on Juergen's talk on the upcoming Spring 3.2 release, this presentation will focus on what's new specifically in the area of Spring MVC. The presentation will explain all noteworthy features and, as is usual with every new release, there will be a lot to discuss including Servlet-based async request support, content negotiation enhancements, REST error handling, @MVC test support, and much more. The talk does not provide an overview of Spring MVC but rather assumes a level of experience and focuses on covering what's new.

About Rossen Stoyanchev

Rossen Stoyanchev

Rossen is a Spring Framework developer focusing on Spring MVC as well as Spring Web Flow. His 17+ year background includes work on trading and risk management software, investment accounting, e-commerce web applications, directory services, among others. Prior to becoming a full-time Spring Framework developer, Rossen spent several years teaching and consulting clients building enterprise Java applications with Spring on a broad range of topics.

More About Rossen »


Extending Spring MVC with Spring Mobile and JavaScript

The modern web no longer is limited to desktop browsers. Smart phones and tablets have become an integral part of our daily lives. Web sites that may look good on a 22" monitor usually do not format and display well on a much smaller screen. Additionally, network speeds can limit the performance of a web site on mobile devices. Because of these reasons many developers and organizations are considering how to make their web sites accessible to all the various devices and screen sizes for which people are using. In this session, we will explore the functionality provided within the Spring Mobile project, and how you can use it to extend your Spring MVC application onto mobile and tablet devices. We'll then continue the discussion by demonstrating how you can leverage some of the popular mobile JavaScript frameworks in combination with Spring Mobile to provide a first class experience for your users on mobile devices.

Session Detail


About Craig Walls

Craig Walls

Craig Walls has been professionally developing software for almost 18 years (and longer than that for the pure geekiness of it). He is a senior engineer with SpringSource as the Spring Social project lead and is the author of Spring in Action and XDoclet in Action (both published by Manning) and Modular Java (published by Pragmatic Bookshelf). He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring and OSGi on his blog. When he's not slinging code, Craig spends as much time as he can with his wife, two daughters, 4 birds and 3 dogs.

More About Craig »

About Roy Clarkson

Roy Clarkson

Roy Clarkson studied computer science at Georgia Tech before beginning his career as a software engineer. He has worked as a professional software developer for over fifteen years, with a variety of languages and technologies. He is currently working as an engineer with SpringSource, at VMware, where he is the lead on the Spring for Android project. He also participates on the Greenhouse project, and built it’s associated mobile clients. Roy has spent the last few years focusing on mobile application development, including iPhone, Android, and mobile web. Prior to that, he focused most of his time on web based application development.

More About Roy »

This Week in Spring - 13 November, 2012

Engineering | Josh Long | November 14, 2012 | ...

Welcome back to another installment of This Week in Spring! I started this week back in the lovely Sofia, Bulgaria for the Cloud Foundry Open Tour event, talking to a packed audience about building Spring applications on Cloud Foundry. Now, I'm in Antwerp, Belgium, at the Devoxx conference where I'll present on what's new in Spring 3.2, Cloud Foundry and more. If you're here, I invite you to come visit the SpringSource booth and see some of the talks on Spring that I - and others - will be giving.

  1. 		Roy Clarkson has announced not one, but two releases of Spring  Mobile this week! 
    

    Spring Android 1.0.1 has been released. This release includes a change to support BlackBerry 10 mobile devices. BlackBerry 10 mobile devices are now resolved as a mobile device when using the LiteDeviceResolver. Then, he released the
    1.1.0.M1 release, which folds in the 1.0.1 support as well as tablet support in site preference handling and site switching, support for Java-based container configuration, and support for servlet based configurations.

  2. Thomas Risberg has announced the GA release of Spring Data JDBC extensions with QueryDSL and Advanced Oracle support.
  3. There's a lot of interesting…

Spring Mobile 1.0.1 Released

Releases | Roy Clarkson | November 13, 2012 | ...

Dear Spring Community,

We are happy to announce the release of Spring Mobile 1.0.1!

Spring Mobile provides extensions to Spring MVC that aid in the development of cross-platform mobile web applications.

This release includes a change to support BlackBerry 10 mobile devices. BlackBerry 10 mobile devices are now resolved as a mobile device when using the LiteDeviceResolver. See the changelog and reference manual for more information.

To retrieve the software, download the release distribution, or add the maven artifacts to your project. Sample apps are available at github.com/SpringSource/spring-mobile-samples

If you are building a mobile web app, we encourage you try out Spring Mobile 1.0.1 and collaborate with us on the next iteration of the project.

Spring Mobile 1.1.0.M1 Released

Releases | Roy Clarkson | November 13, 2012 | ...

Dear Spring Community,

We are happy to announce the release of Spring Mobile 1.1.0.M1!

Spring Mobile provides extensions to Spring MVC that aid in the development of cross-platform mobile web applications.

This release includes a number of new features, including BlackBerry 10 device detection, tablet support in site preference handling and site switching, support for Java-based container configuration, and support for servlet based configurations. See the changelog and reference manual for more information.

To retrieve the software, download the release distribution, or add the maven artifacts to your project. Sample apps are available at github.com/SpringSource/spring-mobile-samples

If you are building a mobile web app, we encourage you try out Spring Mobile 1.1.0.M1 and collaborate with us on the next iteration of the project.

Spring Framework 3.2 RC1: Spring MVC Test Framework

Engineering | Rossen Stoyanchev | November 12, 2012 | ...

[callout title=Update Dec 19, 2012] The final Spring Framework reference documentation contains guidance on migration as well as a complete section on Spring MVC Test. [/callout]

Last week Juergen Hoeller announced the release of Spring Framework 3.2 RC1 and Sam Brannen discussed exciting additions in its spring-test module such as support for WebApplicationContext's and upcoming plans for loading a hierarchy of contexts. Today I will continue this subject and describe another exciting spring-test addition. In 3.2 RC1 we've added first class support for testing Spring MVC applications both…

GA release of Spring Data JDBC Extensions 1.0 with Querydsl and advanced Oracle support

Releases | Thomas Risberg | November 12, 2012 | ...

Dear Spring Community,

We are pleased to announce the availability of the 1.0 GA release of the Spring Data JDBC Extensions project providing Querydsl and advanced Oracle Database support!

The Spring Data JDBC Extensions project was created to provide additional support for vendor specific JDBC extensions as well as new approaches to working with JDBC like Querydsl. The bulk of the support consists of code ported from the SpringSource project "Advanced Pack for Oracle Database" that was available for support subscription customers. We are now making this code available to all Spring users and…

Spring Framework 3.2 RC1: New Testing Features

Engineering | Sam Brannen | November 07, 2012 | ...

As Juergen Hoeller mentioned in his post announcing the release of Spring Framework 3.2 RC1, the Spring Team has introduced some exciting new features in terms of testing support. Most importantly, we've added first-class support for testing web applications. [1]

      Please note: this is a cross post from my Swiftmind company blog.

In this post we'll first take a look at some of the general new testing features in the Spring Framework, and then we'll go into detail regarding support for testing with a WebApplicationContext as well as request and session scoped beans. We'll close with a look at support for ApplicationContextInitializers and a brief discussion of the road map for testing with application context hierarchies.

Rossen Stoyanchev will later follow up with a detailed post on the new Spring MVC Test framework that provides first-class support for testing Spring MVC applications. So be sure to stay tuned for that as well, since it builds on the basic web testing support discussed later in this post.



General New Features and Updates


Build and Dependencies

The spring-test module now builds against and supports JUnit 4.10 and TestNG 6.5.2, and spring-test now depends on the junit:junit-dep Maven artifact instead of junit:junit which means that you have full control over your dependencies on Hamcrest libraries (e.g., hamcrest-core, hamcrest-all, etc.).

Generic Factory Methods

Generic factory methods are methods that implement the Factory Method Design Pattern using Java Generics. Here are some example signatures of generic factory methods:


public static <T> T mock(Class<T> clazz) { ... }

public static <T> T proxy(T obj) { ... }

The use of generic factory methods in Spring configuration is by no means specific to testing, but generic factory methods such as EasyMock.createMock(MyService.class) or Mockito.mock(MyService.class) are often used to create dynamic mocks for Spring beans in a test application context. For example, prior to Spring Framework 3.2 the following configuration could fail to autowire the OrderRepository into the OrderService. The reason is that, depending on the order in which beans are initialized in the application context, Spring would potentially infer the type of the orderRepository bean to be java.lang.Object instead of com.example.repository.OrderRepository.


<beans>

  <!-- OrderService is autowired with OrderRepository -->
  <context:component-scan base-package="com.example.service"/>

  <bean id="orderRepository" class="org.easymock.EasyMock…

This Week in Spring - 6 November, 2012

Engineering | Josh Long | November 06, 2012 | ...

Welcome back to another installment of This Week in Spring! We've got a lot to cover, so let's get to it!

  1. Did you guys miss SpringOne2GX 2012? I'm not going to lie to you - you really missed out! However, don't despair! Two of my absolute favorite talks from the show are now available online - the keynotes! Both were amazing, but if you're looking for an amazing introduction to the trends underlying next generation of web applications, and a great (amazing!) tour of RabbitMQ, check out the day 2 keynote!
    	More sessions will be posted on that page, so check back often.</LI>
     <LI> Spring 3.2 is drawing ever nearer!   The H  has some 
    	<a href  ="http://www.h-online.com/open/news/item/Spring-Framework-3-2-nears-with-release-candidate-1744277.html">nice coverage of the new features  in the framework</a>.
     </LI>
     <LI> Chris Beams  has announced the latest maintenance release, <A href="http://www.springsource.org/node/3720">Spring 3.1.3 - the third in the 3.1 line, has been released</a>! 
    
  2. Guys, I'm so excited to tell you that SpringOne is coming to India! Register now!
  3. Does your PaaS support your workloads? If you're using Cloud Foundry, then chances are good that it does!
  4. Michael Isvy has put together a nice post on Spring MVC and the view layer
  5. The Spring Framework TestContext framework now supports session/request scoped beans for integration testing
  6. The first milestone of Spring Data SOLR has been released!
  7. Jonathan Brisbin has announced the 1.2 release of the Spring REST Shell. The new release features SSL, basic auth, dotrc support, an updated Homebrew install formula, HATEOAS and hypermedia.
  8. Check out Costin Leau's webinar introducing Spring Data Hadoop this Thursday!
  9. RabbitMQ developer advocate Alvaro Videla linked to a great post on visualizing RabbitMQ topologies.
  10. Spring Data Batch and Spring Security OAuth ninja and Cloud Foundry UAA committer Dr. David Syer has written a really fantastic post on using Cloud Foundry's UAA agents OAuth2 endpoint. This has scarce little to do with Spring, except that Dr. Syer's posts are very educational and helped me tremendously in understanding the problems that Spring Security OAuth solves.

A Groovy DSL For Spring Integration

Engineering | David Turanski | November 06, 2012 | ...

Spring Integration implements Enterprise Integration Patterrns using the Spring programming model to enable messaging in Spring-based applications. Spring Integration also provides integration with external systems using declarative adapters supporting jms, http, amqp, tcp, ftp(s), smtp, and so on. Currently, configuring message flows is primarily done via Spring XML and Spring Integration supports several namespaces to make this as succinct as possible. Earlier this year, SpringSource released a Scala DSL for Spring Integration. Now, we are pleased to announce the first milestone release…

Spring Framework 3.2 RC1 released

Engineering | Juergen Hoeller | November 05, 2012 | ...

Dear Spring community,

I'm pleased to announce that the first Spring Framework 3.2 release candidate is now available.

This generation of the core framework is a straightforward next step after last year's Spring Framework 3.1, continuing several well-established themes. Key features in Spring Framework 3.2 include:

  • A new Gradle-based framework build, making it easier than ever to contribute to the Spring Framework project on GitHub
  • Inlined CGLIB 3.0 and ASM 4.0, fully supporting Java 7 byte code and making CGLIB-based functionality available without explicit declaration of a CGLIB dependency
  • Allowing for @Autowired and @Value to be used as meta-annotations, e.g. to build custom injection annotations in combination with specific qualifiers
  • Support for custom @Bean definition annotations in @Configuration classes, e.g. in combination with specific qualifiers, @Lazy, @Primary, etc
  • Asynchronous MVC processing on Servlet 3.0

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all