Travelling around Europe and launching our school

Post_Arcbees_Europe_V1-01

We’re going to be busy, like really busy, for the next two weeks since we’re going to take part in a couple of events around Europe and try to make as much noise as possible. Our first stop will be Dublin for the Web Summit. This conference promises to gather around 30 000 people from around the world and we have been lucky enough to be chosen to take part in the Alpha program. If you’re at the Web Summit, don’t hesitate to ping me (Christian Goudreau) or Philippe Araujo to grab something to drink (beers!). Our stand is number V-120 in Village Green and it takes place on November 5th so come and see us there!

Post_Arcbees_Europe_V1-02

November 5th is also the date Manon Gruaz will be in Paris giving a conference at her old branding school. It’ll be a shortstop as she’ll be heading off to Nantes for the DevFest organized by Nantes GDG on November 6th. The DevFest gathers around 500 to 600 developers who are excited by Google technologies. Her first conference at her old school will relate her life as a designer in a highly g33k business like ours whereas the one at the DevFest will address the importance of the brand through the user’s experience of your web and mobile application.

Post_Arcbees_Europe_V1-04

Last stop will be in Florence where Manon, Julien Dramaix (who’s now part of the GWT team at Google), and I are going to be the speakers in a community-driven GWT conference organized by GDG Florence. The GWTCon gathers around 150 developers, all interested by GWT and will be the most exciting conference for us as we’re community leaders of the GWT community. My conference will deal with GWT software engineering best practices. Manon is going to give  her conference on brand, but in english this time, whereas Julien will talk about JsInterop.

Finally, on November 13th, I’ll head back home while Manon continues her journey in other countries to travel around the world while working. We also have another Bee that decided to switch to the nomadic life, Philippe, who will stay in Europe and represent Arcbees in the old continent. It’ll give him new challenges, but he has already proven that he was up for it in his previous trips.

Arcbees launches its school!

Post_Arcbees_Europe_V1-05

For  several years, we have been providing training material to several businesses around the world. It was a big requirement for our community to provide more and more public or private courses to help it get started. Since Web Summit is starting this morning, we would like to officially announce that you have been heard and that we have started to improve everything related to documentation as well as training material.

Since July, we hired a dedicated developer who had worked with us in the past and who taught software architecture. Since July, he led the re-write of the documentation initiated by Christopher Viel. He also started a new series of quick video tutorials that you can find on our Youtube channel. Before he joined the team, we had started to release new how-tos every two weeks and we continued to release them consistently.

Today’s announcement is another big step into giving you the best possible training material. The first course will be available in our Bee School. This course is on “how to get started with GWT”. We picked that one on purpose because we found out that there was a lack of professional training material on GWT. The next one will still be on GWT but is going to be more advanced and then, we will do the same thing with our open source offering.

Don’t hesitate to stay connected with us by subscribing to our mailing list. You can also reach us out and share your thoughts!

How to write GWT Generators efficiently

Through experience, I have come to realize that writing Google Web Toolkit Generators is far from being easy. In fact, when it comes time to improve the existing code base or add features, it turns into a nightmare. I’ve found all sorts of GWT Generators. Some were easier to understand than others, but every single time, it took me hours before I could do anything useful. That made me wonder, how can we improve the readability and the maintainability of a piece of infrastructure that inherently is hard to maintain due to its design?

The answer

The answer was quite simple. We actually see the solution pattern all around us in one form or another. It’s templates. I first thought I’d create my own template engine optimized for GWT, but then I came across Harald Pelh’s Piriti project and saw that he was already using the Velocity template engine for this purpose. My team is already using Velocity for other reasons, and I was stunned that I hadn’t considered using it for GWT Generator templates myself. Good on ya’, Harald!

Example: Cell Table

To introduce you to Velocity and demonstrate how I write code generators, I’ll go through a simple case that everyone has experienced in GWT: column definition in cell table widgets. They are redundant, tedious to write, and could be simplified by the smart application of abstraction and code generation. First let’s review how a simple table is written:

Extracting the column definition

