Bonjour à tous,
j’ai réalisé un compte rendu des Rencontres Spring 2009 pour le Journal Du Net.
L’événènement était riche en informations, allez faire un tour ici pour le détail.
Idées Distribuées – Distributed Ideas
November 18th, 2009 by gauvain girault — OpenSource, Presentation
Bonjour à tous,
j’ai réalisé un compte rendu des Rencontres Spring 2009 pour le Journal Du Net.
L’événènement était riche en informations, allez faire un tour ici pour le détail.
November 17th, 2008 by Cyril Martin — Conference, OpenSource, Presentation
Le 13 novembre à La Défense ont eu lieu “les rencontres Spring”. La conférence était animée par Didier Girard (directeur de l’innovation de SFEIR) ainsi que Julien Dubois (Directeur régional France de SpringSource). La salle était pleine, environ 200 personnes étaient présentes ; FastConnect y était représenté en les personnes de Gauvain Girault et Cyril Martin (moi).
Voici le programme de notre journée :
Ci après le détail des différentes interventions. Toute la journée a été filmé par TV4IT, voici le programme présenté par Julien Dubois :
Les slides et les vidéos des présentations sont disponibles:
La vidéo.
9:00 (pdf), Didier Girard nous accueille : il fixe l’agenda de la journée, présente les principaux participants, touche deux mots de Spring et J2EE en introduction et, surtout, fait la pub de sa société avant de prendre le rôle d’animateur pour le reste de la journée.
9:25 (pdf), Julien Dubois, directeur régional France de SpringSource, prend la parole. Il commence par faire la publicité de la nouvelle édition de son livre : Spring par la pratique. J’espère qu’un patron charitable va nous le commander
Puis il nous parle de Spring Source SARL.
Julien Dubois est revenu sur la nouvelle politique de support de Spring qui a tant fait couler d’encre ces derniers jours : à partir de maintenant les corrections ne sont plus “backportées” pour les “anciennes” versions publiques de Spring.
Seuls les clients (ceux qui souscrivent) bénéficient des corrections sur les anciennes versions. Il semblerait que la mauvaise communication autour de ce changement de politique ait été finalement profitable à Julien Dubois car elle a été l’occasion d’être contacté par beaucoup d’utilisateurs français de Spring.
9:35 (pdf), Guillaume Laforge, l’ancien CTO de G2One, chef du projet Groovy et nouvel employé de Spring Source France suite au rachat de G2One par Spring Source, nous a parlé de Groovy et Grails bien sûr.
Le langage Groovy ouvre aux développeurs Java de nouvelles perspectives en permettant d’élaborer des constructions syntaxiques complémentaires. Plus qu’un langage de script, il est qualifié de langage dynamique par le leader du projet Open Source. Le framework Grails est certainement la killer application de Groovy. C’est un framework de développement web fondé sur le concept “Convention over Configuration”. Grails offre un dialecte Java dédié au développement web, une sorte de DSL donc.
La société G2One, fondée il y a un an à peine, proposait des formations et du support pour groovy et grails. Guillaume Laforge devrait continuer les mêmes activités au sein de Spring Source. Il a annoncé aussi qu’il allait travailler sur le support de groovy et grails pour Eclipse.
Peter Cooper-Ellis, en tant que VP “Engineering and Product Management” chez SpringSource, est le responsable de la roadmap des produits SpringSource.
Cette présentation nous a donné la roadmap jusqu’à fin 2009 pour l’ensemble des produits maintenus par Spring Source. Peter nous a montré la cohérence de l’ensemble avec le refrain : “Provide weapons for the war on complexity”.
Mark Thomas est le plus gros contributeur au code source de Tomcat. Son intervention portait sur l’utilisation de Tomcat en production, et en particulier sur l’optimisation des performances de votre serveur.
Tomcat est livré avec une configuration qui sied aux développeurs et non à la production. Parmi les points abordés, j’ai noté en particulier :
Juergen Hoeller est le co-fondateur du framework Spring (avec Rod Johnson). Il est aujourd’hui le principal développeur du framework.
The upcoming Spring Framework 3.0 release introduces further annotation-based configuration options, unified expression language support and comprehensive REST support. This talk discusses Spring as a modern Java 5 oriented application framework, covering:
La table ronde réunissait :
Voyages SNCF Technologies s’occupe notamment (mais pas seulement) du site www.voyages-sncf.com. Ce site reçoit 5 à 7 millions de visiteurs tous les mois. Aussi la principale préoccupation est la tenue face à la charge, hotspot, et la tolérance aux fautes.
HSBC utilise massivement Spring dans ses développements. Les buts sont la réduction des coûts et une meilleure qualité de code. L’expérience semble très concluante.
September 17th, 2008 by julien fouqueray — OpenSource
I worked with a colleague, Xavier, to build a kind of “best of breed” Web 2.0 technologies project template that we could reuse from project to project.
Our aim for this project was to :
Let’s consider the following architecture : we have an existing domain model and a traditionnal multilayered application (business layer, data access layer, database), and we want to be able to use GWT as the presentation layer.
Basically, points we wanted to take into consideration were :
We’ve started using the archetype gwt-archetype.
This archetype provides a Maven based project with a simple GWT client.
With the gwt plugin maven-googlewebtoolkit2-plugin, we are able to launch the GWT Debug Console and also the embedded Jetty container with the Jetty plugin for Maven.
Several scenarii are available to integrate GWT and Spring.
We have tested 2 of them :
Strong integration , following Chris Lee’s post GWT-RPC with Spring 2.x.
GWT services are beans, configured in the Spring context. You annotate them with a custom annotation @GwtRpcEndPoint.
Then you write your own class extending Spring’s AbstractDetectingUrlHandlerMapping class. Its role is to detect the annotation and to generate urls that will be handled by Spring and mapped to corresponding ‘controller’.
Finally, you write an another class that extends RemoteServiceServlet (provided by GWT) which is responsible to handle RPC calls.
This first approach looks good for IoC purists : GWT services are not servlets, and you can even think about using your business layer as GWT endpoints.
But is this really a good idea ? It seems like a violation of SoC paradigm, isn’t it … ?
Whatever, when considering the use of Hibernate, that also needs to rewrite parts of RemoteServiceServlet, you come into troubles …
So we have finally choosen a kind of light integration : GWT services simply get business service implementations from context.
In their init() method, GWT endpoints – that extend RemoteService, so Servlet by inheritance – get their dependencies from the context.
BeanFactory factory = WebApplicationContextUtils.getWebApplicationContext(config.getServletContext()); taskManager = (TaskManager) factory.getBean("taskManager");
Don’t be offended (as we initially were !) by this approach : just consider GWT layer as a presentation layer which comes on top of an existing Spring multilayered architecture, as we mentioned in the intro.
We wanted to use Hibernate as an implementation of JPA specification for differents reasons : convention over configuration, choice for implementation, standard use.
At the time we had chosen to use the freshest GWT build which was a pre-release of version 1.5 since it supports Java 1.5 features : annotations, generics.
However, we can’t use our Hibernate objects directly.
As we can read in the post Why GWT 1.5 won’t solve your Hibernate issues : “Hibernate POJO are not real POJO. The persistence library adds a lot of needed information, such as session factory, by creating a dynamic proxy (with CGLIB or Javassist) around your instance. When you manipulate an Hibernate POJO, you do not do it with an instance of your class, but with a instrumented, derived one!”
As a consequence, we have to duplicate our domain model. One domain for backend processes (typically POJOs with JPA annotations), and one other domain for GWT serialization processes (DTOs).
As managing this duplication can sound bad, we have chosen hibernate4gwt, a library that can help us managing this.
As you can read in its documentation, hibernate4gwt offers different ways to manage domain model duplication : stateless, dynamic proxy, Java5 support and stateful.
Since dynamic proxy seems to be the less intrusive for our POJOs, it gained our preference.
(Moreover, with 1.5 GWT pre-release, we can use our 1.5 annotated POJOs.)
Initially we wanted to use stateless mode, but having unresolved issues with StatelessPojoStore down the road we decided to use HttpSessionPojoStore.
May look like a hack but it worked and allowed to avoid building in-house code.
More importantly we thought duplicating the domain objects could be an error prone task.
Then we started to focus on security.
Considering using Acegi in a GWT project gives us 2 solutions.
We have tried to use a HTML form to authenticate. This is simple but is incompatible with the use of GWT console to debug the application. Effectively, GWT Console needs a GWT module to run, it doesn’t want to know anything about html pages.
So to be able to debug our application in the GWT console, we have preferred the second approach which in fact is to use a second GWT Login component : a single EntryPoint which declares a FormPanel, which posts to j_acegi_security_check.
We have included a simple Acegi configuration file : if you are not authenticated, it enforces you to login by redirecting you to the login module.
Authentication is made upon the database with a DaoAuthenticationProvider, which takes as a parameter a custom implementation of UserDetailsService. This one uses the service layer to look for the users in the database.
How to build the project : https://opensource.fastconnect.org/redmine/wiki/spring-gwt-archetype