Spring stack 2.2.0 released

RESThub Spring stack 2.2.0 released, first RESThub release based on spring 4.1.1. It also allows to choose the database connection pool.

New features

Breaking Changes

  • New connection pooling features introduce breaking changes on database configuration. Old database.properties file was split into two new files: datasource.properties for all options related to connection pool and database provider and persistence.properties for all options related to JPA and Hibernate. See documentation for details.
  • RESThub allows to choose your connection pool and you now must activate a dedicated spring profile to your WebAppInitializer. See documentation for details.
  • We switched from ResthubView to new Spring 4.0 JsonView for custom Json Views

See below for a complete migration guide.

Dependency updates

  • Principal dependencies
    • spring from 3.2.7 to 4.1.1
    • spring-data-commons from 1.6.4 to 1.9.0
    • logback from 1.1.1 to 1.1.2
    • slf4j from 1.7.6 to 1.7.7
    • servet from 3.0.1 to 3.1.0
    • modelmapper from 0.6.3 to 0.7.2
    • hibernate.validator from 5.0.3 to 5.1.2
    • spring-data-mongodb from 1.3.3 to 1.5.4
    • mongo from 2.11.4 to 2.12.3
    • spring-data-jpa from 1.4.3 to 1.7.0
    • hibernate from 4.3.1 to 4.3.6
    • h2 from 1.3.175 to 1.4.181
    • ehcache from 2.6.8 to 2.6.9
    • bonecp from 0.7.1 to 0.8.0
    • introduce new hikaricp 2.0.1 as an optional dependency (see documentation)
    • remove unnecessary google guava dependency
    • async.http.client from 1.8.3 to 1.8.13
    • spring security from 3.2.0 to 3.2.5
    • jackson from 2.3.1 to 2.4.2
    • woodstox from 4.2.0 to 4.4.0
    • cors filter from 1.9 to 2.1.2
    • testng from 6.8.7 to 6.8.8

Migration guide

Because of described breaking changes, you will have to follow these steps in order to migrate to RESThub 2.2.0:

  1. add resthub-pool-bonecp to your spring active profiles :

    XmlWebApplicationContext appContext = new XmlWebApplicationContext();
    appContext.getEnvironment().setActiveProfiles("resthub-jpa", "resthub-pool-bonecp", "resthub-web-server");
    

    NB : If you want to switch to hikaricp, please follow this documentation

  2. split your existing database.properties into a datasource.properties and a persistence.properties as explained here.

  3. If any, search and replace all your references to JSON ResthubView by Spring 4 JsonView.

Spring stack 2.1.6 released

RESThub Spring stack 2.1.6 released with last dependency updates, bug fixes and some new features before moving to resthub-spring-stack 2.2.x including spring 4 support.

New features

Fixes

Changes

