Search This Blog

Thursday, October 11, 2012

Mon itinéraire ludique

Depuis très longtemps je suis passionné par les jeux de société. Pour autant que je me souvienne, c'est un virus qui m'a été inoculé par ma mère. Je me souviens encore que lorsque j'étais enfant, elle nous ramenait des jeux inédits de la ludothèque, voire même organisait des après-midi jeux de société pour nos amis et cousins.

Je vous parle ici d'une époque à la charnières des années '70 et '80, j'avais autour de 10 ans. Le jeu de société n'était alors pas ce qu'il est maintenant. Je suis loin de me souvenir de tous les jeux que nous pratiquions alors, mais quelques uns ont marqué ma mémoire, comme "Richesses du Monde", "Jumbo Jet", ou encore "Boggle", "Pente" ... (je n'ai jamais été passionné par le "Monopoly"). Certaines de ces boîtes ont même survécu jusqu'à aujourd'hui, au fond d'une armoire chez mes parents.


Par après est arrivé le "Trivial Pursuit", et toute la gamme des jeux à questions. N'ayant jamais accroché à ce style de jeux, qui n'ont pour moi aucun intérêt ludique, je me suis quelque peu désintéressé du jeu de société, à une exception près : "Embuscades", découvert par hasard au fond d'une armoire chez un copain. Nous avons passé des heures avec ce jeu. Je crois que ce qui m'avait séduit dans ce jeu, c'est que c'était une de mes premières expérience de jeu ayant une dimension de simulation.

Ce qui m'a fait revenir au jeu, c'est la découverte du magazine "Jeux et Stratégie". Directement j'ai été séduit. Je dévorais chaque numéro, puis attendais avec impatience le numéro suivant. Nous sommes dans la seconde moitié des années '80, et à cette époque ont voit les premières prémisses du jeu de société moderne. Je joue alors, notamment, à "Fief", et "Armada". "Jeux et Stratégie" m'aura fait découvrir aussi le jeu de rôle, qui vont prendre le pas sur le jeu de société pendant un long moment. Parallèlement, mon investissement dans un mouvement de jeunes me conduit à organiser de nombreux jeux en plein air, déjà influencés par mon attrait pour le jeu de société et le jeu de rôle.

Après être entré à l'université, je me suis donc plongé dans les jeux de rôle : "MEGA II", "L'Œil Noir", "Warhammer", "Toon", "Twilight 2000", "Empire Galactique", "Vampire - l'Âge des Ténèbres", "Star Wars D6", "Bitume", "INS / MV" ... Et j'en oublie sans doute. Je continue à pratiquer le jeu de société (améri-trash essentiellement) occasionnellement, grâce à un ami passionné qui achetait certains de ses jeux importé des USA (internet n'existait pas encore !) : "Civilization", "Shogun", "Axis & Allies", "Britannia", "Illuminati" ... Nous nous lançons même dans la création, et de cette époque date mon premier prototype de jeu complet : un jeu d'influence et de majorité inspiré de la guerre froide, mais transposé dans un monde divisé en 7 blocs idéologiques. Après avoir consacré d'innombrables heures à préparer un plateau de jeu (notamment en agrandissant une carte à la main, pas de scanner ni de PC à l'époque), nous ferons une première partie de test ... et puis j'oublierai le jeu sur une étagère. Quelques années plus tard, j'achète une boîte de "Cold War" dans une solderie, pour me rendre compte qu'il reposait sur une idée assez similaire ! D'autres jeux qui rejoignent ma ludothèque à l'époque : "Full Metal Planete", "Hannibal", "Europa Universalis" (le jeu le plus monstrueux que je connaisse — je n'y ai même jamais joué !).

Après quelques années de vie professionnelle, je suis initié au jeu de rôle grandeur nature. Je m'investis à fond dans cette activité et devient vite organisateur dans mon club (scénarisation, écriture de rôles, conception de système de règles), pour ensuite participer à la création de la fédération belge. En parallèle, je masterise "Donjons & Dragon 3e édition" dans les "Terres Balafrées". Je fais peu de jeu de société à l'époque, mais j'ai tout de même le temps de découvrir les "Colons de Catane" et "Elixir", puis plus tard aussi "Batt'l Kha'os", dont l'auteur est un bon copain rencontré en grandeur nature.

Tout passionnants qu'ils soient, les grandeurs nature sont également énormément chronophages. La vie suivant son cours, mon emploi du temps s'est recentré sur ma famille et j'ai du abandonner la plupart de ces activités. Mais le virus du jeu ne m'a pas quitté pour autant. Mon fils aîné atteignant l'âge auquel il pouvait être réceptif, il a commencé à découvrir petit à petit le monde du jeu, dans un premier temps via les figurines. D'abord avec un système de règles très simples (mais néanmoins efficaces) de mon cru, puis avec "Heroscape", pour finir par "Warhammer 40K". Il développa bientôt une passion pour ces onéreux petits bouts de plomb et de plastique couverts de peinture. Pendant quelques temps, j'ai donc aussi suivi l'actualité de Game$ Work$hop.

Depuis deux ou trois ans, j'écoute énormément de podcasts (une bonne façon de rentabiliser le temps perdu sur la route), initialement par intérêt professionnel (mon autre passion étant l'informatique). Je suis ainsi tombé par hasard sur les "BoiteCasts". Ce fut le coup de foudre, j'ai aussitôt téléchargé et écouté l'intégralité des épisodes (ou je sais, il en est à près de 300 (courts) épisodes). J'en ai par après découvert bien d'autres : "Proxi-Jeux" (mon préféré), "La Radio des Jeux", "Les Dessous du Troll", "Le Gobelin Rose", "Ludology", et récemment "This Board Game Life" (sans compter les podcasts consacrés au jeu de rôle).

Ces podcasts m'on fait revenir vers le vrai jeu de société, pour découvrir que toute une communauté de passionnés existait, à travers des sites web comme "Tric Trac" ou "BoardGameGeek", dans les clubs, et durant les conventions, les soirées jeux, etc. Je fréquente maintenant depuis quelques mois les soirées Jeux organisées pas Angelo dans son magasin "Les Chroniques Ludiques", et j'ai récemment participé au "Ludwikend" organisé par François (très bon souvenir, merci François !). Depuis que j'ai replongé, la taille de ma (modeste) ludothèque augmente à vue d'oeil, aussi je vous ferai grâce de l'énumération. (Les personnes intéressée pourront consulter ma liste sur boardgamegeek ou sur tric trac.)