It is clear to see how a bit of abstraction would let us extract the column definition. We will extract the column creation logic to its own interface and class. Looking more closely at the view, it’s also clear that it is burdened with too many responsibilities. Delegating the column creation logic to another object is a lot more elegant and better respects the Single Responsibility Principle.

Now that we extracted around 40 lines of code from the view to its own class, let’s use this class in our view:

Extraction of the creation logic to another class tidies up the view a lot. This is the key to my procedure: FIRST write real use cases before attempting to write ANY code generators. If you don’t, you will fail to truly understand your problem and will end up overengineering the solution. I’ve seen that countless times through the years. Even experienced developers skip the mandatory step of writing several use cases before implementing their code generators. It may seem redundant, but its not. It’s iterative, and clarity grows as your iterate. You first start by just writing out the case, then write it a second time, and abstract it. Write it a third time, abstract again, simplify; and only then should you write the generator, based on the actual use cases you’ve developed, which after several iterations is now at its most simple expression.

Transforming the column definition

With a real use case to guide us, let’s transform our column definition as an interface:

There are far fewer lines of code now! And the beauty is, if I want to remove or add a column, I only have to alter a single line! Does this remind you something? Bingo! This is exactly how Proxies with request factories are written! That being said, that also means that some rules need to be followed. Each method name has to match the method name in the POJO We could change this by adding an annotation argument, but this class already isn’t refactor-friendly, and an annotation argument would make that worse, so let’s keep it simple. Going even further, the interface could refer to a template like UiRenderer, ui.xml and be generated using the XML definition instead! Let’s keep that as food for thought.

The code generator

From this interface, you can now create your code generator. Since I know what the output will be because I have already written a working column definition class, I’ll use this code inside a Velocity template:

Before going further, I need to wire up all the needed classes for my generator. I find that using Google Guice really helps in creating classes that are simple, yet uncoupled, which leads to better readability as each class only has one responsibility. Now the fun begins, as we add the glue that GWT will use to transform this Velocity template into java.

This generator serve as my entry point for instantiating my Velocity Generator through Guice. Its only purpose is to set up the context and kick off generation. Nothing else. When it kicks off the generation, the generator will use the Velocity generator to start the code generation process:

It is really straightforward, I populate the ColumnsInitializerDefinitions class with all the information I need and that will be used inside the Velocity template. Then I give it as an additional argument in the Velocity context map. I’ve also made an abstraction of this Velocity setup that I use all across my projects to avoid repeating myself over and over.

This process may be a bit counterintuitive because to create generators that are easy to maintain and read, while being flexible enough to evolve, you need to repeat yourself! But consider this – in software engineering, when does it make sense to repeat yourself? When instantiating Design Patterns!

Design Patterns are architectural motifs that are repeated over and over with different parameters, to fit the specific requirements of your system. Some good candidates for code generation are Business Design Patterns, that resolve recurring system requirements in your application context.

You don’t have to be Martin Fowler or the Gang of Four to invent design patterns. Building software architecture for a specific business will require you to think out of the box about patterns that may not exist, but solve recurring problems in the context of your system.

Now we only need to wire the generator to the interface that needs to be generated:

What’s next?

First, we could add a lot of functionality for sorting, action cells, editable cells, and the like. I have only scratched the surface above, but even so, we can already see a big gain in productivity. Furthermore, we could use annotation processors instead of GWT Code Generators! While GWT gives a lot of goodies, we can’t really use those generators with anything else but GWT. Using annotation processors or any other java code generator framework, we can build code generators that are portable and, with a little bit of what I shared with you, maintainable.

If you’re looking for the sources and some of the missing classes, I invite you to take a look at the GWTP-CarStore sample. Have fun! 😀

New release: GWT-Chosen 2.1

GWT-Chosen is used by an increasing number of people through the GWT community and we’re proud to deliver this new release. Several enhancements had been made, but the two major ones are the addition of a new option that let you position the dropdown on top or below the text box and, to make sure that we continue to deliver to our users a product that can evolve quickly without regression problems, we added a lot of integration tests using Selenium.

The full list of closed issues can be found here and an example of the new dropdownPosition option can be found under List of options in our documentation.

Have fun with this new release!

 

Open letter to our community

Hello friend,

This letter is going out to everyone in our network, but especially to you in our open source development community. Many of you have been involved with us since the very beginning, when Philippe and I were working on GWTP as part of puzzlebazar. As we became Arcbees and continued to develop tools and best practices for ourselves, we have continued to share and develop them with you. We are proud of what this community has accomplished, and we are grateful for everything we have learned from you in the process.

We are enjoying our business adventure so far, and wish to do even more in the future. Our open source initiatives have always been our top priority, but we do face a challenge faced by many other open source startups. We need to move from a service business to a product business and we want to dedicate a team to work on our open source projects, to improve our tools faster, offer commercial clients the best support experience and continue our involvement with our community.



This is why I want to reach out to ask for your help! We’ve put together a brief survey asking critical questions that we hope will help us improve our support offering. I also welcome you to contact me directly if you want to share feedback without feeling constrained by the survey. I’d be very happy to speak with anybody who has ideas they want to share with me!

Please fill out the survey and/or contact me directly.

Thank you for your help!


GAE-Studio is now open source!

Some of you may already have noticed or heard me saying that GAE-Studio was going to be open sourced and I think it is past overdue to officially announce it: GAE-Studio is now open source under Apache 2 and freely available! We promise to keep working on it, and to make that possible, we’re going to add GAE-Studio support to our open source support packages. You can find the source code under our Arcbees github organization as well as on maven central. We released an official, stable version 1.0 a couple of days ago that you can see in action on our demo website. You can also read our documentation to learn more about how to install GAE-Studio in your Google App Engine application.

Some may wonder why we chose to open source what was going to be our first official product. We’ve first started this venture almost 3 years ago when Arcbees was still in its inception. We were using Google App Engine heavily, and the lack of a good datastore admin console was a big problem. At the time, Google App Engine didn’t have any hooks on which we could build one, so we hacked our way around and built something useful for our own work. One year later, after finding other users were feeling the same pain as we did using Google App Engine, we set out to improve GAE-Studio user experience. It was planned to be our very first product that wasn’t going to be open sourced.

Last summer, Google IO announced a new console for Google App Engine that removed much of the pain that GAE-Studio was designed to help with. Then some time later, Objectify-Insight came out, and our visualization engine would be in competition with it. Since we love and have been using Objectify for years, we didn’t want to become their commercial competitor.

Still, we were and are hopeful that GAE-Studio will be useful for our developers. For one thing, GAE-Studio is available to all environments using the Modules, although it was initially written for the Java runtime. This is because Google now provides hooks in the Google App Engine SDK for the things we had to hack our way around to in the past. The further advantage of GAE-Studio is that it can be used locally! While Google has improved the usability of their cloud console a lot, the usability of local development tools is still weak.
Several hundred users have expressed an interest in using GAE-Studio, and we are now ready to officially release it in their hands. We hope you will find GAE-Studio useful, and will help us support the remaining runtime.

Thanks for the support and words of encouragement, and thanks for sticking with us through this venture!

About GAE-Studio

GAE Studio helps you optimize applications hosted on Google App Engine.

GAE Studio also allows datastore exploration, modification, deletion, import and export. Think of it as your swiss army knife for developing GAE applications!

Using real-time analysis of datastore requests, GAE Studio quickly highlights inefficient queries and gathers metrics that will help developers improve application performance.

15

GWT.create 2015: Top 5 sessions

Following my last week post about my experience at GWT.create 2015, I would have chosen more than 5 sessions to talk about, but I had to cut this short if I wanted to keep my readers 😀 Here’s my top 5:

  1. New brand and documentation
  2. Singular
  3. JsInterop
  4. GSS
  5. Incremental compile in SDM

New Brand and new website

I didn’t list this one first simply because Arcbees’ own Manon Gruaz did the design, but more because the GWT brand looked a lot like an old guy in a disco – possibly cool inside but not really looking that cool to onlookers. The centrality of Java alone feels dated for some people. The logo was definitely dated and a due for a makeover, and the documentation was starting to look like a 1990’s style early website. A full reboot of the brand was needed, something fresh that would communicate how much we care about architecture, how we work together as a community and the simplicity we seek while nevertheless building large, maintainable enterprise web applications.

While there’s still work to do on the documentation itself, the new branding was designed to be extensible, and is ready to be used seamlessly across the GWT community. I invite you to take a look at the GWT Brand book to learn more about the GWT brand and logo.

Singular

This session by Daniel Kurka was one of my favorites at GWT.Create for several reasons. While simplifying the development process considerably using the same patterns as Angular, something even more powerful lurks behind the scenes. It lets you build true multiplatform applications (Android, iOS, web). Singular uses techniques developed for Inbox that let you compile java code to Objective-C thanks to J2ObjC and to javascript thanks to GWT. So that more than 80% of you code can be shared between the three platforms. To know more, I invite you to watch j2objc’s session by Tom Ball: J2ObjC: Sharing Java Code with iOS Applications.

Angular has performance problems when it comes to really large web applications. As you know, Angular scans the DOM for directives at runtime. Singular, thanks to GWT, does that at compile time, improving performance by a lot.

The project is still in its infancy, but what Daniel did already demonstrates that writing Java can be as simple as writing Javascript while preserving Type Safety. To know more, I invite you to watch Daniel Kurka’s session: Singular – Reimagining AngularJS in Java.

JsInterop

Writing wrappers has always been a pain in the ass and while using an external javascript library is possible, it is truly tedious; to the point where I have seen some business dropping GWT because they couldn’t easily use some of their favorite Javascript libraries. This won’t be a problem anymore. You can already turn on JsInterop in GWT 2.7 as an early release, but you’ll really get everything you need to start hacking around a Javascript library in GWT 2.8. In case you have any doubts, I invite you to take a look at Ray Cromwell’s session: Deep dive in JsInterop.

GSS

If you have a web development background and have done a bit of CSS, you know how painful it can be to work with CssResources; not because it was poorly designed, but mostly because some fundamental CSS3 features weren’t even available! To keep up the with the pace of this ever-changing world, GSS has been added to GWT. GSS brings full CSS3 support and several interesting features like mixins, conditionals, variables and more. It’s now easier to write and maintain the CSS files of your GWT application.

Thanks to Julien Dramaix, this is one of the few major outside contributions made to GWT since the steering committee was created, and we’re proud to have participated in this. To learn more about GSS, I invite you to take a look at Julien Dramaix’s session: CSS3 and GWT in perfect harmony.

Incremental compile in SDM

Last,but not least, incremental compilation now lets us seamlessly refresh our work in the browser in day to day development activities, and get the latest code from our IDE in less than 2 seconds. Before, it was a real pain to use SDM because it would do a full recompile of the whole application each time you needed to see a new change. Thanks to incremental compilation, that is not the case anymore.

IDE support in both Eclipse and IntelliJ is still in active development. We can already use our favorite debugger, but in some cases, it will not work. For now, we’re still stuck debugging in my Chrome console, and thanks to source map, we can see quickly where problems are. I’m still eager to go back to my IDE, put my breakpoints in and get my usual workflows in place, and I’m pretty sure that I will see that happen really soon! To learn more, I invite you to take a look at John Stalcup’s session: Incremental compilation.

Conclusion

In conclusion, GWT.Create was a blast this year! I had fun, met great developers, great businesses and I got to see all my remote friends that I only see once or twice a year. I know I speak for the rest of my team as well in saying that, and I’ll be eager to participate in GWT.Create next year. I’m already pledging that we will submit more sessions for the pleasure of the GWT community and our own open source community!

See ya next year!

GWT.create 2015: Return of experience

As I look back, almost three weeks after GWT.create, I can’t keep myself from smiling. It was, for several reasons, the best time I’ve had with the GWT community since I joined. Traveling between Mountain View in the Computer History Museum and Munich, meeting hundreds of GWT enthusiasts and exchanging ideas with them about how to make GWT even better made me realize how incredible this community is and how lucky we are to be part of it. Learning from their technical knowledge and their deep personal and business involvement with this toolkit, I felt lucky I got the chance to connect with some of the best engineers in the world. If you’re reading these lines and you spoke with me, I’m glad to have met you 😀

GWT.create this year was Arcbees’ chance to shine! We jumped in as major partner. Julien had two sessions: Best development practice for GWT web application and CSS3 and GWT in perfect harmony, plus one workshop on how to contribute to GWT, while I delivered a keynote plus one session: How to improve your productivity using GWTP. We had major news to deliver at the keynote, having taken some of our free time to develop a new brand and a new website for GWT. This will have huge impact in the future of GWT as we try to make the brand more modern and sexy to support the design goals for upcoming developments in GWT. We spent a lot of time to give you the best experience we can and we welcome any constructive comments that might make it evenbetter in the future. One major improvement that was made to the website, even before the rebranding, was the introduction of ability to contribute documentation right from the website using markdown and GWT. We’ve preserved this functionality and hope the community will help us maintain the documentation.

When David Chandler got on stage to deliver the second keynote, I got a little bit nostalgic. He was the one that invited Philippe Beaudoin (cofounder of Arcbees) to speak about GWTP four years ago, in front of an overcrowded room at Google IO focused on how to build online business applications. He also made a statement about how everyone in the community cares deeply about abstraction and architecture, which are the two concepts that have inspired me and the rest of Arcbees for years to contribute open source libraries and frameworks to the community, to help them build better web applications. I was also amazed by the huge amount of raw talent that this community has to offer, and saw great web applications from businesses like Ruxit, Boomi and Magnolia. I could go on for a while, but needless to say that we’re starting to have great, beautiful and mature web applications built on GWT, and not just Google offspring like AdWords, Sheets and Inbox.

During the first panel discussion, Ray Cromwell reminded the audience that GWT fuels the web applications that run the world. Stock exchanges, financial institutions, healthcare, airports, you name it. Whenever something needs to run on top of critical infrastructure, needs to be scalable and/or multi-platform, GWT is commonly seen. Javascript may have a lot of fresh cool toys to play with that GWT may not have (yet!), but would you invest everything you have on fresh cool toys? There’s a lot to learn from the Javascript community, but as decision makers, we need to choose robust solutions, not fashionable ones.

I got carried when I was writing this blog post and didn’t even started to write about my top 5 session/announcement, stay tuned early next week to know more about what was our top 5 sessions/announcement of the GWT.create 2015!

A Guaranteed Future for gQuery!

Arcbees is proud to officially support g(wt)-Query (gQuery), a jQuery-clone API written in Java for GWT. We hope this will helps gQuery grow even further, promoting clear direction and a strong future for this awesome product – one that we ourselves are using in all our projects.

We are firmly committed to keeping gQuery an Open Source product, available under the Apache 2.0. licence. The gQuery project continues to be led by the top three contributors to the codebase: Ray CromwellManuel Carrasco Moñino and Julien Dramaix.

What does our official support of gQuery mean to you? First, gQuery will be part of ArcBees’ other Open Source product offerings, and gQuery support will be included in the support package offered by Arcbees for GWTP. Also, Arcbees is planning a complete re-write of the documentation. This new documentation will follow Arcbees new conventions and will be hosted on github.io.

There is more. This is just the tip of the iceberg! The Arcbees development ecosystem is evolving fast, and you can hear all about it at GWT.create this year!

Le futur de gQuery est assuré!

Arcbees peut se targuer d’être la 1ère entreprise à supporter officiellement g(wt)Query, une librairie similaire à jQuery, mais pour GWT. Fort de cet appui, nous espérons que le produit va continuer de croître en plus d’en assurer sa pérennité, surtout que nous en sommes nous-mêmes de fiers utilisateurs!

Essentiellement, gQuery va demeurer le même produit Open Source offert sous licence Apache 2.0. que vous avez toujours connu et son développement va continuer d’être mené par ses top contributeurs, soit messieurs Manuel Carrasco Moñino, Ray Cromwell et Julien Dramaix.

