Sunday, March 25, 2007

GWT Part 2: Drag & Drop

Now that I have GWTDesigner by Instantiations, I am well armed to continue development in GWT.

I am building an agile project planning tool that makes heavy use of drag and drop to facilitate planning of user stories into iterations as recommended by the eXtreme Programming Planning Game.

I will show screenshots once I have the tool nearly completed, but in the meantime, let me say that I had great success using drag and drop in GWT due to the ease of their API. And, GWTDesigner made things easier as it enabled me to design UI visually without sacrificing code quality since it generates simple-to-understand code. In fact, I can modify generated code and GWTDesigner would still understand it and let me visually edit it since it works by reverse-engineering the source code.

Drag and Drop works in GWT as follows:
  • Make sure that the root panel containing all widgets is an AbsolutePanel
  • Create a single DragController instance for that root panel. Normally, you instantiate the implementing class PickupDragController unless you require special customizations.
  • Depending on the drop action you need, create a DropController instance for every drop target. For example, you would use an IndexedDropController for a VerticalPanel drop target.
  • Register all DropControllers with the single DragController
  • Call DragController.makeDraggable(Widget) on every widget that will act as a drag source.
With Object-Oriented abstraction and encapsulation, I was able to hide most of that logic in Composite objects, making drag and drop very transparent in the code.

In the future, I will experiment with GWT remoting, and see how easy it can be used to facilitate transparent AJAX programming without the pain normally experienced with writing Javascript that works with different browsers.

Friday, March 09, 2007

EclipseCon 2007: Day 4

Day 4 started with the keynote speech of the security expert Herbert Thompson

He gave a fantastically funny talk on security and how much it is ignored by the software development industry.

The gist of it was to not only think about Use-Cases, yet also think about Abuse-Cases.

Herbert told us two hilarious stories about how insecure software can result in bad consequences, and showed us a demo of hacking Notepad to make the point that any software can potentially be compromised no matter how simple it is.

Here is a photo of him:

I left right after lunch that day, so the only talks I ended up attending were about Eclipse DTP and the new ColumnViewer API for TableViewer.

EclipseCon 2007 has overall been a great success! I met a lot of great people, attended a lot of interesting talks, and learned a lot in the process. I thank everybody who contributed to the conference success.

To conclude this series of posts, here is the last photo I took at EclipseCon 2007:

Programmer enjoying the great weather of Santa Clara, California.

Wednesday, March 07, 2007

EclipseCon 2007: Day 3

Day 3 is my presentation day. I enjoyed a breakfast with Kevin Taylor in the morning, and then spent some time rehearsing my short talk on RCP Patterns and Anti-Patterns.

At 11:10, I exploded into the audience like a hurricane, acting the patterns and anti-patterns out loud, and sharing many of the lessons I learned over the course of developing an 18-month RCP project in an eXtreme Programming team.

After the presentation high, I rested by attending a few other short talks and then lunch. What lunch table topic did I select today? Mmm, Callisto. The table had Eclipse committers from the IBM OTI division. I talked to Steve Northover, author of SWT, Tod Creasey, JFace contributor, and a few other employees of the OTI division who work on different pieces of RCP, such as platform UI and PDE. It was nice getting to know them and talk about what they do in their jobs.

After lunch, I attended a panel titled "What sucks about Eclipse". I mentioned how the UI can be overwhelming and intimidating to first-time users in comparison to the NetBeans UI, and suggested adding an EZ or New-User perspective that simplifies the interface by hiding many of the advanced functions away. After all, in one of my Software Engineering master courses at DePaul University, the topic of Eclipse UI complexity came up in class.

Another interesting panel that I attended was "UI Testing in the Real World: Myths and Realities". Attendees discussed the practicality of UI testing, especially for teams that are doing agile iterative development and are already disciplined about writing unit-tests. Dan Rubel, one of the co-authors of Building Commercial-Quality RCP Plug-ins was passing the microphone around to people, and of course, being the conversationalist I always am, I took my turn to talk about my team's experiences with UI testing. One of the people on the panel was Elizabeth, an employee at IBM who works on TPTP. She was kind enough to inform me after the panel about a TPTP Testing Strategy document that provides best practices on UI testing.

My night concluded with a SWT Birds of a Feather meeting with Steve Northover, an Eclipse Jazz demo by Erich Gamma and others on the Jazz team, and an IBM party to celebrate the top Eclipse committer.

Here are a few photos:

Photo with Erich Gamma, one of the Gang of Four who wrote the Design Patterns book.

