vendredi 29 juillet 2011

JDK7: Where's my method ?

Yup, it is finally here. Long live to JDK7!
Well hopefully no that long, some people died of age waiting for this version.

Even if my work at Igalia do not usually involve Java coding, I keep an eye on the platform and enjoy some Scala coding sessions. Abstracted from all the complexity of managing object orientation and memory by-hand, helped by amazing tooling and funded by big shots, the community there pushes the envelop in the architecture,methodologies and good practices fields. Always interesting to learn from.

While bringing some improvements to the Java language and APIs, IMHO, the InvokeDynamic framework is the most important addition.
Type inference for generics, handled resources, interesting new/updated APIs (join/fork, NIO2, FileSystem) are great but making dynamic languages at home on the JVM is an amazing achievement.

Basically, InvokeDynamic let the JVM know and cache implementors decisions regading dynamic method call resolution/transformation at first call. Subsequent calls are then treated directly by HotSpot as any other invocation, applying its dark magic to optimize the hell out of it. And Hotspot is a good wizard.

Lets see how JRuby, Groovy and Jython will take advantage of it. JS might prove a greater challenge with its fully dynamic prototype typing, but work is on the way.

Posted from GScribble.

mardi 26 juillet 2011

SeedKit BoF at Desktop Summit 2011


The Desktop Summit organizers recently announced the final schedule of the BoF sessions. The SeedKit proposal was selected !

So lets meet Friday, 12th August 10am in room 1.301 to discuss the opportunities of using web UI technologies to build offline gnome apps or augment your existing application with webby views.
We could even talk about your irresistible lust to contribute your ideas, skills or enthusiasm to the project!

In the mean time, get a look at the session proposal and add your name to the attendants list if you can.

See you all there.

mercredi 20 juillet 2011

Growing SeedKit

SeedKit being more than a year old, now is a good time to do a retrospective, get an overview of what's coming next and where you could help.

By lowering the entry barrier for building, distributing and maintaining a Gnome application, the SeedKit project wants to attract new contributors and make current developers' life easier.
The approach taken is simple: let developers reuse their web UI development skills, tools and community.
Furthermore, the resulting UIs will be more flexible, eyes-pleasing and dynamic, thanks to the amazing progress of the HTML/CSS/JS threesome in WebKitGtk and Seed.

So where are we now ?

We currently provide an GTK widget rendering HTML/CSS/JS content where native libraries and services are accessible from the JavaScript context.
DBus services, GObjects or custom code can be invoked and/or bound to DOM elements data and events.
End result: building an HTML UI communicating with local lower level systems is now possible. This might prove a great alternative to Gtk+ or Clutter.

For the full-blown SeedKit applications (lets call them hybrid for a minute) scenario, a runtime environment is provided. For now it only consists of a simple launcher but will hopefully be augmented with a standard library and a set of guidelines (mostly following the HIG 3) to ensure consistency among hybrids and 'classic' applications.

So yeah, you can run your hybrid application on your computer... Great, but how does it fall and deploy in the hands of the end-user you might ask ?

That's what is coming next.
We have no intention to build a versioning, dependencies and provisioning management system from scratch. Thus hybrid applications should be easily installed from distributions channels, namely packages and repositories.
Thus templates for .desktop files, rpm specs and debian recipes will be added soon to make the packaging a breeze.
If you are a bored packaging wizard, drop by the seedkit-devel list, we need you!

Another missing piece is the aforementioned standard library. HTML alone is far from providing the high-level concepts required to express a user interface naturally (sliders, modal windows, tree, list for example). Web developers already provided solutions in the form of libraries like Mootool, JQuery or ExtJs.
jQuery and its UI widgets will become the favoured target and will be packaged with each application or depended upon if provided by distribution's package. Some help with converting Gtk's Adwaita CSS to jQuery-ui would be great.
Also, we'll build jQuery-esque convenience wrappers for common operations like signals/events connection, data binding, internationalization and files access.

The vision and execution are still in their infancy so now is the good time for you to get involved, shape them to your tastes and need and have fun building the next big thing together ! Gnome developers, designers, web developers, translators, bug hunters will be welcomed with open arms.

Lets get in touch at the the Desktop Summit in Berlin, I'll hopefully present SeedKit in a BoF session.

vendredi 8 avril 2011

Push your Eclipse Mylyn activity to PHPReport... automatically.