Vous l’avez peut-être déjà constaté, mais les sources ont été transférées sous Arcbees (github) et d’importants changements se pointent à l’horizon puisque la ré-écriture complète de la documentation est en cours et que gQuery s’ajoute à la gamme de produits Open Source déjà offerte par Arcbees, faisant en sorte qu’il sera désormais couvert par le forfait de support pour GWTP.

Plusieurs autres modifications sont à venir et vous pourrez en apprendre bien davantage sur le sujet et sur Arcbees lors du prochain GWT.create et lors du dévoilement de notre nouvelle image qui approche à grands pas!

GWTP 1.3 release

Two weeks ago we released GWTP 1.3. This release was a little bit stealthy and you have me to blame for that, I didn’t prepare an announcement! I hope you can forgive my oversight 😀

Here’s the complete list of changes:

GWTP

  • Improved Javadoc site
  • #14 : ActionException & ServiceException now implement IsSerializable
  • #282 : LazyActionHandlerValidatorRegistryImpl is now threadsafe
  • #467 : Allow REST and RPC dispatchers to be used at the same time
  • #517 : Updated to GWT 2.6.1 and updated DTDs (Thanks rdwallis)

MVP

  • Improved form-factor detection (Thanks rdwallis)
  • #184 : DefaultModule now has the Builder pattern
  • #284 : Add toString() to PlaceRequest
  • #346 : Map more than one name token to presenter
  • #489 : Added .without() to PlaceRequest.Builder to remove parameter from PlaceRequest
  • #492 : PlaceRequest.Builder(PlaceRequest request) now creates a deep copy
  • #499 : Decode embedded paramaters of RouteTokenFormatter (Thanks rdwallis)

RPC

  • #484 : Deprecated HttpSessionSecurityCookieFilter (Thanks bradcupit )

REST Dispatcher

  • Updated gwt-jackson to 0.6.1
  • #468 : Generate REST services based on the presence of @Path. Deprecate RestService interface
  • #498 : De/Serializing null/empty should result to null

Thanks to all contributors! We’re already working hard on GWTP 1.4 and should be out earlier than our usual release cycle. Stay tuned!

Great contributions to our open source projects

Here’s something you may not know about Arcbees; every single line of code that we can open source to our developer community, is open sourced. It is one of our core values. We believe that sharing our work and ideas openly with others can and will inspire great developers to contribute back to our own growing ecosystem of tools.

In the past few week, the number of great programmers collaborating with us in the open source community has been rising, and we want to say thanks to two in particular.

One is Richard Wallis who has contributed most of the work done to construct our Universal Analytics project, and who has also contributed to our GWTP project. He is now a trusted contributor and has been granted write privileges over GWTP and Universal Analytics.

Congratulation Richard!

Equally appreciated is Jonathan Kuleff who went from making a great suggestion for improving our Bitbucket Teamcity plugin to doing the implementation himself in one jump.

Thanks Jonathan!

Both of you contributed really great quality code, and we really appreciate that. We learn from your work, and we hope you learn from ours. That’s what we love about open. The sharing we do around specific projects has ripple effects. We share programming tactics and practices with everyone we collaborate with, and this ultimately helps all developers improve their craftsmanship to create better, stronger, quality code.

Our mission includes the promotion of this kind of code-quality education worldwide, which explains why we subject you new contributions to such rigorous code review. We don’t want to slow you down, but we do want to make sure that future contributors can easily read the codebase we are all putting together. We want the codebase to be useful and fun to program, and also to teach people how to produce quality code. We are thrilled to work with so many open source developers who want to help us do that.

There’s a lot of contributors to our open source projects, we try to thank them in every single release announcement we do around any of our open source projects. We welcome anyone to contribute in any way they can.

Software engineering is a young craft. It is only about 50 years old, unlike mechanical engineering and civil engineering, which have been with us for millennia. Our field is still in its infancy, but it’s growing fast, and this is in large part due to open source. Let’s keep flying forward by sharing code and collaborating on projects. Knowledge is a public good, all of us can have it without ever depleting it.

We look forward to future learnings with you all. See you on our project sites!