[cllfst] SpringOne 2GX 2013 – Webinars & Videos Lessons learned moving from GWT to Spring MVC |
[ Thread Index | Date Index | More lists.tuxfamily.org/cllfst Archives ]
Online Version |
May 2013 – Issue 55 |
|||||||
SpringOne 2GX 2013 – Agenda Grid Live, Early Bird Registration Ends 6/11 SpringSource and No Fluff Just Stuff bring you SpringOne 2GX 2013, a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop business applications, create multi-device aware web applications, design cloud architectures, and manage high performance infrastructure. The agenda grid, and more than ¾ of the accepted session content has been published! Note that the specific schedule and order of sessions may change, but the sessions published will not. Key Session Spotlight: The newly introduced Spring XD project! Tackling Big Data Complexity with Spring Speakers: Mark Pollack, Mark Fisher The early bird registration date ends Jun 11th, 2013, so register today! |
|||||||
In This Issue | |||||||
Latest Articles SpringOne 2GX Agenda Grid Live, Early Bird Registration Ends 6/11 Tip of the Month: Runtime and Designtime Webinars and Videos Software Release Summary Blog Digest |
Webinars & Videos Lessons learned moving from GWT to Spring MVC Register – May 28, 2013 Building REST-ful services with Spring Register – June 13, 2013, 2013 More Videos |
||||||
Monthly TechTips - Runtime and Designtime | |||||||
Monthly Spring TechTip: Climbing the Social Ladder with the new Spring Social @Enable* annotations The dreams of disparate networks and systems connected through a common interface - what we called SOA for many years - has finally arrived, but we're not using SOAP, we're using REST. Most interesting service providers have exposed RESTful APIs that you can use to talk to them. There's a catch: they're typically always secured with OAuth. OAuth connections can be complicated because they require callbacks into your application, and then interfacing with these myriad APIs can be even more daunting! Here, Spring Social gives you a leg up! In the upcoming Spring Social 1.1.x builds, it's even easier to use these APIs! Below is an example of the simplest Java configuration-style class to setup Spring MVC and Spring Social so that you can use Spring Social and the Facebook binding into your web application. @Configuration @EnableWebMvc @EnableJdbcConnectionRepository @EnableFacebook(appId = "${facebook.clientId}", appSecret = "${facebook.clientSecret}") public class SocialConfiguration { @Bean public UserIdSource userIdSource() { return new SpringSecurityAuthenticationNameUserIdSource(); } @Bean public ProviderSignInController providerSignInController( final UsersConnectionRepository usersConnectionRepository, final ConnectionFactoryLocator connectionFactoryLocator) { SignInAdapter signInAdapter = new SignInAdapter() { @Override @public String signIn(String userId, Connection<?> connection, NativeWebRequest request) { // .. handle your application's notion of 'signin' given a userId from Facebook } }; ProviderSignInController providerSignInController = new ProviderSignInController( connectionFactoryLocator, usersConnectionRepository, signInAdapter); providerSignInController.setSignInUrl("/myapp/signin.html"); providerSignInController.setPostSignInUrl("/myapp/crm/customers.html"); providerSignInController.setSignUpUrl("/myapp/signup.html"); return providerSignInController; } } Let's look at code some. The @EnableJdbcConnectionRepository and @EnableFacebook do the real magic. To work with a service provider, you need to register with the service provider and obtain a client ID and a client secret. In this case, I've externalized those values in a property file configured elsewhere and referenced them in the annotation as ${facebook.clientId} and ${facebook.clientSecret}. The ProviderSignInController object drives the authentication flow and exposes endpoints with Spring MVC for the service provider to call back into, and it handles advancing the connection from the client to the service provider. It in turn needs an adapter (a SignInAdapter implementation) that is invoked at the end of a provider sign-in attempt to sign-in the application-specific local user account associated with the provider user account. The UserIdSource bean provides a way for Spring Social to know about your local user identity, which, in this case, is provided by obtaining the Spring Security principal. If the local user identity (the username) is the same as the username returned from Facebook, then they are linked and an entry is created in the UserConnection table. The UserConnection table lives in a SQL database that is managed for you by the UsersConnectionRepository. This code also assumes you've configured a javax.sql.DataSource somewhere in your Spring configuration and then installed the schema. If they do not match, then the user will be redirected to the signup url (/myapp/signup.html) where you can perhaps auto-sign them up or at least pre-populate a signup form using the provided ProviderSignInAttempt object in the session. Once this is all setup, you can simply inject the API instance (in this case, a Facebook instance, or if you'd used the @EnableTwitter annotation, for example, you could use the Twitter implementation) into your Spring MVC controllers and use it work with the service provider : @Inject private Facebook facebook; Hopefully, this has gotten you up and running with Spring Social, and helps you to better integrate your applications to the service providers that dominate your users' daily life. Monthly STS TechTip: The Spring tooling validates your Spring XML files for you and provides error and warning markers in case something strange is found. In many of those cases the tooling does not only provide those error indicators, but also offers you possible fixes for those errors right from within your Spring XML config file. Just go to the error in the editor and press the keyboard shortcut for quick fixes (exactly the same as in the Java editor). And there you go: the possible fixes for your code are just one click away. | |||||||
Webinars and Videos | |||||||
Lessons learned moving from GWT to Spring MVC Broadleaf Commerce is an eCommerce framework largely based on Spring.. In the latest version 3.0, Broadleaf migrated its admin console from GWT to a Spring / Spring MVC / Thymeleaf application and updated the framework to Spring 3.2. This session will begin by discussing reasons for moving to Spring MVC as well as why Thymeleaf was chosen as the templating engine. We will also cover some of the more interesting Spring extension points we utilized to provide extensibility for users of Broadleaf. May 28, 3:00pm GMT Summer Time (London, GMT+01:00) Register Building REST-ful services with Spring Today's applications don't exist in isolation. REST applications and web services are a great way to connect applications together. REST is a design principle that imposes no constraints on the client except basic HTTP support, which all platforms provide. Designing REST services, however, is still as much art as it is science, as standards are emerging. Join Spring Developer Advocate Josh Long as he introduces some of the ins-and-outs of REST API design with Spring, building on Spring MVC, Spring HATEOAS and answers some commonly-asked questions like how to secure REST-ful services, and how to tailor payload serialization to your specific use cases. June 13, 3:00pm GMT Summer Time (London, GMT+01:00) Register New SpringOne 2GX Replays Available We are almost done with publishing SpringOne2GX 2012 replay content. See the latest session publications on the springone2gx website or the youtube channel. https://springone2gx.com/conference/washington/2012/10/video_list Videos: Pivotal Public Launch Hadoop, Pivotal HD and Spring for Apache Hadoop Featured Demos: Understanding Java Garbage Collection and what you can do about it Building an Enterprise CRM with Grails and Spring Integration Java EE services for Spring Applications Spring Integration in the Wild Effective Design Patterns with NewSQL CloudFoundry Architecture Building for Performance with Spring Integration and Spring Batch Case Study: Provisioning a Multi-Site In-Memory Database Implementing Domain Driven Design with Spring and vFabric Batch Processing and Integration on Cloud Foundry The Spring Data MongoDB Project | |||||||
Software Release Summary | |||||||
Spring Mobile 1.1.0.M3 Introducing Spring XD Spring Batch 2.2.0 RC1 Spring HATEOAS 0.5 Spring Security 3.1.4 Spring Data Arora SR1 Spring Data Babbage |
|||||||
Blog Digest | |||||||
800,000 Messages/Minute: How Nokia's HERE Uses #RabbitMQ to Make Real-time Traffic Maps Java config support in Spring Batch 2.2.0.RC1 FuzzyDB with Spring Data bindings |
|||||||
Spring University – Upcoming Training | |||||||
Core Spring Enterprise Integration Hibernate with Spring Rich Web Applications Groovy and Grails |
|||||||
|
|||||||
21750 |
VMware, Inc. 3401 Hillview Ave Palo Alto CA 94304 USA Tel 1-877-486-9273 To manage your profile, subscription preferences, and to unsubscribe from Open Source Developer email communications, please go to Open Source Developer Subscription page. |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |