Rest with Scala and Vert.x


A previous post introduced some features of using Scala with Vert.x. This post covers how to publish Rest web services in an elegant and simple fashion.

As in the previous post, Examples in Java and Scala are presented, source code been hosted on GitHub as part of lang-scala https://github.com/ouertani/vert.x/tree/master/vertx-lang/vertx-lang-scala

Lire la suite...

Using Tomcat JDBC connection pool in a standalone environment


A multi-user application working against a database cannot be efficient if it doesn't use connection pooling. Middleware can offer this service, but not all applications rely on such middleware. These applications must then come up with their own way to pool connections. The Apache Tomcat project doesn't only come with the most popular web container but also with a performant connection pool library, Tomcat JDBC. This post covers how to configure Tomcat JDBC in a typical Maven + Spring application.

Lire la suite...

Fun with Scala and Vert.x


Vert.x is a polyglot event-driven application framework that runs on the Java Virtual Machine (JAVA 7 is the minimum supported version). Like Node.js, Vert.x is asynchronous and scalable, and lets developers build modern and effective web applications.

Being polyglot, Vert.x can be used in many flavors, among which : JavaScript,CoffeeScript, Ruby, Python,Groovy and Java. In order to enforce asynchronism and scalabity, Vert.x is built upon Netty, leverage the reactor pattern, using a frightening number of handlers.

This article aims at showing the powerful combination of Scala and Vert.x - the Java counterpart being provided as comparison.

Lire la suite...

Flex et le mystère Mustella


Cela fait plusieurs fois que ce nom est mentionné dans les notes de version Apache Flex. Dans la toute récente version 4.9.0, une fois encore, il était question de : « The “Mustella” testing framework has been improved and many tests have been updated. ». Notez les guillemets entourant le nom du projet qui trahissent, sans doute, la part de mystère qui entoure ce projet.

Pour avoir tenté, à plusieurs reprises et en vain, d’insérer, dans l’intégration continue, des tests automatisés d’IHM sur des projets Flex avec FlexMonkey, FlexMonkium..., je suis devenu un peu sceptique sur ce type de frameworks. Pas tant au niveau de leur intérêt mais plutôt au niveau de l’usage et de leur rentabilité. Autant, les tests FlexUnit fonctionnent en standalone, sont efficaces, et restent acceptables sur le plan du maintien des jeux de tests.

Autant les outils de tests IHM sont souvent des usines à gaz qui nécessitent beaucoup d’intégration avec d’autres outils et les jeux de tests sont très couteux à maintenir. Ceci dit, je n’ai toujours pas renoncé, et l’annonce de ce nouveau framework a attiré mon attention. J’ai donc creusé un peu histoire de découvrir ce nouveau venu.

Lire la suite...

Unfiltered - Implémenter des services REST en Scala


La définition de REST trouve toute son essence à travers le protocole HTTP. Pourtant, la plupart des frameworks actuels reposent sur des API Java encore trop éloignées de ce dernier. La spécification de la JAX-RS (Java API for RESTful Web Services) a permis de simplifier la création de services REST au sein des applications JEE, entre autre, via l’utilisation des annotations. Cependant, ces implémentations gardent le plus souvent un accès direct à l’API Servlet rendant ainsi les applications web dépendantes du serveur d’applications sur lequel elles sont déployées.

Unfiltered (http://unfiltered.databinder.net) est un “micro framework” web qui permet ni plus ni moins l’intégration de services REST en Scala. Il est développé en partie par Nathan Hamblen. Unfiltered définit, entre autre, un niveau d’abstraction élevé pour le traitement des requêtes et des réponses, de manière à pouvoir exécuter toutes applications, utilisant la librairie “core”, sur une variété de serveurs, tel que Tomcat ou encore Netty.

La librairie se présente comme une simple couche de transition entre HTTP et Scala. Comme beaucoup d’autres frameworks, elle adopte pleinement certains concepts du langage comme pierre angulaire de son API. Pour cela, elle offre une approche élégante pour router les requêtes HTTP entrantes à travers l’utilisation du pattern matching.

Lire la suite...

Retour sur la nuit de l'info 2012


46fcc226a5df2739f95195258b98bfb5.media.600x375.png Dans la nuit du 6 au 7 décembre 2012 a eu lieu la 6ème édition de la nuit de l'info 2012. Il s'agit d'un concours national d'informatique proposé aux étudiants dont le but est de relever plusieurs défis autour d'un sujet commun annoncé au moment où le soleil se couche. Pour cette édition 2012, le sujet était : La promotion du patrimoine Français. Cette année, ce sont pas moins de 2213 étudiants répartis en 203 équipes sur 30 sites qui se sont livré bataille sur 36 défis lancés par des partenaires académiques et industriels.

Lire la suite...

Using Thymeleaf with Spring MVC


A previous post introduced the features of the Thymeleaf template engine in a standalone environment. Even if a standalone use of Thymeleaf can make sense - e.g. for short document generation or view testing - developers usually use the template engine in a web environment. This post covers how to integrate Thymeleaf with one of the most popular Java web frameworks, Spring MVC. We'll see also how to test the controller and the view with Spring MVC test framework.

Lire la suite...

Introducing the Thymeleaf template engine


There's a bunch of Java template engines, but one of them has been getting some momentum these days: Thymeleaf. Nice and powerful syntax, flexibility, vibrant community, and good integration with popular web technologies, these are all good reasons to discover this alternative to JSP. This article lists the core features of Thymeleaf and shows how to write and process an HTML template.

Lire la suite...

REST Web Services testing with Spring MVC


A previous post introduced the basic features of the Spring MVC test framework. This post covers the testing of a REST web controller: by checking the response status, the content type, and the returned JSON document , we'll verify if the controller behaves as expected.

Lire la suite...

Introducing Spring MVC test framework


Spring MVC comes with a very useful test framework, which allows doing in-depth testing without even starting a web container. If you struggle maintaining any application based on Spring MVC, this post will show you the basics of the Spring MVC test framework.

Lire la suite...

- page 2 de 34 -