Dependency analysis in Scripted

Engineering | Kris De Volder | November 20, 2012 | ...

Scripted, a JavaScript editor from VMWare was announced on this blog last month. In this article we'll take a look under the hood at Scripted's Dependency Analysis Engine. But before diving into the details, lets motivate why we need it.

Main Motivation: Cross-file Content Assist

To provide a great JavaScript editing experience, Scripted needs to provide accurate suggestions about the functions, methods or identifiers you can use in your current editor context.

[caption id="attachment_12178" align="aligncenter" width="533" caption="Cross-file Content Assist"][/caption]

Two components work together to achieve this goal:

  • a fine-grained type inference analysis engine
  • a coarse-grained dependency analysis engine
The inference engine parses your code and walks every declaration, statement and expression. This allows it to determine what identifiers are valid in a given context, and make good guesses about the kinds of things that may be stored in these variables. This information is then used to make content assist suggestions.

If you wanted to simply put all your code into one big file, then a good quality inferencer alone would be sufficient to provide some pretty good content assist. In reality, projects will be divided…

This Week in Spring - 20 November, 2012

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

Wow! Guys, can you believe we are again staring down the end of the year? Time sure flies! In the US, this is the week of Thanksgiving, a holiday where we're supposed to take a moment and reflect upon the things for which we're grateful. I am (and I'm sure I speak for the team in saying that we are..) eternally grateful for you guys, the wonderful, vibrant and engaging community surrounding Spring, RabbitMQ and Cloud Foundry that makes putting together this roundup such a pleasure every week.

With that, let's get on with the news:

  1. Thomas Risberg has announced that the Cloud Foundry Maven plugin 1.0.0.M4 is now available.
    </Li>
     <LI>Did you miss out at <A href="http://springone2gx.com/conference/washington/2012/10/home">SpringOneOne2GX 2012  in Washington D.C.</a>?  Don't fret. We'll release 2 sessions every week on <a href="http://www.springsource.org/SpringOne2012Recordings">springsource.org</a>. We've already released Day 1 and 2 Keynotes. Available now:  a talk from Rossen Stoyanchev on "What's New in Spring Mvc 3.2" and a talk from Roy Clarkson and Craig Walls on "Extending Spring Mvc With Spring Mobile and Javascript."
    	Awesome. 
    	
    	</li>
    <LI> Our friend Tobias Trelle is at it again! This week, he's   <A…

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.

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