Dependency updates

  • Principal dependencies
    • spring from 3.2.6 to 3.2.7
    • spring-data-commons from 1.6.3 to 1.6.4
    • logback from 1.0.13 to 1.1.1
    • slf4j from 1.7.5 to 1.7.6
    • modelmapper from 0.6.2 to 0.6.3
    • hibernate.validator from 4.3.1 to 5.0.3
    • javax.validation from 1.0.0 to 1.1.0
    • cglib from 2.2.2 to 3.1
    • hibernate from 4.3.0 to 4.3.1 (fixes #227)
    • h2 from 1.3.174 to 1.3.175
    • ehcache from 2.6.6 to 2.6.8
    • async.http.client from 1.7.20 to 1.8.3
    • cors.filter from 1.3.2 to 1.9
    • jackson from 2.3.0 to 2.3.1
  • due to javax.validation and hibernate-validator upgrades, two new dependencies were added :
    • javax.el-api 3.0.0
    • el-ri 1.0
  • maven plugins:
    • jetty-maven-plugin from 8.1.13.v20130916 to 9.1.2.v20140210
    • test-jetty-servlet from 8.1.13.v20130916 to 8.1.14.v20131031
    • maven-compiler-plugin from 2.5.1 to 3.1
    • maven-failsafe-plugin.version from 2.12.4 to 2.16
    • maven-site-plugin.version from 3.2 to 3.3
    • maven-war-plugin.version from 2.3 to 2.4
    • maven-javadoc-plugin.version from 2.9 to 2.9.1
    • maven-deploy-plugin.version from 2.7 to 2.8.1
    • maven-release-plugin.version from 2.3.2 to 2.4.2
    • maven-install-plugin.version from 2.4 to 2.5.1
    • maven-assembly-plugin.version from2.3 to 2.4
    • maven-project-info-reports-plugin.version from 2.5.1 to 2.7
    • maven-surefire-report-plugin.version from 2.12.14 to 2.16

RESThub's site redesigned

I am happy to announce that RESThub website has been completely revamped (skin & contents) for a better experience …

  • We moved from a sphinx and RST based two pages (one for each stack) site to a markdown based more sophisticated documentation structure with well organised sections.
  • We added a nice search functionality based on the great swiftype engine.
  • All styles were redesigned to make documentation easier to read : contrasts, emphasizes, code sections, …
  • Site is now fully responsive and should allow to discover RESThub on tablets and smartphones.
  • We now have a “News” section to share releases and thoughts.

We also have a new twitter account to share with you:

We hope that you will like it. Don’t hesitate to give us feedback or open a ticket here if you encounter any issue: https://github.com/resthub/resthub.github.io/issues.

This website was made with markdown, jekyll, boostrap 3 and is now hosted on github-pages.

You can find the sources on github: https://github.com/resthub/resthub.github.io.

Spring stack 2.1.4 released

RESThub Spring stack 2.1.4 released.

Updated dependencies including springframework to 3.2.6 and hibernate to 4.3.0 and some minor bug fixes.

All Java artifacts are now available on Maven central so you don’t have to add RESThub maven repositories to your pom.xml anymore.

Dependencies upgrade

  • Spring from 3.2.4 to 3.2.6
  • Spring Data Commons from 1.5.3 to 1.6.3
  • Spring Data JPA from 1.3.5 to 1.4.3
  • Spring Data MongoDB from 1.2.4 to 1.3.3
  • H2 from 1.3.173 to 1.3.174
  • Jackson from 2.2.3 to 2.3.0 (fixes #74)
  • Woodstox from 4.1.5 to 4.2.0
  • Hibernate from 4.2.6 to 4.3.0
  • Model Mapper from 0.6.1 to 0.6.2

Fixes

Spring stack 2.1.3 released

Upgrade from 2.1.2

  • Dependencies upgrade
  • Spring from 3.2.3 to 3.2.4
  • Spring Data Commons from 1.5.2 to 1.5.3
  • Spring Data JPA from 1.3.4 to 1.3.5
  • Spring Data MongoDB from 1.2.2 to 1.2.4
  • Spring Security OAuth2 from 1.0.1 to 1.0.5
  • Maven jetty plugin from 8.1.11.v20130520 to 8.1.13.v20130916
  • TestNG from 6.8.5 to 6.8.7
  • H2 from 1.3.171 to 1.3.173
  • Async Http Client from 1.7.18 to 1.7.20
  • Jackson from 2.1.5 to 2.2.3
  • Woodstox from 4.1.4 to 4.1.5
  • Hibernate from 4.1.12 to 4.2.6
  • Model Mapper from 0.5.6 to 0.6.1

New features and fixes

Spring stack 2.1.2 released

Upgrade from 2.1.1

  • Dependencies upgrade
  • Spring from 3.2.2 to 3.2.3
  • Spring Data JPA from 1.3.0 to 1.3.4
  • Spring Data MongoDB from 1.2.0 to 1.2.1
  • TestNG from 6.8 to 6.8.5
  • Hibernate from 4.1.11 to 4.1.12
  • EHCache from 2.6.5 to 2.6.6
  • Jackson from 2.1.4 to 2.1.5

New features and fixes

  • HTTP client improvements
  • Allow to specify charset in HTTP client
  • Manage properly UTF-8
  • Fix a Bug with asynchttpclient using SSL + proxies

RESThub 2.1.1 released

Spring Stack

  • Fix BoneCP version and configuration
  • Upgrade slf4j, logback, jackson, model mapper, async http client, hibernate, hibernate validator, ehcache, spring data, jetty and fest assert dependencies

Backbone Stack

Following libraries updated and may lead to some minor incompatibility, most significant ones are detailed bellow :

  • Backbone 0.9.10 to 1.0 (Upgrade guide)
  • Renamed Collection’s “update” to set, for parallelism with the similar model.set(), and contrast with reset. It’s now the default updating mechanism after a fetch. If you’d like to continue using “reset”, pass {reset: true}.
  • Your route handlers will now receive their URL parameters pre-decoded.
  • Backbone relational 0.7.1 to 0.8.5 (Detailed changelog)
  • Supports Backbone 1.0.0
  • Implemented the add, merge and remove options on Collection.add when working with RelationalModels. This also works when using set to change the key on nested relations.
  • RequireJS 2.1.4 to 2.1.5
  • Update to latest async.js
  • Handlebars 1.0 beta6 to 1.0 rc3
  • Update to latest keymaster.js
  • Underscore.String from 2.0.0 to 2.3.0
  • Underscore.String is exported as _s, not _.str anymore

Backbone Stack 2.1.0 released

Upgrade from 2.0.0

Following libraries updated and may lead to some minor incompatibility, most significant ones are detailed bellow :

  • Backbone 0.9.2 to 0.9.10 (Upgrade guide)
    • View.dispose() has been replaced by View.stopListening()
    • You should use listenTo() and stopListening() instead of on() and off() since they allow automatic event cleanup when the view is destroyed
    • Model validation is now only enforced by default in Model#save and no longer enforced by default upon construction or in Model#set, unless the {validate:true} option is passed.
    • PubSub has been removed and replaced by using directly Backbone, which now extends Events so it can be used as a global event bus
  • jQuery 1.8.2 to 1.9.1 (Upgrade guide)
  • Bootstrap 2.1.1 to 2.3 (Blog post)
  • Underscore 1.3.3 to 1.4.4 (Changelog)
  • RequireJS 2.0.6 to 2.1.4 (Blog posts)

New features and fixes

  • Cache buster when using IE in order to avoid lot of bugs caused by IE aggressive caching strategy
  • Fix IE7 and IE8 compatibility
  • Get model validation constraints from server (see here and translate these constraints to effective client Backbone Validation constraints.

Spring Stack 2.1.0 released

Upgrade from 2.0.0

Use BoneCP for database connections pool management : Replaced commons-dbcp with bonecp (see why, and migration documentation).

If you ever customized one of those datasource keys in your database.properties file:

dataSource.maxActive = 50
dataSource.maxWait = 1000
dataSource.poolPreparedStatements = true
dataSource.validationQuery = SELECT 1

Then they are not used anymore; you should translate those concepts into the new librabry concepts used for database connections pool management, BoneCP. You’ll probably want to switch from a “max live/wait connections” to a “partition” approach, which is way more efficient.

Fix inconsistent API in HTTP Client : API calls all look like asyncXmlGet, jsonGet…

New features and fixes

See all issues for this release.

RESThub 2.0 Spring and Backbone.js stack released

We are pleased to announce the second major release of RESThub!

Resthub: Spring + Backbone

Resthub: Spring + Backbone

Resthub: Spring + Backbone

RESThub 2.0 stack is based on Spring and Backbone.js, and is designed to build HTML5 applications easily and efficiently. RESThub focuses on modular web applications, made of stateless REST web services and client-side state managed by MVVM JavaScript clients.

Spring stack

RESThub Spring stack 2.0 is based on:

  • Java 7 by default, but Java 6 is fine too
  • Tomcat 7
  • Spring 3.1 including Profile and JavaConfig support
  • Spring MVC 3.1 and Jackson 2 for REST webservices (including full handling of Object Graphs with cyclic references)
  • SQL and NoSQL persistence with Spring Data
  • Logging with SLF4J and Logback
  • Maven 3.0 is the reference build tool used
  • TestNG, FEST Fluent Assertions 2 and Mockito for testing

It provides the following features:

  • Guidelines for your project and configuration layout
  • Project templates for Spring + Backbone.js web applications (simple or multi-module)
  • Zero config support for JPA (with automatic JPA Entity scanning) or MongoDB databases
  • Generic CRUD webservices (XML and JSON by default) with builtin Exception to HTTP response mapper
  • Helpers for running web tests
  • Easy to use HTTP client based on AsyncHttplient with OAuth 2.0 support
  • Logging bridge allow to send Javascript logs to the server
  • High performance and easy to monitore RPC mechanism based on RabbitMQ and Hessian
  • Spring MVC router allow to use routes à la Ruby On Rails/Play Framework

Backbone Spring stack 2.0 artifacts are available on Maven Central.

Reference documentation Javadoc Tutorial Sources

Backbone.js stack

RESThub Backbone.js stack 2.0 is based on:

  • Backbone.js 0.9.2 + carefully selected extensions
    • Powerful Pageable/Sortable datagrig with Backbone Datagrid (made by Loïc Frering, a RESThub developer)
    • Get and set relations (one-to-one, one-to-many, many-to-one) for Backbone models with Backbone relational
    • Form validation with Backbone Validation
    • Parameters support on view routing with Backbone Query Parameters
  • Require.js 2.0 for script loading including JS/CSS optimizer
  • Handlebars 1.0 for templating
  • jQuery 1.7
  • Twitter Bootstrap 2.1
  • Asynchronous calls with Async
  • Dispatching keyboard shortcuts with Keymaster
  • Parsing, validating, manipulating, and formatting dates and times with Moment

If provides the following features:

  • Guidelines for your project layout
  • Project templates for easy project bootstrapping
  • Resthub.View extends Backbone.View to provide the following enhancements:
    • Default rendering implementation based on Handlebars
    • $root attribute used to specify the container root element where the view should be attached (since $el is the view itself)
    • Default template attribute with context management
    • Zombie view and event handler cleanup
    • A new populateModel function that automatically populate a model objet from form values (mapped on element names)
  • A client to server Javascript logger, a simple but lifesaver feature when your application run in production
  • Additional Handlebars helpers
  • A Require.js/Handlebars plugin
  • A simple Publish/Subscribe mechanism
Download Reference documentation Tutorial Sources

Try it now!

You can take a look now to the example “Todo application”.

Reference documentation is available for both Spring and Backbone stacks.

Feel free to contact us on RESThub discussion group if you need help or want to send us some feedbacks.

The rationale behind RESThub 2.0

RESThub is all about integrating and bundling frameworks with tools, best practices and documentation. The RESThub team works everyday with those frameworks on high traffic, enterprise-grade applications for their customers.

That’s why we value developer experience on those libraries and despise the “Not Invented Here” syndrome above all.

RESThub is a two-part web framework: you can use the JavaScript stack part with a Ruby-on-Rails or Node.js backend; or you could use the Java stack with an Angular.js frontend!

We strongly believe in Open Source Software, so the whole thing is available under the Apache License 2.0 on Maven Central and Github.

Roadmap

Expected new features for upcoming RESThub 2.1 are :

  • Uprade to Spring 3.2
  • Upgrade to Backbone.js 1.0
  • Bean Validation + Backbone Validation plugin : do not duplicate your validation anymore on client side
  • ElasticSearch integration
  • Websocket support
  • Improved Exception to HTTP response mapper (JSON/XML serialization of i18n aware messages)
  • More examples applications

Contributions and feedbacks are welcomed !!!