Une parte épique de Battlestar Galactica + Pegasus au Ludwikend

Évidemment tout cela m'a donné des idées, et je ne vous cacherai pas que j'ai l'une ou l'autre idée de jeu derrière la tête. Cela fera l'objet de mes prochains posts ...

Monday, November 28, 2011

Devoxx 2011

Once again, more than 3200 passionate developers gathered for one week in Metropolis, Antwerp. The Devoxx event is split in two parts: the “University Days” on Monday and Tuesday (long conferences, tools, trainings and hands-on labs), and the “Conference Days” from Wednesday till Friday noon (keynotes, conferences, quickies and “BOFs” (round tables)).


Devoxx rocks!

What is unique in Devoxx, is that it is made by and for the developers (the real ones: those that are actually writing code!). You will see almost no commercial presentation there. On the contrary, speakers don't hesitate to display code, or even to write it live! You come back from Devoxx with tons of practical information and lots "things to try at home by myself".

It's also giant live Twitter walls all over the venue; 29 companies presenting their products and distributing their goodies at heir booth; 59 JUGs (Java User Groups), many whiteboards, and hundred of places to sit and start coding.

There is of course free WiFi, with this year a 1Gb/s internet pipe! Enough to give easy access to any participants (easy, except maybe for the few unlucky ones that are still using Windows instead of OSX ;-)).

Wednesday was the day of free French fries, Thursday of free movie ("Tintin" this year). There was also free beer and after parties every night... and countless occasions to meet members of the Java community, from all over the world. Devoxx is the place where any lambda developer can talk with the Chief Architect for Java at Oracle, for example.

To celebrate the 10th anniversary of Devoxx, each participant received a nice free mug (I chosen the HTML5 collector!), and was invited to a memorable free clubbing party at the Noxx.

Content, content, content

This year, Devoxx was 167 speakers giving about 174 sessions happening in 7 theatre rooms in parallel: 3 Keynotes, 1 discussion panel, 86 Conferences, 16 University, 10 Labs, 19 “Tools in Action”, 14 Quickies, and 25 “BOFs” (informal discussions)! These sessions cover 9 tracks: Java SE, Java EE, Web, Mobile, New Languages on the JVM, Methodology, Architecture, Security, and "Partner slots". There were up to 8 talks running in parallel.