Following my awesome colleagues announcements, here is my smaller contribution to make life of lazies a bit better.

In my day-to-day routine I heavily rely on the Eclipse Mylyn tools to schedule my development activity, communicate with my fellow developers via Bugzilla and focus on the task at hand. (I'll explain soon how Eclipse is the new Emacs, stay tuned)

Anyway, my company (the awesome Igalia) uses PHPReport to track work-hours of its employees. This is a requirement to account overtime and vacations of such a worldwide-spread community of people.

The lazy-ass I am often (read always) forget to fill my activity there. I guess can forget about travelling for the next 10 years.
PHPReport already integrates with Project Hamster but nothing existed for Mylyn until now.
So I took a day or two to make the process of tracking time fully automatized based on the Mylyn records of tasks activations.

Pictures being worth a thousand words, here is a short clip of its current state.



original file: http://people.igalia.com/amazari/mylyn-phpreport.webm


Following updates will hopefully remove the need to give credentials to the plugin by using the user's web browser cookies/session. Also the secrets will be saved encrypted in the Eclipse Secure storage.

You can easily install it by adding http://people.igalia.com/amazari/mylyn-phpreport-latest/ in Eclipse Update Manager.

Sources are available from https://github.com/amazari/mylyn-phpreport .

Suggestions, bug report and coments are always welcome !

jeudi 19 août 2010

Announcing the SeedKit library and SeedKit Viewer 0.1 release.

The SeedKit project is happy to announce the simultaneous releases of both the SeedKit library and viewer.
It is the first ever release of the SeedKit project.
SeedKit view's consumers, documentation writer, hybrid applications developers and contributors are welcome to test/modify/contribute. Any help gladly appreciated !

Notes
  • This is unstable development release. While it has had a bit of testing, there are certainly plenty of bugs remaining to be found. This release should not be used in production.
  • No API compatibility guarantee is provided. The interfaces are susceptible to change until the 1.0 release.
  • to pre-release testers : the project was split recently and changed its license terms, please update your copy of the original repository and clone the viewer one (see bellow).
What does it ?

With SeedKit, a developer can choose to define the user interface of a native application in pure web standard technologies (HTML/CSS/Javascript).
Alternatively a developer of an existing GTK+ application can embed a SeedKit view within the current interface.

What is it ?

The SeedKit project currently consists of two modules:
  • SeedKit library: HTML view Gtk+ widget with access to lower-level libraries and systems within its Javascript environment. It is build around the Gtk+ port of WebKit and Seed [1]. Licensed under the LGPL 3+ terms.
  • SeedKit viewer: a simple command-line viewer/launcher for applications whose views are defined in pure web standard technologies, while accessing lower-level libraries and systems (hybrid applications). Licensed under the GPL 3+ terms.

Examples of hybrid applications are provided in the examples/ directory of the seedkit-viewer package.

Download

SeedKit release packages are currently hosted on a personal public dropbox folder until a proper solution is found.
SeedKit library 0.1: http://dl.dropbox.com/u/5746554/seedkit-releases/seedkit-0.1.tar.gz
SeedKit viewer 0.1: http://dl.dropbox.com/u/5746554/seedkit-releases/seedkit-viewer-0.1.tar.gz

To follow the SeedKit development, you should clone the following repositories on Gitorious:
git://gitorious.org/seedkit/seedkit.git
git://gitorious.org/~scaroo/seedkit/seedkit-viewer.git

Building and installing

The SeedKit library compilation depends on the presence of :
* gtk-3.0 >= 2.90
* webkit-3.0 >= 1.3.3
* seed >= 2.31.5

The viewer only depends on the SeedKit library's presence.
Both can be compiled and install using the classic "./configure && make && sudo make install" sequence.

Contact

Concidering its low maturity, expect to experience bugs and misbehavior. Please report any issue, expectation or remark to the SeedKit mailing-list at seedkit-list@gnome.org until a proper bug-tracker is be set or used (hello sysadmin team ;)
Of course, drop a mail on the list if you want to participate in the SeedKit development too.

Happy coding !

mardi 25 mai 2010

HJGMPB 1 : Profils de deploiement (Updated)

Commençons la série des HJGMPB (How JEE 6 Gave My Productivity Back) avec la présentation de la gestion et définition de profils standards de déploiement introduite par EE 6.

L'une des critiques récurrente à l'encontre de la plate forme EE est sa lourdeur et sa fâcheuse tendance à accumuler les APIs peu maintenues, utilisées et élégantes par souci de rétro-compatibilité et de complétude.
Cela implique l'obligation pour les fournisseurs de serveurs d'application de proposer une implémentation pour chacune de celles-ci, qui seront ensuite déployées sur toutes les instances. Qu'elles soient utilisées ou non.

La spécification de la gestion des profils apporte la possibilité de configurer des types de déploiement standards ciblant des besoins précis. Ils définissent notamment les systèmes et APIs déployés et mis au service des applications. Ainsi, un bus d'entreprise ne nécessite certainement pas les technologies de vue comme les servlets ou JSF.

Le premier de ces profils à voir le jour est le "Web Profile" destiné à l'hébergement d'applications Web légères. Il se passe donc des APIs "entreprise" superflues telles que EJB2, JDO ou encore JMS.
Ne restent principalement que JPA, EJB3, JSF2, CDI et Beans Validation, tous utiles dans le cadre du développement web.

Cela permet à des serveurs d'application légers, comme Tomcat ou Caucho de se déclarer compatibles avec ce profil, bien que n'implémentant pas l'ensemble des spécifications EE6.
De ce fait, une application ciblant ce profil est d'autant plus portable et résistante aux changements futurs.

En outre, le temps de lancement et l'occupation en ressources du serveur d'application s'en trouvent réduits. Un avantage non-négligeable dans sa gestion des coûts et de la disponibilité.

Les développeurs ne sont pas en reste, le (re)lancement du serveur d'application étant récurrent dans le cadre de l'implémentation d'une application Web en Java. Le swap à chaud n'est malheureusement pas toujours applicable.
Le gain peut se révéler de l'ordre de la demi-heure par jour, ce qui est loin d'être négligeable.

Si par ailleurs, le projet est régulièrement déployé sur un serveur d'intégration continue, le temps gagné peut permettre un rythme plus soutenu de test sans engendrer de coûts supplémentaires. Et ainsi mettre en évidence plus rapidement la moindre régression détectée.

Il intéressant de noter que la majorité des fournisseurs de serveurs d'application reposent leur gestion des profils sur OSGi.
Utilisant un même standard de plugins, les fournisseurs partagent facilement leur travail.

"Web Profile" sera bientôt rejoint par de profils destinés à bien d'autres usages qui bénéficieront alors de tous les avantages suscités en terme de flexibilité et de performance.




vendredi 21 mai 2010

Comment JavaEE 6 m'a rendu ma productivité.

Disponible depuis la fin de l'année dernière notamment au sein de l'implementation de référence Glassfish 3 de Sun (désormais Oracle) et JBoss AS6, Java EE 6 apporte son lot de nouveautés et dépoussière heureusement une plate-forme trop souvent perçue comme vieillissante.

Java EE souffre notamment d'une image d'usine à gaz dont les anciennes APIs sont intrusives, inélégantes et compliquées (JDO, EJB2...). En outre, elles demandaient aux développeurs un effort de configuration (XM Hell) certain, du fait de leur (trop?) grande abstraction et flexibilité.
EE 5 a grandement amélioré la situation avec l'introduction d'API modernes basées sur le principe de "convention over configuration". On peut citer notamment JPA et EJB 3.
EE6 poursuit cette simplification sur tous les fronts avec la mise à jour des nouveautés introduites par la 5eme version, l'ajout d'un système d'injection de dépendances et de gestion de contextes stateful et la mise à jour de JSF introduisant la gestion d'Ajax.
Le déploiement n'est pas oublié puisque les spécifications définissent des profiles serveurs type, notamment le "Web Profile" qui se passe des API trop "corporate" comme les ESB ou EJB2.

Ces avancées ont transforme JEE en une plate forme concurrentielle pour le développement de site de petite à moyenne taille, là où elle se destinait jusqu'alors aux grands comptes.
Comparé en terme de productivité à Rails, Django ou CakePHP, JSF2+Weld+JPA semble largement à la hauteur avec son écosystème d'outils de conception, ses performances inégalables et sa maturité.
Pour les geeks : c'est tres peu verbeux, je vous l'assure.

Une série de posts sera consacrée aux détails des changements et à leur intérêt en terme de productivité.