Nigel Westbury. Gave a talk on enhancing RCP plug-in extensibility for data.

Photo of me winning GWTDesigner by Instantiations.

The Cool Ingres Folks interested in a Rails Ingres plug-in for ActiveRecord.

Tuesday, March 06, 2007

EclipseCon 2007: Day 2

Day 2 was kicked off with a keynote speech by Scott Adams! You know... the writer/illustrator of Dilbert?

His speech was pretty entertaining and somewhat enlightening as he told us the story of how he worked in many office jobs before he settled on doing the comics. He showed us Dilbert comics beginning from when he started till now, including the Dilbert original concept:

On to EclipseCon stuff, I attended an interesting talk about Java 7 potential features. Highlights were:
  • Closures
  • Simplified syntax for Generics
  • Super-packages
  • Erase erasure of Generics, making them available at run-time for reflection
David Orme and I attended a panel called "Eclipse RCP: Experiences along the way", which had our Obtiva secret agent, Patrick, on it:

It was an interesting discussion of how RCP is playing out in the industry, such as the Siemens and Nasa. I reported my issue with the RCP Application Update process being too slow for dial-up users, even with proper structuring of plug-ins. I also reported how we solved the problem at work by re-implementing Update Manager to do class-level diffing, thus pushing to clients only the classes they need of a package and significantly reducing download size in the process. If anyone is interested to learn more about that, feel free to contact me. While I participated in the development of the re-implemented Update Manager, David Orme and David Beers have actually been the minds behind it.

Lunch was pretty fun. They had tables with post signs on them, each mentioning a particular IT topic such as ORM, Scripting, SWT, etc... I sat on a table that said BPEL and had interesting chit-chats with a number of people.

One of the big highlights of the day was seeing a demo of Lotus Notes 8, which is now built with RCP technology. It looked simply fantastic:

After attending a few more talks, like a quick demo of the power of Model-Driven Development by Angel Roman and Bruce Trask and an eRCP talk by Gorkem Ercan and Mark Rogalski, I headed back to the hotel for some rest.

At night, I attended an IBM reception, in which I concluded my night with a sumo fight. Here is a photo:

'Nuff Said!!!

EclipseCon 2007: Day 1

EclipseCon 2007 Banner

EclipseCon 2007 Electronic Banner

So today, I sat next to the person who wrote CVS; met guys from IBM, HP, Compuware, Instantiations, and Google; took photos of Kevin and Scott presenting on Eclipse RCP; walked around Silicon Valley companies like intel, AMD, Sun Microsystems, Yahoo!, EMC², Helio, and WebEx; and met our secret undercover Obtiva developer Patrick (don't tell anyone he exists.)

I also attended the Google Widget Toolkit tutorial with Kelly Norton. It was great as I got many of my questions answered and learned a lot more than I already know about the GWT. For example, how do we re-use an existing javascript control like a fancy slider in GWT? Just wrap it into a Google widget by extending Composite and then use that new widget instead.

The presenter had us use GWT to build an instant messenger; and indeed the end-result was very similar in basic functionality to messengers like AIM, MSN, or Yahoo. The only big difference was that instant message windows showed up within the browser instead of showing up as separate windows outside.

Some other benefits of using GWT that I was not aware of:
  • Support for JUnit (just extend GWTTestCase)
  • Support for debugging (just use Eclipse debugging with your Java code)
  • RPC remoting support that can be used by rich clients on the platform and not just the GWT generated java-script
  • Browser-optimizations that reduce the amount of javascript files people download when accessing a particular page.
  • Theming through CSS just like with regular DHTML
I will begin working on a GWT application very soon to better learn the framework. If anyone has project suggestions, please share.

Stay tuned for day 2 everyone.

Monday, March 05, 2007

Getting ready for EclipseCon 2007

I'm going to EclipseCon 2007

I flew to Santa Clara / California this morning to get ready for EclipseCon 2007. Tomorrow will be the first day, which I am very excited about.

I will blog about EclipseCon daily before I go to bed, and I will possibly post photos too as I recently bought the Canon PowerShot S3 IS camera and am looking forward to using it.

Stay tuned everyone!!!

Friday, March 02, 2007

Article posted on IBM DeveloperWorks

Scott Delap and I recently wrote a tutorial on how to customize RCP user interfaces.

The article just got posted on the IBM DeveloperWorks website:
Customizing Eclipse RCP applications, Part 1: Techniques to use with SWT and JFace