Devoxx is initially focused on the Java ecosystem, i.e. not only the Java language, but also other languages based on the Java Virtual Machine, and all Java related frameworks in general. Also, more and more pure Web and mobile technologies are gaining importance in this conference. This year, HTML5 and Android talks were amongst the more attended ones (btw, let's highlight here the big presence of Google at this conference, and the quality of speakers they sent). Beside these, there are also a number of talks about the job of developer (or, should we say about the software craftsmanship).

Highlights

As usual, one of the big theme was the evolution of the Java language, especially with the long awaited release of Java 7, but also Java 8 profiling in the near future, and Java 9 added to the roadmap.

Probably the second most popular track was HTML5. The Web platform has evolved very rapidly since two years and it provides now a complete stack for developing client side rich application. Bye bye Flash...

Mobile platforms were also very present, especially the Android platform (whose programming language is Java) and mobile web technologies.

Several new JVM languages (non-Java languages running on the JVM) were present in the talk: Scala (lots of hype), Groovy, JRuby, Fantom, Ceylon. Some of these languages have now went past the experimental status and are used in critical enterprise context. "Web languages" were also present: JavaScript (and jQuery), Dart.

Let's also mention the iconoclastic talk from Martijn Verburg, the "Diabolical Developer", full of refreshing behavioral (anti-)patterns for the developer.

Sogeti

This year was also marked by the return of the presence of Sogeti. More than 10 consultants attended the conference, but also Sogeti was a Medium partner of the event and had a nice stand in front of the Google one. This was made possible thanks to a collaboration between Sogeti France, Netherlands, and Belux. Kudos for all the people who spent their time answering questions at the stand! And, last but not least, Laurent Guerin from Sogeti France made a well attended presentation about the Telosys web framework.

Thursday, March 31, 2011

GWT and Flex, a comparison

One of my customers recently asked me to help them choosing a framework for developing rich web applications, i.e. desktop-like web applications (see also my previous article [1]). After some internal discussion, it was decided to short list Google Web Toolkit (or GWT) and Adobe Flex. Microsoft Silverlight was not included for a number of specific reasons, like market share and coding culture. Moreover, the customer also asked to include jQuery in the study, even though it's not a complete framework (jQuery was already used by the customer, and the department had to justify the introduction of a new technology).

Note that the comparison that follows was done taking into account some specificities of the customer. A different context might lead to different conclusions. (There is no one-size-fit-all in the landscape of RIA frameworks.)

I took into account the latest versions of the frameworks at the time of this writing, i.e. GWT 2.2.0, WindowBuilder Pro / GWT Designer 0.9.0/2.2.0, Flex 4, Flash Builder 4 Premium Edition, (?BlazeDS 4?).

Criteria

Based on the typology I had established previously ([1]), I prepared the following list of criteria:
  • Staffing
    • Availability of programming skills
    • Learning curve
    • Documentation and Tutorials, Books
  • Productivity
    • GUI Builder
    • Object Mapping
    • Validation
    • I18n and L10n
    • Industrialisation (automatic builds, tests...)
  • Maintainability
    • Design patterns (MVC or MVP, IoC/DI...)
    • Testability
    • Programming language (static typed vs. dynamic typed, e.g. Java vs. JavaScript)
    • Risk (durability of the vendor)
After reading a number of references ([2]...[6]), I completed with a few additional criteria:
  • Staffing and Support
    • Community
  • Productivity
    • Data Binding
    • Widgets/components library
    • IDE support
    • Communication protocols and formats (REST, SOAP)
      (Communication formats (JSON, XML...) are discussed in the "Object mapping" criterion.)
  • Maintainability
    • Declarative UI design
    • Style sheet
    • Scalability (avoid server-side session)
    • Browsers versions coverage
    • Security
  • User experience
    • Mobile platforms support
    • Client side drawing
    • Printing
    • Drag and drop
    • DOM (browser) integration
    • Stability

jQuery

While GWT or Flex are complete frameworks, jQuery is only a Javascript library providing additional widgets and functions (events, interactions, effects) to the developer. It does not solve the maintainability issues of Javascript based web page design (no, or weak, design patterns, dynamically typed language, no declarative UI design, poor testability, no IDE support...). The productivity is also questionable, since there is no support for mapping objects to server resources, validating object attributes, or for internationalisation. For these reasons, we must consider jQuery more as a tool for improving the interactivity of a web page, not as an appropriate tool for building desktop like applications in an enterprise context (see [1] for the differences between a rich web application and a set of interactive web pages).

Comparisons

We here compare GWT and Flex through each set of criteria: staffing, productivity, maintainability, user experience.

Each criteria receives a mark between -- and ++ (- and -- for bad performance, + and ++ for good performance).

Since there are a lot of add-ons available in the respective communities, we've indicated with the special mark "opt." the criteria where there is support which is not native.

A "!" mark indicates a compatibility issue between some criteria.

Staffing and Support
The staffing and support criteria compare as follows:
CriteriaGWTFlex
Availability of programming skills+++
Learning curve+++
Documentation and Tutorials, Books++++
Community++++

Skills. Being 100% Java based, GWT has an advantage over Flex, where the client side application is built using a dedicated language (ActionScript), unique to Flash. Even though Flex skills are relatively common, ActionScript developers are clearly outnumbered by Java developers. This is even more significant for a company that is already using Java as his prime technology, since it already has inside resources that do not need to learn a new language.

Learning. Developing GWT based application is very similar to developing actual Java based applications, and the programming model is very similar to the one of Swing based applications. Hence, traditional Java developers won't be disoriented. Flex is reported as being quite easy to learn for web developers (partly because ActionScript is based on JavaScript), but won't be on par with GWT for existing Java developers.

Documentation, Communities. Both solutions have very large communities communicating on-line, one can easily find numerous tutorials on the web, and there are plenty of books available. The online communities also provide plenty of add-ons for both framework. (This is particularly useful for GWT, for complementing lack of native capabilities.)

Productivity
The productivity criteria compare as follows:
CriteriaGWTFlex
GUI Builder+!++
Object Mapping (JSON, XML...)-/opt.++
Data Binding+!++
Validation-+
I18n and L10n++
Industrialisation (automatic builds, tests...)++++
Widgets/components libraryopt.++
IDE support++++
Communication protocols and formats (REST, SOAP...)-, opt.++

GUI Builder. Google recently acquired the company "Instantiations" and is now delivering one of their product, "GWT Designer", together with the GWT framework. This is a full fledged GUI builder. However, since the acquisition is quite recent, both technologies are not yet fully integrated. Noticeably, it's difficult (if possible!) to use the "GWT Designer" with a declarative UI approach (see "UIBinder" further).

Object mapping. Object mapping is automatic when using GWR RPC for communicating with the server. When using other protocols, it will depend on the data format. For JSON, the mapping is obviously automatic to JavaScript, but one has to manually map the JavaScript to Java. When using XML, the mapping and the parsing must be completely done manually (or you'll have to rely to a third party module). For Flex, mapping is trivial since JSON and XML are native data types.

Data binding. In GWT, the "Editor" framework makes possible to do data binding. It must be configured programmatically (Java code) and relies on the declarative UI mechanism (UIBinder) (see further for impact of using UIBinder). In Flex, the data binding mechanism is available both in the declarative UI (MSXML) and programmatically (ActionScript).

Data validation. In GWT validation must be programmed manually, or through a third-party add-on providing JSR 303 validation (though there is immature (partial, unstable) JSR 303 support in native GWT). Advantage of JSR 303 would be that you could reuse the same code on the server. Client side data validation is done in Flex using "Validators". They are available both in the the declarative UI (MSXML) and programmatically (ActionScript). A number of predefined validators are provided and custom validators can also be defined.

I18n and L10n. GWT manages localisation with resource files. There is also a specific mechanism helping generating these files from the declarative UI (UIBinder) files. Flex does support localised strings through ResourceManager.

Industrialisation. A GWT app can also be compiled from command line, or even through a 3rd party Maven plugin. Only the premium edition of Flash Builder provides Ant based build and unit tests (hence also command line) capability for Flex. Maven support is only possible through third party plugin.

Widgets library. Standard GWT widgets are quite basic, though lots of third party add-ons provide very rich libraries. Standard Flex widgets library is already very complete.

IDE support. GWT comes with a plugin for Eclipse (free), providing a.o. a unit test framework, an emulation mode to simulate the behavior of the browser, text completion for JavaScript and UI design file... Flex has its own commercial IDE, Flash Builder (either as an Eclipse plugin, or as a standalone Eclipse based application) providing also text completion, refactoring... The premium version of Flash Builder comes with "testing tools such as profilers, network monitoring, an automated testing framework, integration with Flex unit testing, and command-line build support (...)".

Communication. REST communication is possible from GWT by constructing HTTP requests. The framework provide no facility to automatically bind a data object to a REST service. SOAP is not possible without third-party add-on. Hopefully, GWT also provides a proprietary protocol (GTW RPC) that provides automatic binding. Flex provides support for both SOAP and REST-like protocols, as well as a proprietary protocol (AMF). All can be used either from the declarative UI or from the code. There is also a mechanism for managing remote data objects.

Maintainability
The maintainability criteria compare as follows:
CriteriaGWTFlex
Design patterns (MVC or MVP, IoC/DI...)++, opt.+(+), +
Testability++++
Programming language (static typed vs. dynamic typed, e.g. Java vs. JavaScript)+++
Risk (durability of the vendor)+++
Declarative UI design+!++
Style sheet+++
Scalability (avoid server-side session)++++
Browsers versions coverage+++
Security--

Design patterns. GWT recommends using the MVP design pattern. The GIN Google add-on brings to GWT dependency injection based on JSR330. Flex uses the MVC design pattern and it uses a dependency injection mechanism in the declarative UI files. [?Event bus?]

Tests. GWT can be tested using JUnit. There is a test container making possible to run unit tests  without starting the whole UI. There is also a "development" mode in the Eclipse plugin that makes possible to run the whole UI in the browser without compiling the code (which is very slow!). GWT can also benefit from all existing Java libraries (like Hamcrest, FEST, jMockit, Mockito...) for writing unit tests. Adobe provides FlexUnit 4, a framework similar to JUnit. It also provides a UI test container (UIImpersonator).

Language. GWT is based on (a subset of) Java, which is statically typed .Flex uses ActionScript (see [10]), based on JavaScript, which is not statically typed, but there is an option of the compiler that enables strict type checking. Besides this, ActionScript has more OO features than standard JavaScript.

Vendors. Both vendors (Google and Adobe) are well established. Though Adobe, being a smaller player, is more subject to buyout. Another hand, Google is not a software house, and nothing guarantees it will keep the focus on GWT, though it is a strategic product for Google.

Declarative UI. GWT: UIBinder (compatibility with GWt Designer?). For Flex, the MSXML UI declarative language is at the base of the framework and is directly edited by the WYSIWYG editor in Flash Builder.
Styling. Both frameworks support CSS. The version of CSS supported by GWT will depend on the target browser and this can be tedious in case you target a multi-browser environment. Flex not only has support for CSS at various levels in the UI, but also for themes (packaged style sheets and assets).

Scalability. Both frameworks enable building a RIA where the whole UI context is maintained on the client side, hence enabling session-less server-side code.

Coverage. GWT supports all major browsers. It does this without performance impact because it generate separate sets of resource for each "kind" of client (a "kind" of client being a permutation of browser family and language). Note that there is always a risk of having to recompile an application when a new browser appears, in case it's not fully compatible with older browsers. Flex is completely independent from the browser, since it runs in a separate plugin.

Security. The level of protection of an application built with GWT cannot be better than what is provided by the web browser. In that respect, a GWT application is neither worse nor better than a traditional web application, being subject to all traditional web exploits (like cross-site scripting...) The Flash player has a SandBox mechanism to isolate an application and avoid malicious attacks to the client side code, however it has not proven to be very robust. (Most recently known exploit have been patched last month only!)

(Has an illustration, in 2010, for Windows, the site secuser.com reported 10 critical vulnerabilities for Internet Explorer and 7 for Flash (+ 1 medium). During the same period, only 3 critical vulnerabilities were reported for Java.)
User experience
The user experience criteria compare as follows:
CriteriaGWTFlex
Mobile platforms support+++
Client side drawingexp./opt.++
Printing-+
Drag and dropopt.++
DOM (browser) integration++++
Stability++-

Mobile platforms. Since a GWT application runs in a web browser, it can target any platform with a web browser (provided that it supports JavaScript). This is the case for all modern smartphones. Moreover, with the advent of HTML5 in Android, iOS, and RIM phones, the capabilities of applications running in the browser will be even closer to native apps. On the other hand, Flex is now supported by most smartphones manufacturers except one, but which is not the least since it's Apple.

Drawing. Client side drawing is only an experimental feature in GWT (at least until 2.2) and it uses HTML5 Canvas (hence requires a compatible browser). There are also third-party libraries providing drawing capabilities for any browser. Drawing capability is native in Flex, and is very powerful, being the Flash inheritance.

Printing. GWT provides access to the browser "Print" command. Printing a specific item requires to render it first in a separate window or frame. Flex has a built-in API for controlling a printer. This API enables printing any "Sprite" (a displayable component).

Drag and drop. Drag and drop support is provided has a third party library in GWT. It is native in Flex.

Browser integration. Integration of GWT in the browser is de facto. For Flex, communication with the browser is possible through JavaScript code. Both GWT and Flex have support for deep linking (linking directly on a specific view of the application) and browser history mechanism (Back and Forward). GWT does this through "History Tokens" mechanism, and Flex through javascript ("history" resources) and BrowserManager class.

Stability. Flash has sometimes be reported to present stability issues due to memory management. Moreover, since it requires a plug-in, Flex has a negative impact on memory per se. It is also to be noted that some Flash implementations (typically on Mac OS) had known dramatic CPU performance impact in some situations. This has only be fixed in recent versions of the Flash player.

Other considerations
BlazeDS... an open source server side framework from Adobe to ease integration of Flex with the application server, data, and other web services.

HTML5... likely the platform of the future. Will be natively supported by GWT. On another hand, Adobe has recently shown effort to support it also transparently from Flex projects.

Multimedia (video, web cam...)... are supported by Flex. GWT support is limited to web enablement (cf. also recent HTML5 progresses).

Summary

GWT: There are more skilled people, ad there is a better browser integration. Lot's of missing capabilities are possible only through third-party add-on, for which there is no guarantee of longevity.

Flex: It's more complete, has better productivity and better user experience. Capabilities for communication, object mapping, and data validation are very good. There might be a performance impact.

Both share the low security profile of any web based application.

Recommendation Given the specificities and needs of my customer, based on the above advantages, and on the opinion of both developers and customer architect, I recommended the selection of Flex.

References

Friday, February 11, 2011

Rich Web Apps: RIA, AJAX... - An overview

I've already been several times confronted with the task of explaining what Rich Internet Applications (RIA) are, and why they are different from classical web applications. This is the reason why I wrote this article. It is not meant to be exhaustive and it might contain some approximations but I hope it can help the reader to get an insight and build his own idea.

Web applications typology and RIA

Since advent of the Web era, web sites have evolved by becoming more and more dynamic, then more and more interactive, and more and more complex...

We can schematically distinguish the following successive phases:
  • static web sites (pure HTML)
  • light dynamic web sites (CGI processes on the server side)
  • dynamic pages (JavaScript + DOM + CSS)
  • interactive pages (+ AJAX)
  • rich web applications (RIA...)
« A RIA is a web-based application that is designed to provide functionality similar to a desktop applications. Some RIAs run completely inside a web browser while others are browser-independent. » [1] This definition implies, notably, that just adding a few AJAX interactions to web pages is not sufficient to turn these pages into an RIA. Sometimes authors insist on this difference by distinguishing "thick RIA" from "light RIA". Though, in our understanding, an RIA is always of the "thick" kind and we won't consider "light" RIA as true RIA.

Note that there is a controversy in the literature on the usage of the term RIA. For some, like Gartner, RIA designate only applications running independently from the browser (like Java VM, Flex, or Silverlight). For others, like Kristen Waters, the term RIA also covers applications running inside the browser. In this article we target all cases and, to avoid confusion, we will use the broader expression "rich web applications" (or RWA).

Typical characteristics of rich web applications, compared to traditional web sites, are:
  • richer user experience thanks to more user controls (not limited to basic HTML controls), in-line editing, drag and drop...
  • UI logic running on the client side / session less server side
  • reduced reliance on network/server communications, by transferring only data or partial pages instead of refreshing full page
  • better performances, lower load on the network and on the servers
  • better scalability
  • largely browser and OS independent
  • difficult to index by search engines
Compared to traditional desktop applications:
  • better security, "sandbox" isolation
  • easy distribution, deployment and maintenance
  • application accessible on any host, instantly
  • OS independent
Typical use cases for RWA are:
  • office application (word processor, spreadsheets, presentation tools...) (e.g. Google Docs)
  • personal information and communication (mail, contacts, calendar, tasks, chat, feed aggregation...) (e.g. GMail-GCalendar, Outlook Webmail)
  • cartography (e.g. Google Maps)
  • CRM (E.g. Salesforce.com)
  • Business Intelligence (E.g. BimeAnalytics.com)
  • Development tools (E.g. App Inventor)
  • Software-as-a-Service (SaaS) in general

Frameworks

As already said, one can distinguish two kinds of rich web applications. Those based on a framework running in a specific virtual machine (like Java VM, Flex, or Silverlight) on one hand, and those using the browser itself as a virtual machine on the other hand.

Frameworks using the browser as a virtual machine capitalize on the capabilities of HTML, DOM, CSS, and JavaScript. They also usually enable development to be independent from the target browser with seamless degraded mode for old-dated versions.

These are a few well known browser based frameworks:
  • GWT (Google Web Toolkit)
  • Cappuccino
But there are also plenty of vendor specific frameworks, usually little known and used mainly in enterprise environments, like for example General Interface (from TIBCO). Though, most developers available on the market would likely not know these vendor specific frameworks.

Frameworks using a specific virtual machine have the disadvantage of requiring a specific prior install, typical in the form of a browser plug-in. (Though this inconvenient is insignificant in the case of Flex, since the Flash Player is deployed in 96% of internet enabled desktops. For Java the figure is 79% and for Silverlight, 61%. [2]) Advantages are better performances and even richer experience.

Here follows an indicative list of choice factors:
  • Staffing
    • Availability of programming skills
    • Learning curve
    • Documentation and Tutorials, Books
  • Productivity
    • GUI Builder
    • Object Mapping
    • Validation
    • i18n and l10n
    • Industrialisation (automatic builds, tests...)
  • Maintainability
    • Design patterns (MVC, MVP...)
    • Testability
    • Programming language (static typed vs. dynamic typed, e.g. Java vs. JavaScript)
    • Risk (durability of the vendor)

Links

[1] "What is RIA?", by Kristen Waters

Monday, January 24, 2011

Mobile Apps Development: Native vs. Web

When it comes to start developing apps for mobile devices, a difficult question is immediately raised: which platform should we select? Indeed, the mobile landscape is the scene a fierce fight between major players (like Microsoft, RIM, Apple, and Google) or challengers (like HP and Nokia). Each of these platforms comes with its own way of developing apps; they often use different languages and SDKs, and always have different APIs.

There is obviously no unique answer to the question. It depends on a lot of factors.

The way you interpret those factors depends on your intent. Are you an individual who wants to invest time on its spare time to build skills in a new technology? Are you a software architect who must make a technical choice for a specific project? Are you an enterprise that must set architecture principles impacting all developments for the coming years?

An individual will take into account its personal taste; the software architect will consider the specific requirements of the project; while an enterprise will have more strategic considerations.

Choice factors

There are factors that are typical when you make a technology choice, like cost, performance, availability of technical resources (it might be easier to find Java developers than Objective-C developers), integration with the existing architecture, etc.

Then, there are factors that are typical to the mobile apps development landscape. Mobile appshave very specific characteristics that traditional applications don’t have:

  • Limited resources
  • Limited or varying connectivity
  • Specific hardware: touch screen, camera, GPS, accelerometer, NFC…
  • Specific services: contacts, calendar, SMS…

These bring additional constraints you have to take into account when choosing a technology.

Mobile platforms diversity [Max Katz]

Two alternatives

When it comes to make a decision there are two main tracks you can take, either you go for native development, or you go for web based development. Each track comes with its own advantages and drawbacks, but the gap becomes smaller, especially since the raise of HTML5 techniques opens the door to web apps that can compete with native ones.

Both solutions share the following advantages: easy deployment, fast time to market, good user experience, local storage, off-line mode…

Advantages of native development (and drawbacks of web development) are: integration with device services and hardware (though some services might be available through HTML5, like location); and best performances.

Advantages of web development (and drawbacks of native development) are: only one set of skills to address all platforms (no fragmentation: pretty much all mobile platforms now (will) support HTML5), re-use of existing enterprise connectivity infrastructure, no overload of device apps collection.

So, it will depend on the kind of requirements your application will have. You will choose the native track for: games, access to device features, high performance, rich graphics, single platform target, and – in some cases – off-line mode. You will choose the web track for everything else, especially if supporting multiple platforms or enterprise connectivity is important.

This section is based on a presentation by Max Katz at Devoxx 2010:
“Mobile Development Choices: Native Apps vs. Web Apps” http://goo.gl/mc0Gl

The third way

Since very recently, a third way is taking shape in the form of the Adobe Flex SDK. It provides a common stack for all platforms. Three alternatives can be chosen for the distribution: either Flash web applications, similar if not identical to applications running on personal computers; or Flash applications deployed locally; or by cross-compiling to a native app. Note however that, for iOS, only the latter is possible, due to Apple boycott of Flash.

Mobile applications based on Flex might gather the advantages of both native and web based development, but this technology is very recent in the mobile landscape, and not yet finalized for all platforms. Future will tell us if it’s a viable alternative.

Monday, December 13, 2010

Devoxx 2010

This year again 3200 passionate Java developers gathered during one week in the Metropolis of Antwerp. The Devoxx event is split in two parts: the “University Days” on Monday and Tuesday (long conferences, tools, trainings and hands-on labs), and the “Conference Days” from Wednesday till Friday noon (keynotes, conferences, quickies and “BOFs” (round tables)). In this short article we'll try to introduce you the hottest topics of this year edition.

Devoxx is big

Devoxx is 116 speakers giving about 150 sessions happening in 5 theatre rooms in parallel: 5 Keynotes, 65 Conferences, 16 University, 8 Labs, 16 “Tools in Action”, 14 Quickies, and 24 “BOFs” (informal discussions)! These sessions cover 8 tracks: Architecture/Security, Cloud/NoSQL, Desktop/RIA/Mobile, Java Core (SE/EE), Methodology, New Languages on the JVM, Web Frameworks, and Other. We could of course only follow a small portion of the talks (illustrated by the tags cloud here below).

Java and Web future

One of the hottest topics of conference was the future of Java. The road-map for Java 7 and 8 has been extensively described. Mark Rheinhold and Brian Goetz explained that the motivation of many of these changes is to make the language more suitable for multi-core systems, currently the only solution to increase the performance of a node. There were also lots of discussions on how the language should evolve in the future, with a vast majority of the participants voting for a break in the backward compatibility constraint. A big move compared to previous years is the growing popularity of JEE, due to the new version 6. JEE has solved many of the drawbacks inherited from the previous version and is now as seducing as the Spring alternative.

Another big trend for the future is the new Web standard, HTML5. With this new version, HTML is not only a presentation language anymore, but also provides new multimedia support (video, audio, 2D drawing) and many application API's (offline storage, local DB, cross-document messaging, WebSocket's (AJAX), geo-location...). All these new capabilities will turn the browser into a decent RIA platform. This will have impact in several domains: more responsive web application with richer end-user experience, more standalone applications being replaced by web applications, viable alternative to Flash applications... Moreover, in many circumstances, HTML5 can solve the problem of the mobile market fragmentation, where companies can avoid maintaining applications for many different platforms (iOS, Android, RIM, Win7, WebOS...). Together with the rise of AJAX based web UI, the REST style is gaining more and more support and will likely override SOAP and WS‑* specifications.

Other tendencies

There was also a whole track dedicated to “NoSQL” (a back-cronym for “not only relational databases”). NoSQL covers a lot of different approaches corresponding to different use cases. This domain is still moving a lot and lacks of standardization, but it's certainly an option to consider if you want to solve scalability issues. On another hand, by relaxing constraints on the structured data storage, it can help dealing with cases where the application must change often, by limiting the needs for data schema migration. The “cloud” was also a very popular topic.

On the front of the new languages running on the JVM, the most popular one this year was Scala, a statically typed language mixing object-oriented programming and functional programming. Though it has many supporters, many people think it will remain a niche language, because of the a learning curve and cryptic readability tendencies. The second most popular language was Groovy, a dynamic language that can be used as a scripting language for the JVM.

Last buzzword, the “Dev/Ops”, which express the “emerging understanding of the interdependence of development and operations”. This is more particularly applicable with new “agile” methodologies, where the border between development (or change) and operations (or run) tend to disappear.

Fun

But Devoxx is not only conferences. It's also giant Twitter walls; more than 26 companies presenting their products and distributing their goodies; 67 JUGs (Java User Groups), whiteboards, 140 Mbps internet throughput through free WiFi, lots of beer, French fries, after parties... and countless occasions to meet members of the Java community, from all over the world.

In a few words: Devoxx is THE place to be for every Java/Web/Mobile developer.

Read all Devoxx related blogs at: http://www.devoxx.com/display/Devoxx2K10/Blogs

Wednesday, October 15, 2008

4 mois avec l'HTC Touch Diamond

J'utilise un HTC Touch Diamond depuis maintenant 4 mois. Il y a peu, un ami qui comptait s'acheter un HTC me demandait mon avis sur le Diamond. Ses questions portaient sur les points suivants :

  • Comparaison avec le Touch Pro d'HTC, clavier vs. écran tactile

  • Autonomie de la batterie, extension de la batterie

  • Sensibilité de l'écran aux griffe

En répondant aux question, j'ai finalement fait un review complet de mon expérience avec cet appareil. Comme d'autres personnes me posaient des questions à ce sujet, j'ai choisi de vous livrer ces considérations ici …


Voici mon opinion après 4 mois d'utilisation, sachant que mon avis n'est peut-être pas représentatif, vu que je viens de loin (mon GSM précédent était plutôt "pré-historique" (un Nokia 6250, accompagné d'un Palm Zire 71).

Design

L'appareil est très beau, mais c'est bien sûr purement subjectif.

L'appareil est très petit (à peine plus grand qu'une carte de visite). Mon premier étui de protection était d'ailleurs un étui à cartes de visite !

Écran

L'écran est excellent (résolution 480x640!). J'ai déjà regardé des films entiers sur mon téléphone.

J'utilise le film protecteur livré avec le téléphone. Jusqu'à présent je n'ai à déplorer qu'une petite griffe (sur la protection), mais de toute façon le jour où je ne veux plus voir la griffe, je n'ai qu'à remplacer la protection. Important : mettre la protection d'office, et le plus vite possible pour garder l'écran impeccable. Ça diminue légèrement la sensibilité de l'écran mais ce n'est pas vraiment génant. (À savoir aussi qu'il semblerait que la sensibilité de l'écran du HTC Touch HD (voir en fin d'article) serait encore meilleure (?))

Batterie

La batterie plus grosse existe en effet (c'est un accessoire à acheter en plus). Elle augmente légèrement l'épaisseur du teléphone, et l'augmentation d'autonomie est d'environ 50%. À voir si ça en vaut la peine. Tenir compte de l'épaisseur lors de l'achat d'un étui. Pour ma part, mon téléphone est souvent branché : sur l'allume-cigare quand je suis en voiture, sur mon PC quand je suis au bureau (cf. plus loin la synchro) … donc je suis très rarement à court.

Et le connecteur d'alimentation est compatible avec le standard mini-USB, donc c'est exceptionnel que je n'ai pas de source à disposition. Par contre si tu envisages de rester régulièrement plus de 2 jours éloigné de toute trace de civilisation (j'entends par là sans accès à une prise de courant ni à un PC), alors la seconde batterie s'impose.

Interface utilisateur

L'interface HTC (Touch & Co) est bien pensée. Sans elle WinMo (Windows Mobile) rendrait le téléphone lourd à utiliser. Le système apporte de réels plus pour certaines fonctions, comme l'appel téléphonique, l'envoi de SMS, la recherche de contacts …

L'interface tactile en général constitue une très bonne surprise. Une de mes plus grosses craintes était l'absence de clavier. En fait celui-ci ne me manque absolument pas. Le clavier virtuel (tactile) de HTC est très efficace, voire plus qu'un clavier "réel" dans certains cas. Maintenant je ne sais pas ce que ça donnerait en cas d'utilisation intensive (envoyer beaucoup de messages par exemple). Mais je ne suis pas non plus convaincu qu'un clavier mécanique apporterait une énorme amélioration dans ce cas-là.

Les quelques boutons présents en bas de l'écran permettent énormément de manipulations également (plus qu'on ne croit) (voir aussi plus bas: fonctionnalités cachées)

À propos de l'interface WinMo en général : je la trouve plus pensée pour un agenda (style Palm) que pour un téléphone. Sans la couche HTC ce serait lourd. Par contre, excellente bibliothèque d'applications et très bonne synchro.

Synchronisation

La synchro avec Outlook : le pied, j'ai accès en permanence à la quasi la totalité de mon Outlook (Contacts, Calendar, Tasks, Notes), avec tous les détails. Beaucoup mieux que ce que j'avais avec le Palm.

Pour ce qui est de la synchro directe avec d'autres produits (Thunderbird ou autres), je n'ai pas testé, pour l'instant je passe par l'intermédiaire de Outlook (i.e. je synchronise Outlook avec Google, et je synchronise Google avec Thunderbird).

Applications et Java

Rien à envier avec le Palm. On trouve à peu près tout ce qu'on veut. Une des meilleures que j'ai actuellement : KeePass (existe aussi pour Windows, Linux, MacOS X, Palm, BlackBerry, Java ME …). Voir aussi l'article Wikipedia.

Pas d'avis sur le moteur Java livré (esmertec Jbed), je n'ai jamais eu à l'utiliser, vu la pléthore d'applications WinMo disponibles.

Navigateur Web et Emails

Opera est le meilleur navigateur mobile actuellement (au moins comparable à l'iPhone, et meilleur que tout le reste).

Toutefois, ne pas s'attendre aux même performances que sur un PC, même si on est connecté à Internet en haut débit ou via le WiFi : ce n'est ni le même CPU, ni la même mémoire. C'est un peu lent, mais très utilisable, et la plupart des sites web sont supportés (pas de problème avec le JavaScript, au contraire du browser mobile de MS). À savoir aussi que les Flash ne sont pas (ou mal) supportés. Ainsi il faut une application dédiée pour se connecter à YouTube. (Qui marche d'ailleurs très bien.)

Je n'ai pas eu de réel problème de réception ou d'envoi de mails. Mais je ne récupère mes mail que de temps en temps "à la demande", pour éviter de trop pomper dans mon forfait.

GPS

Le capteur fonctionne bien. J'ai déjà utilisé quelque fois avec Google Maps sans problème (ahhh … taper le nom d'un resto dans Google et en quelques clics l'appareil t'affiche l'itinéraire, presque de la science-fiction ;-)).

Toutefois je ne l'utilise que rarement pour l'instant car la connexion à Google Maps me coûte dans mon forfait. J'attends soit de passer à un forfait Internet mobile illimité, soit d'acheter des cartes GPS pour WinMo. Entre temps j'utilise encore mon GPS séparé (un Mio H610 dont je suis très content).

Complexité, Customisation

On peut configurer/modifier/customiser énormément de chose. C'est quasiment un micro-PC. C'est parfait pour un geek, mais pas du tout adapté à la ménagère lambda.

Les inconvénients principaux

  • mémoire limitée : ça m'est arrivé quelque fois d'être bloqué par la quantité de mémoire de travail disponible, notamment lors de l'utilisation des application suivantes : Opera (rarement), Acrobat, MS Word. De plus je n'arrive pas à ouvrir certains (gros) documents DOC ou PDF, et je soupçonne que c'est à cause du manque de mémoire. À savoir aussi qu'Opera ne permet de n'ouvrir que 3 onglets au maximum.

  • instabilité de WinMo : je dois (trop) fréquemment faire un reboot (voire un soft reset) du système. C'est gênant quand ça arrive au mauvais moment (e.g. pendant qu'on fixe une date de rendez-vous pendant une réunion). Difficile de dire si le problème vient d'HTC ou de MS, mais je penche pour MS. Certains utilisateurs disent avoir dû parfois faire un "hard-reset" (= remise à zéro de toute la mémoire). Ça ne m'est encore jamais arrivé, mais c'est un risque si on chipote un peu trop (registry, programme modifiant le système …). Dans ce cas mieux vaut avoir fait un full backup avant ! (Ce que je conseille si tu installes certains types de programmes, mais je n'ai pas (encore) trouvé d'appli gratos qui le fait. Je n'ai pas réussi à faire fonctionner l'appli de backup livrée avec l'appareil au delà d'une période d'essai limitée.)

  • temps de réponse de l'interface : il y a en général un petit délai de réaction du système, dont la durée est variable (en fonction de l'activité du système). C'est par moment très gênant. À mon avis inévitable et probablement dû à l'architecture de WinMo.

  • temps de réponse de la sonnerie : un corollaire du point précédent : il s'écoule souvent un délai de quelques secondes entre le moment où un appel est reçu par l'appareil et le moment où la sonnerie se fait entendre. Il faut alors se dépêcher de répondre avant que le correspondant ne soit transféré sur la messagerie. Il existerait une solution consistant à forcer le système à garder le WAV de la sonnerie dans une sorte de mémoire cache, mais je n'ai pas testé car selon les forums, le résultat n'est pas convaincant. Il est aussi possible que le problème ne soit pas le même selon la sonnerie choisie (certains fichiers sons sont peut-être d'office en cache, ou plus rapide à charger.)

  • trop grande sensibilité (!) de l'interface tactile : j'ai acheté un étui de ceinture pour transporter l'appareil (vu ma maladresse proverbiale, je ne transporte pas ce genre d'appareil au fond de ma poche). Lorsque je le range dans l'étui, je dois faire un lock screen pour éviter les "clicks" intempestifs. Jusque là, OK. Mais lorsque quelqu'un m'appelle, le lock se désactive automatiquement (pour permettre de décrocher en poussant sur l'écran). Comme l'appareil vibre dans son étui, il a tendance à décrocher tout seul. (Toutefois ce problème doit être neutralisable moyennant le tweak ad-hoc, que je n'ai pas encore trouvé.) [UPDATE: J'ai depuis résolu ce problème en achetant un nouvel étui Krusel Orbit Flex, spécialement prévu pour le Diamond. Plus de contact avec l'écran et donc plus de problème !]

  • pas moyen d'écouter le radio FM sans brancher les écouteurs : le fil sert d'antenne, et l'appli refuse de démarrer si elle ne détecte pas l'antenne. D'un autre côté, si on a un forfait limité, y-a-qu'à écouter une radio MP3... ;-)

  • pas de port SD (quoique : je suis encore loin d'avoir épuisé la mémoire de stockage disponible (4 GB))

  • le forfait GSM : attention à la formule choisie et à la note à la fin du mois. Bien réfléchir au type d'utilisation qu'on veut faire, et se tenir à une discipline une fois le choix fait. Ne pas hésiter à installer une appli type "Spb GPRS Monitor" si on ne prend pas un forfait illimité.

  • la connexion data automatique : dès qu'une appli tente d'accéder à Internet, si aucune connexion n'est présente, le téléphone se connecte automatiquement via GPRS/3G. Donc je dois faire attention de bien le connecter manuellement via WiFi ou USB (ou BlueTooth) à chaque fois que c'est possible, pour éviter d'exploser mon forfait GSM. Je n'ai pas trouvé de moyen élégant de l'empêcher (par exemple : donner la priorité au WiFi, ou l'obliger à demander une confirmation avant de se connecter au 3G). Workaround : soit désactiver le 3G dans le Control Panel (fastidieux : il faut le ré-activer à chaque fois qu'on veut l'utiliser), soit configurer toutes les appli pour éviter qu'elles se connectent sans ton avis (ça concerne surtout le client mail, mais pas uniquement). Cas vécu : j'avais laissé Opera ouvert sur une page de Facebook, après avoir coupé le 3G. Mais comme la page de Facebook fait des requêtes asynchrones régulièrement pour checker s'il y a de nouveaux messages, le téléphone s'était automatiquement reconnecté au 3G pendant qu'il était dans ma poche. Je m'en suis rendu compte … 3 heures plus tard ! (Et j'ai pour l'instant un forfait à la durée :-( ) Je ne désespère pas de trouver une solution à ce problème (qui est purement software), mais n'ai encore rien trouvé jusqu'à maintenant.

XDA Developers

Ne pas hésiter à parcourir les (nombreux) posts sur le forum de XDA Developers pour "tuner" l'appareil au mieux. Certains petits inconvénients ont étés facilement résolus moyennent le bon paramétrage. À ce sujet, je conseille "Total Commander", pour parcourir/éditer les fichiers *et* la registry.

Fonctionalités cachées

À savoir : le Diamond est bourré de fonctionnalités cachées. Par exemple : la surface des boutons en-dessous de l'écran est en fait un capteur capacitif (comme l'écran de l'iPhone), mais n'est pas exploité par le système existant (en dehors de la rotation autour du bouton central, très pratique pour zoomer ou faire défiler une liste). Autre exemple : la rotation automatique de l'écran en fonction du détecteur de mouvement ne fonctionne que pour quelques applications (comme le browser Opera), or il existe un petit add-on ("GSenToggle") qui permet de l'activer pour toutes les applications.)

Alternative : HTC Touch HD

Outre le HTC Pro, HTC est sur le point de sortir le HTC Touch HD :

  • pas de clavier
  • quasi aucun bouton
  • écran encore plus haute résolution (480x800)
  • plus de mémoire
  • touchscreen encore plus sensible
  • port SD
  • jack sépare pour les écouters (sur le Diamond il faut utiliser un cable spécial qui se branche sur l'USB)
  • caméra 5MP

Si tu es plus aventureux, tu peux aussi attendre la sortie du HTC Dream (a.k.a G1), basé Androïd. Mais la c'est un tout autre système.

Sélection d'applications

Une petite sélection d'appli WinMo intéressantes :

  • Total Commander (File Manager & Registry Editor)
  • Sprite Explorer (Registry Editor à partir du PC, nécessaire pour certains type de registry key pas éditables avec Total Commander)
  • Sprite Backup (pour pouvoir faire un full backup) (payant)
  • KeePassPPC (passwords manager)
  • GSenToggle (basculement automatique de l'écran)
  • Mobipocket (lecteur d'e-books)
  • Pocket Lemmings (pour les nostalgiques)
  • acbTaskMan (pour pouvoir killer les process envahissants) (pas terrible, mais stable. Je n'ai pas encore trouvé mieux et gratos.)
  • BeeTag ou i-nigma ou QuickMark (pour scanner les codes barres 2D) (note: je suis d'ailleurs désespérément à la recherche d'une appli équivalente (gratos) pour les codes barres linéaires)
  • Skype (très utile pour téléphoner à l'étranger depuis n'importe où à la maison; J'ai déjà testé via le WiFi, mais pas encore via le 3G. Il paraît que certains opérateurs bloquent l'accès à Skype via le 3G pour éviter la concurrence, mais je n'ai pas encore vérifié ça chez Proximus.)
  • Spb GPRS Monitor (pour comptabiliser les coûts de connexion data GPRS ou 3G) (appli payante)
  • MyMobileR (pour utiliser le téléphone à partir d'un PC)
  • WMWifiRouter (pour transformer le GSM en point d'accès internet sans fil)

Indispensables à mon avis :

  • un File Manager
  • un Registry Editor
  • un programme de full backup
  • Skype
  • selon le forfait : un programme de monitoring des connexions data

Envoyez-moi vos commentaires.