Welcome to Planet Eclipse

May 05, 2008

“Why we write code and don’t just draw diagrams”

TextUML is a textual notation for UML. The TextUML Toolkit is an Eclipse-based IDE-like tool for creating UML models using the TextUML notation.

Other tools follow the same approach. Emfatic (now an EMFT subproject) has been doing the same for EMF Ecore for a long time; the TMF project aims to be for textual modeling what GMF is for graphical modeling, and will be based on GMT’s TCS and xText components.

Still, people are often puzzled when I explain what the TextUML Toolkit is. A common question is: “if I am going to write code (sic), why do I need UML anyway?“.

Dean Wampler from Object Mentor wrote on his blog a while ago a post entitled “Why we write code and don’t just draw diagrams“. It is a short post, but he presents very good points on why a graphical notation is usually not suficient and is bound to be less productive than a textual one when it comes to modeling details. For instance, on the saying “a picture is worth a thousand words“, Dean wrote:

What that phrase really means is that we get the “gist” or the “gestalt” of a situation when we look at a picture, but nothing expresses the intricate details like text, the 1000 words. Since computers are literal-minded and don’t “do gist”, they require those details spelled out explicitly.

Couldn’t have said it better.

I strongly advise you to read the original post in its entirety, but I will leave you with another pearl from Dean’s post (emphasis is mine):

I came to this realization a few years ago when I worked for a Well Known Company developing UML-based tools for Java developers. The tool’s UI could have been more efficient, but there was no way to beat the speed of typing text.

Enough said.

MinGW gcc 4.3 lives!

This just in, Aaron LaFramboise has just released an alpha version of gcc 4.3 for MinGW. And, of course, they are looking for testers. I know I will be. You can give it a try to by downloading it off of mingw.org. I've been following the mingw-users mailing list and it's been a great place to discuss issues. It's not too busy but it's been busy enough to be useful.

gcc 4.3 in combination with the new gdb 6.8 really brings the MinGW port for native Windows up to snuff with the gnu toolchain enjoyed by Linux developers. And I think it has a chance to give Visual C++ a run for it's money. Time will tell of course, and I am wearing my open source colored glasses. But as with the CDT for Windows development, all we're trying to be is a respected alternative and a valid path for multi-platform development.

Speaking of which, it's getting time to start working on Wascana 1.0. It'll be based on the Eclipse Ganymede with the latest tools from MinGW as well as a handful of libraries to help build platform independent apps. And it will use the Eclipse p2 provisioning framework so you can install and update the tools and libraries using the same UI you use for plug-ins. And with 7000 downloads of the last Wascana prerelease, it's worth the extra time I have to put in to make it happen.

May 04, 2008

Unit Test Thoughts

Since I've been bitten by the Agile bug a couple of years ago, I've become enamored with Test Driven Development. I'll admit I've strayed from time to time when working on a new feature, but always seem to come back when I've got a bug that has cropped up. It takes getting wacked by a big brick sometimes for me to get myself back into unit testing.

The importance of keeping Unit Tests Green.

I recently read Martin Fowler's bliki entry, TestCancer, which tells the story about working for a client and delivering them a nice suite of tests that all are passing and working. Then coming back to the client several months later to add some new features and functionality to the system they had just completed. When they return, some of the tests aren't passing, some have been commented out, and some aren't run at all in the builds.

I've seen this same thing happen on several open source related projects, as well as eclipse projects. Due to time constraints or viewing the failures as random occurrences, the tests are commented out. A test that is failing at any point in time, means that somewhere within that section of code is something that isn't working right. An apparent random failure is still a failure and probably isn't something that should be ignored, or commented out. However, I have heard and seen just this very thing. It's easier to comment out the test instead of spending the time to dig into why it is failing. It could be that the test itself is just wrong. It happens. If so, then fix the test, but commenting it out isn't the answer.

I understand the desire to want to comment out a test that is difficult to figure out, but please resist it. A failing test, should be given the highest priority, it means something may not be working right in your system. If you are doing continuous integration, it means that something that was recently checked in is causing the test to fail. The longer you wait to address the issue the harder it is to find what is causing it. Particulary those random apparent failures. We recently went through a similar issue in the XSLT Tooling project, where we didn't address an issue because "it works on my system." We finally addressed it so that we eliminated the one variability for XPath validation, that being JAXP, and called Xalan directly. This allowed the test to pass on all the systems instead of just one.

A Unit Test Smell: Forcing a test to pass.

Yes, Unit Tests can give off odors. One thing that can smell are tests that are hard coded to always pass. The following is an example from a running test in an eclipse project:


protected void tearDown() throws Exception {
// editor is closed each time
if (fEditor != null) {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
page.closeEditor(fEditor, false);
assertTrue("Unable to close editor", true);
fEditor = null;
}
}


The problem here is the assertion test, it will never fail, because it is checking for true. It can be rewritten to correctly apply the assertion by simply being refactored to:


protected void tearDown() throws Exception {
// editor is closed each time
if (fEditor != null) {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
assertTrue("Unable to close editor", page.closeEditor(fEditor, false));
fEditor = null;
}
}

The above correctly checks to make sure that page.closeEditor is going to return true. If it doesn't, the test fails. If you want it to continue whether the editor closed or not, just remove the assertion check. The above also removes a few lines of code, and could be refactored further to get rid of the local IWorkbenchPage variable.


A Unit Test Smell: Overly Complicated Failures.

The other thing that I have found is that instead of using Junit's fail() method, some tests are doing the following:


assertTrue("Unable to open text editor", false);


While the above will fail the test, it can be rewritten so that it is simply.


fail("Unable to open text editor");


It accomplishes the same thing, but is much more straight forward. Another example from the same test suite:


catch (Exception e) {
assertTrue("Unable to set text in editor: " + e, false);
}


Can be rewritten as:


catch (Exception e) {
fail("Unable to set text in editor: " + e);
}


One Bug Report, one or more Unit Tests.

Another tendency, and I'll freely admit that I've done this myself, is to provide a patch or enhancement, with out a corresponding set of unit tests to go with it. I've been trying to break myself of this bad habit, but old habits die hard. Writing UI related tests are where I see this most, but I've seen several approaches lately that I hope get contributed back to eclipse or become part of the Testing and Profiling project. Having a base framework that all of eclipse can use to test our own UI would be of great benefit.

So, if you have a bug report, or an enhancement you are putting in, please write a test that can be run to help verify that it works. Writing the test may seem like a hassle, but they become your first line of defense against possible regressions and changes in functionality that wasn't intended. They can also let you know what other unexpected parts of the system are using your code as well.

Painting the Workbench

If you're a UI developer in Eclipse, you probably come across one of these issues:

  • fighting layouts
  • fidgeting with margins
  • pushing pixels
  • etc...
You probably also came up with some hack to add borders to composites to help with these issues. Well, at least I did.

Why am I bringing this up? Well a few days ago, Simon Archer and I were discussing how new GridLayout() can be bad since it sets default margins and how it can be difficult for people to realize this amongst other layout issues. To ease some of these issues and stop the madness of duplicating debugging utilities, Simon and I decided to start a new work area in PDE called Picasso. The purpose of the Picasso work area is to provide a utility to help UI debugging. Picasso does this by painting the workbench in funny ways to aid debugging :)



The screenshot above shows Picasso painting the preferences page's composites. Picasso also allows you to hover over widgets and provide some raw debug information.

How do I use Picasso? Simply grab the code from the PDE Incubator and launch some runtime workbenches. Or you can build yourself a version of the Picasso plug-in and drop it in your application to see what's going on.

Note, Simon and I are just providing Picasso as a utility for people to use, we don't have crazy plans on maintaining it unless the community steps forward with patches and ideas. It's just a work area that maybe useful to some.

Enjoy.

May 03, 2008

Monday: Eclipse Stammtisch in Hamburg

Just a reminder: the Eclipse Stammtisch in Hamburg will be this Monday (May 5th) in the Bolero Bar in Hamburg Ottensen. Google Maps: click here (opens in separate window).

If you haven’t done so, please RSVP using our Doodle poll: http://www.doodle.de/ics.html?pollId=gbzrpc86xkyhbv5k .From what I can see, we’ll be at least 20 people and there will be some well-known faces.

Hope to see you there!

Another GSoC on the air


Ok, here is another post after a long desert - no excuses here, I’ve forgoton that I even have a blog.  But now feel like writing something after seeing the new WordPress dashboard :)

First thing on the agenda is GSoC 2008. As you all know Google Summer of Code 2008 is on the way this year too and in case you have been living under a rock, here is the event.

GSoC is a good breeding ground for fresh FOSS developments and had been one for me last year when I tried GSoC for the first time. Even though initially I wasn’t planning to try out for GSoC this year, after seeing some cool ideas from few organizations I felt like giving a try.

I found 2 ideas from Eclipse foundation and Apache very exciting but finally had to leave out one because I hadn’t enough energy nor time for 2 proposals. So I tried for Eclipse - creating a new plug-in for XQuery syntax editing which I found the idea is most appealing. One reason is I had been working with XML and Java stuff for a longest of my time and second one is I’ve been using Eclipse for my python works, so felt like returning the favour.  So I prepared the proposal, submitted it and got accepted this year round too :) All thanks should go to my mentor David and congrats to my fellow Vesess colleague Sameera, who also got accepted for GSoC this year for Coppermine photo gallery. By the way, if this helps any future GSoCer, here is my complete proposal.

But beyond my not-so-dramatic GSoC tale, I was able to give something else for GSoC.

First thing is I submitted a translated Sinhala version of GSoC flyer this year. The second is I was able to put a small guiding doc for Gnome GSoCers, doing my things right as a responsible Gnome GSoCer last year.  Other than that, I was able to encourage few of my buddies to apply for GSoC rather than trying for evil MS Imagine Cup :D

So the end of the line is that I’m hoping for another nice, fruitful 3 months with GSoC working for Eclispe and hope the experience will be great as was in last year.

Where have the Eclispezone and javaLobby communities gone to?

Since not really visiting EclipseZone and javaLobby past its new incarnations you may be wondering where those communities moved to. I have found that you can find the members for those communities on FriendFeed and Twitter. I was surprised by the number of folks that I have conversed with over the years as a JavaLobby and EclipseZone member that are on both services.

New OSGi Book Chapter: Intro to Services

The next chapter of “OSGi in Practice” is available for download from the index page. This one is an Introduction to OSGi Services.

I have also made some updates to the last two chapters, so if you previously downloaded them then you might want to get the new versions.

Please keep the feedback coming! Thanks again for all the feedback so far, it’s been extremely useful.

The Visual Editor is moving

The Visual Editor is moving to new software on a new server. I will leave this server up for a few weeks. Unfortunately, permalinks will break, but all the interesting old content has been migrated to the new server.

Why? Because I want a better platform than just a blog to talk about [...]

May 02, 2008

Feature Complete!

Eclipse 3.4M7 is out the door making 3.4 pretty much feature complete!

Check out the new and noteworthy.

A lot of thanks is owed to the work done by the Platform Releng team to make this happen. I hear they like chocolate :)

A special thank you should also be sent to the Equinox p2 team who spent countless hours above their normal work hours to make sure we have a new update story for 3.4!

Thanks to everyone!

EuropaStartUP

On a lighter note, an Europa StartUp screen:



Organize an Eclipse Demo Camp


We are organizing another series of Eclipse Demo Camps.  Last Fall we had 30 Eclipse Demo Camps and they turned out to be great community events.

This time the demo camps are to celebrate the Ganymede release.  We already have events organized in 15 cities but I’d like to see even more.   Details on organizing a Demo Camp are here.   btw, we are having the Ottawa demo camp, on June 26 the day after the Ganymede release.  Should be lots of fun and I plan on buying Pascal lots of beer for the great p2 work.

Why I am not At EclipseZone

This is not a blame fest or pointing finger fest. Its just an explanation of why I have had not visited EclipseZone since February 2008 and its from my own perspective. First, I have been a member of javaLobby for awhile and I was one of the first Eclipsezone members when it was not with Dzone and Javalobby.

For me it was attraction of articles combined with quality discussion among both individuals and industry players that kept me coming back daily. With the current changes there is no community discussion or community voice heard and that lack of community voice shows in the quality of articles currently being 'churned out'.

If we are to learn anything from the lessons of social media it is that no one company or groups of companies can act as 'King Maker' because it is the community that say what they like and if it is not changed they find other places to go to get their community developer fix.

I mourn the old sites of javaLobby and Eclipsezone where the sens of developer community was always there and now its gone never to return, very sad. I do not like it all, its not fun and it is not a nice feeling at all. One word describes it, FAIL.

SIDE NOTE: I wish it was different. I wish my concerns about EclispeZone were taken to heart before the new changes.

Best day of my life

I recently completed one of those milestone items that others only dream of doing: I had lunch with Wassim Melhem. Not only is he my personal hero and role model, Wassim is the kind of individual everyone looks up to. He is an agreeable (well, at least to your face — not like those reality TV people with their odd number of finger snaps and head wags (ask Wassim)), friendly (see agreeable), and generous man. As he slapped down his gold card and said “I got it,” he told me all about his Embarcadero millions and how he’s having a hard time spending it all:



Seriously, though, it was great to see Wassim outside the hustle and bustle of EclipseCon. He’s truly a great guy and the Eclipse community misses him.



Happy birthday, PlanetEclipse !

On April 27, PlanetEclipse.org turned three! The site went through dirty diapers, teething, terrible twos and has now all grown up into a toddler of a site (can you tell I have a toddler at home??).

The original suggestion came from Ed Burnette (see above link). Gunnar went ahead and set up the first Planet on his own servers and eventually transferred everything over to eclipse.org.

Happy (belated) birthday, PlanetEclipse!

On the Efforts of the Few...

Dave has blogged a couple of times recently about his thoughts on standards development. As someone who is actively participating in the submission and revision of several specifications (some of which are standards) at the OMG, these comments certainly hit home. I agree that it’s typically 10% of the contributors that tend to do 90% of the work, and too often it seems that I’m among the “lucky” few...

One of the challenges of developing an OMG specification is the lack of tooling support for CMOF (Complete Meta Object Facility) models. This was one of the many topics that were discussed during the “Mega Modeling Mania” BoF (and again during the Eclipse/OMG Symposium) at EclipseCon in March. Based on those discussions, there does appear to be some demand for tooling that will make it easy to create, serialize (in CMOF-compliant XMI), and document metamodels that form the basis for open specifications. In response, I agreed to coordinate a proposal for a new component in the MDT project (tentatively dubbed “Metamodel Specification Tools”, or MST) to provide this kind of tooling at Eclipse.

The idea would be for the MST component to customize and/or extend the existing (or forthcoming) UML editors (primarily for class and package/profile diagrams) to expose CMOF concepts which are missing in UML (like identifiers, namespace URIs, and XMI tags), leverage the CMOF (de)serialization support that was introduced in the UML2 component as part of the Ganymede release, and provide a mechanism for generating a specification (or at least a decent boiler plate for one) directly from the metamodel using BIRT. Of course, it might also be desirable for the component to automate the mapping between a metamodel and its profile representation (if there is one) and possibly to make use of the Eclipse Process Framework (EPF) to document and coordinate the specification development process. If you’d be interested in contributing to such a component, I’d like to hear from you!

BIRT Drill Through

BIRT supports drilling down from a master report to a detail report. To facilitate this feature, BIRT provides a Hyperlink Options builder.



To drill from a table data element, the developer can select the data element, choose the hyperlink property and click on the ellipsis. This will launch the Hyperlink builder. Once the builder is launched, select the Drill-through radial, select either a report design or report document to drill to and supply any needed parameters. Parameters are often based on the current row value of the master table. That is all that is needed to create a master detail report, but suppose you want the detail report to be based on report parameter or some other variable. One way of accomplishing this task is to call the Design Engine API from script and modify the design at runtime.

For example suppose you have a master report and you want the detail report to be based on report parameter. You could define a report parameter for the master report that contains the name of different report designs to be used as a detail. The follow report parameter illustrates doing this with a static list box parameter. Its values are DetailOne and DetailTwo.



Next select the data element that you want to link, select general properties and name the element. In this example it is named mydataelement.




Finally enter script similar to the following in the beforeFactory script event.
importPackage(Packages.org.eclipse.birt.report.model.api);
importPackage(Packages.org.eclipse.birt.report.model.api.elements);


dataHandle = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("mydataelement");

ac = StructureFactory.createAction();
ah = dataHandle.setAction( ac );
ah.setLinkType("drill-through");
ah.setReportName( params["detailrpt"].value +".rptdesign");
ah.setTargetFileType("report-design");
ah.setTargetWindow("_blank");
pb = StructureFactory.createParamBinding();
pb.setParamName("order");
pb.setExpression("row[\"ORDERNUMBER\"]");
ah.addParamBinding(pb);




This code creates a drill-through hyperlink on the fly and sets the detail report based on the report parameter with this line of code:




ah.setReportName( params["detailrpt"].value +".rptdesign");





This example is available at
BIRT Exchange.

Open Screen, Another Game Changer?

I just went through some blogs and the Adobe Open Screen web site to try and understand what's going on. If you haven't heard, Adobe is removing licensing restrictions on it's SWF and FLV/F4V file formats that serve us Flash content and all those crazy videos on YouTube and such. In the past, the license on the specs restricted the reader from creating competing players, which has resulted in some pretty weak open source players that relied on the developers reverse engineering and guessing at what the spec is.

Opening the specs makes that no longer an issue. But the other announcement, that Adobe is going to make its player free for embedded devices as it does with desktops should really remove the need to have other players (which appears to be the true objective of this project), except for the open source bigots who must have their apps served open sauce, I guess. Bringing a free Flash player to devices is huge in my books and with their porting layer APIs made public, that should make it really easy for device developers to port the player to their devices. I think that's pretty game changing and you'll start seeing more Flash-based user interfaces on devices over time.

So it seems like pretty exciting news and it'll be interesting to see where it goes. But, I do hate the fact they're using the term "Open". This is one of my dogmas as colleagues that I've worked with in the past are painfully aware ;). "Open" is too tied to the word "source". And especially when the project is called "Open Screen" it's to easy to jump to the conclusion that they are actually open sourcing their player technology. But from what I can understand from the brief FAQ's they have on their site, I don't think they are. Which then begs the question how do you get their player running on your device. Do they have pre-compiled binaries? Which libc? Which OSes? Which compiler? At any rate it has left me confused and I'm sure others are. I wish people wouldn't use the word "Open" unless they really mean Open Source.

Team Effort

Digging through my email backlog, I found this post on the google-summer-of-code-announce list, which reminds us that it's time for the Google-O'Reilly Open Source Awards for 2008 (nominations due by May 15).

Then I saw this... ;)

Ubuntu has done more to promote a desktop Linux than any other distro before.
And yet as a company contributes so little development resources.
You clearly do not understand open source. Like someone said the other day, all companies work together in the Linux desktop: Red Hat fixes the kernel, Novell fixes the applications, and Canonical takes the credit.

It's all a team effort.

Anyway, while successes at Eclipse are *also* the result of team effort, these awards are for individuals (the good kind, not the Teflon kind), and you can invent your own award titles. Enjoy!

May 01, 2008

Maven and Eclipse on IRC

You may already know about Eclipse IRC channels on irc.freenode.net, such as #eclipse, #eclipse-modeling and #eclipse-soc.

However if you need some help with Maven and Eclipse, you may also consider #m2eclipse and #maven channels on irc.codehaus.org.

See Eclipse IRC FAQ for more IRC channels related to Eclipse and for setting up an IRC client.

Glassfish Running Inside Eclipse


Two weeks ago the Glassfish team announced their upcoming v3 version would be running on OSGi. Now Ludovic has a demo of Glassfish v3 running inside of Eclipse; I gather running on Equinox. Not sure about other people but this just seems so cool for many different reasons. Hopefully I will get a demo next week at JavaOne.

Upcoming Event: Equinox Security

Event Date: August 6, 2008 4:00 pm GMT-8

Register Now

Matt Flaherty (IBM)
 
Abstract:

More information coming soon.

About Equinox Security
Equinox Security ensures Eclipse is a secure runtime, enabling users and administrators to confidently work with the Eclipse client in environments where not all users and/or code sources are friendly. It provides integrated security functionality that will allow Eclipse applications to protect their data, to authenticate and authorize valid users, and to protect against potentially malicious code packaged and distributed as plug-ins.

Equinox Security protects by enabling Java's standard security mechanisms within the Eclipse platform and defining new functionality where there are gaps in the available standard interfaces. Using Java's core standard interfaces will enable wider integration with code available throughout the Java community.

9:00 am PDT / 12:00 pm EDT / 4:00 pm GMT - Convert to other time zones

Total running time will be approximately 1 hour

Thanks to Adobe for contributing their Adobe Acrobat Connect product to host this webinar.


delicious delicious | digg digg | dzone dzone

Upcoming Event: Introduction to Equinox p2

Event Date: July 15, 2008 4:00 pm GMT-8

Register Now

Pascal Rapicault (IBM)
 
Abstract:

More information to come.

About p2
Equinox p2 is a component of the Eclipse Equinox project. p2 provides a framework for provisioning Eclipse-based applications. It replaces Update Manager as a mechanism for managing your Eclipse install, searching for updates and installing new functionality.

9:00 am PDT / 12:00 pm EDT / 4:00 pm GMT - Convert to other time zones

Total running time will be approximately 1 hour

Thanks to Adobe for contributing their Adobe Acrobat Connect product to host this webinar.


delicious delicious | digg digg | dzone dzone

Upcoming Event: Memory Analyzer Project

Event Date: May 29, 2008 3:22 pm GMT-8

Register Now

Andreas Buchen (SAP)
 
Abstract:

Memory leaks or high memory consumption are difficult to tackle: Not only do you need familiarity with the code involved, but also experience in troubleshooting such problems. That's where the Eclipse Memory Analyzer comes in. The Memory Analyzer is a heap dump analyzer which immediately shows the biggest objects, groups objects by class loaders and adds application knowledge to make sense out of the millions of objects in a typical heap dump.

This webinar will take you on a hands-on tour of the most important features:

  • Generate a report listing possible leaks and find out why the object is not garbage collected
  • Analyze the memory consumption of components (WAR or plug-ins) and show ways to reduce it

The webinar is targeted at Java developers. It requires no specific knowledge but assumes a basic understanding of how Java garbage collection works.

8:00 am PDT / 11:00 am EDT / 3:00 pm GMT - Convert to other time zones

Total running time will be approximately 1 hour

Thanks to Adobe for contributing their Adobe Acrobat Connect product to host this webinar.


delicious delicious | digg digg | dzone dzone

Random Cramps

I've been thinking about a variety of things lately, so this will be a bit of what's jostling around inside my head. One thing I have found about blogging, is that it does let me get some thoughts jotted down and get some feedback. The nice thing is that in most cases it doesn't take a lot of time to get something written. Anyways, here is what is rattling around in the old coconut now.

Performance Tuning

This is something that I think that we as developers need to pay a bit more attention to when we develop. As it stands right now, in most cases we put this off until the very end, which means due to deadlines and other bug fixes, we never actually get around to performance tuning. I'm not one of those that thinks that performance tuning needs to happen every time you write code, it just doesn't make sense to do it. However, with that said, I think there should be at least one middle iteration during the development process where performance is addressed. In some cases, we need to make sure that we are testing with some real world scenarios not the small test cases we use everyday. What may work great for the simple cases, gets bogged down when you try to use it in a typical real world scenario. So, my dream would be to have people devote some more time to performance in the middle and at the end of the development. The faster we make the code for the tough cases, the better it will be over all in most cases.

Refactoring

I'm really becoming a fan of refactoring. This in some ways goes against the performance tuning but when refactoring is applied correctly, it can help with performance in unexpected beneficial ways. Anytime that we can make it easier to maintain code, and also reduce the overall footprint size of the programs we have to maintain it is a good thing. Like Performance tuning, it seems to be one of those things that gets pushed to the side as unneeded busy work. In some cases this is because there aren't enough unit tests to make sure that the refactoring doesn't break existing functionality. If the unit tests aren't there, write them first, and then refactor. It'll help the person that comes behind you, and maybe yourself later on.

Build Dependencies

This is something that's a pain point for projects that have multiple dependencies on a variety of plugins or common utility jars. There seems to be two approaches that people take:

  • Build everything every time something changes whether it needs to be rebuilt or not.
  • Have a snapshot of a set of dependencies, and then periodically rebuild the whole project.
Both have disadvantages. The first causes unnecessary wait times for continuous integration scenarios, especially when a full build may take 8 hours or more. The later can introduce errors late in the development cycle, because you aren't continuously integrating with the code base as it changes. I'd be interested in hearing how people have addressed the build dependencies issue.

Standards Participation

One thing I have noticed in the various standards work that I have done and the groups that I have participated, is that there is a tendency to join the group for the name recognition. However, when it comes to the participation and helping move the organization along, this seems to fall to a very few core people that do 90% of the work. The problem here is that the work that the 10% or so of the membership does, affects the overall direction as a whole. This doesn't necessarily make for a good standards process. If you are a member of any organization, please take the time to participate and more importantly, voice your opinions at the meetings. Communication is the thing that drives change, speaking privately or in side conversations doesn't change anything unless the people that are elected know that something isn't working. Also, take the time to work on any groups or committees that the orginization may have. We are all busy, but in most cases, the time committment isn't as great as one may think. A little bit of feedback and elbow grease can go a long way to helping make an organization successful and beneficial for it's entire user community, not just the few that are currently doing 90% of the work.

Well, I think that's it for now. Thoughts and feedback are always appreciated.

SpringSource Application Platform and IDE implications

Life is about to start getting a lot easier for enterprise application developers. Last October, my JDJ article concluded with the following statement:

Eclipse plug-in developers are already spoiled with a dramatically easier way of building applications and are incapable of going back to a day in which the IDE support did not provide them with this high level of automation at both the language and component level. While the much more heterogeneous nature of JEE applications makes this kind of automation more challenging, the latest developments in the Eclipse WTP and Mylyn frameworks provide key enablers. It is high time that Java EE developers start feeling spoiled by their tool support as well.

Today’s announcement of the OSGi-based SpringSource Application Platform seals the deal. Consider the facts that Java is a great OO language, that OSGi is arguably the best component model to date and meshes perfectly with Java, and that Spring is the de facto programming model for reducing the complexity of enterprise applications. What’s clear from the announcement is that these three modularity technologies will work together seamlessly on the server side.

The final thought to keep in mind is just how far this combination of Spring, Eclipse and Mylyn can go. The static nature of Java and the quality of the OSGi component model have made it possible for Eclipse to provide a remarkable set of productivity features such as consistent refactoring across Java and plug-in resources and easy launching and debugging of plug-in based desktop applications. The Spring Framework is building on the very same Java and OSGi technologies…

The neat thing about good modularity is that it makes a tool builder’s life dramatically easier. Consider how Java’s type system enabled content assist and the browsing of type hierarchies. Or how the use of OSGi by Eclipse’s plug-ins allows you to stay sane while dealing with hundreds of plug-in versions and dependencies. Modularity technologies make it easy to navigate and browse the entire structure of the system, enabling Mylyn’s Task-Focused Interface to ensure that you only see the parts relevant to the task-at-hand, no matter how large that system is.

To date Eclipse developers have been spoiled by the PDE’s plug-in and feature editors, which make it easy to evolve large Eclipse-based applications. Today’s announcement means that the same component model will now be working on the server side. The IDE support is evolving alongside the Application Platform, and leverages WTP, Spring IDE and Mylyn. Here is a teaser of the Eclipse-based tools:

Tasktop Technologies has been having a great time working on these tools with SpringSource, and you can expect a lot more Eclipse-based innovation coming from both the commercial SpringSource Tool Suite and the open source SpringSource Application Platform Tools.

SpringSource App Platform is a Curate’s Egg

SpringSource’s announcement yesterday was not a big surprise — especially after they hired Glyn Normington, an OSGi heavy-hitter who previously worked on turning IBM WebSphere Application Server 6.1 (WAS) into an OSGi-based platform.

Like the famous Curate’s Egg, the SpringSource Application Platform(S2AP) is excellent in parts, and I definitely recommend sampling the good bits. However, eating the whole thing might leave you feeling a little queasy.

Here are the parts that I really like:

  1. SpringSource has made a strong statement in support of OSGi, not just as an internal implementation detail for a server platform, but as something that should be available to all developers. Most JEE application servers are moving to OSGi or have already done so, but at present they use it only for their internal implementation, i.e. I can’t deploy a bundle to WAS and start consuming services published by the platform. In S2AP I will be able to do that. This is a huge advance because it opens up the benefits of modularity and dynamic deployment to “ordinary” developers. Rod explains these benefits in an interview with Geertjan Wielenga on JavaLobby.

  2. As part of the platform, they are providing a repository of common open source libraries with accurate OSGi metadata. One of the biggest hurdles to getting started in OSGi is in finding or creating “bundleized” versions of the libraries one needs to use. More and more open source projects supply OSGi metadata out of the box, but there are still many that don’t. While there are existing repositories like this, SpringSource’s appears to be one of the most comprehensive and high quality. Incidentally SpringSource were recently criticized for not “eating their own dogfood”, i.e. for running the main Spring website on a PHP-based publishing platform. But this repository appears to be running on S2AP; take a look at the 404 page. In fact, might this be the first example of a production S2AP application?

  3. Spring Dynamic Modules (Spring-DM, formerly known as Spring-OSGi) is a great way to marry the traditional Spring Framework with OSGi services, substantially simplifying the programming model for services… although it’s not the only programming model in town for OSGi developers. For anybody already using Spring but not yet OSGi, Spring-DM offers modularity at the application context level with on-the-fly updates to beans. Spring-DM has been available for a little while now but is obviously an integral part of S2AP.

  4. Assembling all the bundles necessary to build an enterprise application in OSGi has previously been something of a chore. S2AP will contain all the commonly needed parts in a single download, along with (presumably) some management tools, installation process etc. This is great for getting over the initial “Where do I start?” problem.

Now, here are the things I’m less than thrilled about:

  1. There are two new bundle headers, Import-Bundle and Import-Library. As far as I can see, Import-Bundle has exactly the same problems as Require-Bundle. The new header simply provides indirection, i.e. you supply a logical bundle name rather than the actual Bundle-SymbolicName. This doesn’t fix the issues with binding to the wrapper around a set of packages rather than the packages themselves. Import-Library appears to be even worse, as it performs an Import-Bundle over a whole set of bundles at once!

    The documentation even admits that, using this approach, you will end up dragging in far more imports than you actually need. But it adopts the attitute that convenience is more important than correctly expressing the dependencies of your bundles. Needless to say, I disagree.

    Now, I admit that Import-Packages can be burdensome, but to solve this I think we just need better tools. I think Eclipse PDE could offer more help, for example, and it has been gradually improving in this area. Peter Kriens’ “bnd” tool is an excellent alternative: it uses bytecode analysis to include all the dependencies, and ONLY those dependencies, that you actually use.

    Luckily, Import-Package is still available in S2AP if you wish to use it. I strongly recommend avoiding both Import-Bundle and Import-Library and sticking with the standard Import-Package header.

    One question regarding these new headers is how they are supported by the tooling. I assume that SpringSource are leveraging Eclipse PDE for their development tools, in which case it seems they must have extended PDE. In fact tooling in general was not mentioned at all in the S2AP announcement. I wonder if there will be any support for non-Eclipse users?

  2. The announcement makes it clear that a substantial amount of effort has been put into proprietary extensions to OSGi, in order to support some existing libraries, particularly ones that have issues running on vanilla OSGi (e.g. Hibernate), and provide “Load Time Weaving”. It’s not clear what those extensions are or how they work, but it is clear that they only work on one OSGi implementation: Equinox. I have blogged previously about the risks involved in supporting only a single implementation of OSGi. Also, I feel that they may simply not be necessary for many users of OSGi: not everybody needs Hibernate, even in the Enterprise space. Also other people have clearly been able to use Hibernate in an OSGi context without SpringSource’s help. So it remains to be seen how valuable these extensions are.

    The best I can hope is that if these extensions really are necessary, then SpringSource’s work will be fed back into the OSGi standards process and appear in a future release of the specification, so that other frameworks can implement them too. In the meantime it feels risky to rely on them, in the same way as relying on Equinox’s extensions makes me uncomfortable.

Anyway to summarize, I still think that yesterday was a great day for OSGi, and for SpringSource, and of course for enterprise developers. S2AP is not perfect, but I still hope it gains widespread use. Just stick to the OSGi specification and you won’t get hurt!

Redmonk Unconference


Last year at JavaOne, the highlight for me was the Redmonk Unconference.  It was a great venue to network, learn and discuss issues relevant to the open source community.  The guys at Redmonk do a great job of bringing together the technologist and the business/marketing types into one place.

I would recommend to anyone going to JavaOne to try to make it to this year’s edition.   My goal this year is to get a better appreciation of how people are using twitter for their community.  Mik Kersten is also planning to talk about task focus programming.  See you there.

EclipseLink Project and its Persistence Services

Doug Clarke (Oracle)
 
Abstract:

For over a decade now, Oracle TopLink has delivered a premiere Java persistence solution. With the open sourcing of the complete TopLink product in the Eclipse Persistence Services ('EclipseLink') Project, a new era has begun. EclipseLink delivers a comprehensive set of persistence services addressing relational, XML and non-relational data stores through standard interfaces including JPA, JAXB, SDO and JCA. In this webinar, we will introduce the EclipseLink project and its various persistence services, with a focus on its object-relational JPA implementation including a demonstration of how it can be used within various Java containers.

Total running time 53:43 minutes

Thanks to Adobe for contributing their Adobe Acrobat Connect product to host this webinar.


delicious delicious | digg digg | dzone dzone

Open Screen

It looks like Adobe is getting more "open" with the new Open Screen project... it looks like everyone wants to be THE application platform.

Oh well, I expect to see SWF end up in stranger places... which means more access to Tower Defense games from any device or desktop :)

Finally a Friend

I know, I know…shame on me for taking so long to become a Friend of Eclipse or FOE. I've paid my dues to Eclipse in a lot of ways, and now I can add Pay Pal to that list.

What prompted me to do it? Altruism, love, sense of obligation or duty? Nope…bandwidth. I'm working from home today, where I have a very fast Internet connection (unlike work). But the download from eclipse was really dragging. So I became a FOE, used the FOE mirror, and got some very nice download speeds. Totally worth the money. Hey…at least I'm honest.

You know what they say: "Keep your friends close and your FOE's even closer."

Dash Hits the Fast Lane

The Dash Project's commits explorer has been a popular site since Bjorn and Ward first brought it out. Nick Boldt contributed a bunch of additional scripts and gave it a face lift and I added SVN integration. There is a lot of interesting data, but you always had to really want it. Dash was always that old motor home lumbering in the slow lane. Useful, and full of great stuff, but slow. We've had a lot of commits in the whole history of Eclipse and that leads to lots of data, which leads to slow queries.

AMD to the rescue! We migrated the Dash back-end database to one of our spanking new AMD servers (pebbles) while leaving the front end on the same vserver that has hosted it for the last 9 months or so. Here are some numbers Denis (who did most of the leg work) ran for comparison:

SELECT YEAR AS X, COMPANY AS Y, COUNT(*) AS COUNT FROM commits WHERE TOPPROJECT LIKE 'eclipse' AND PROJECT LIKE 'eclipse.platform' GROUP BY YEAR, COMPANY;

dash: 17.83s
pebbles: 2.66s

That's huge...

SELECT YEAR AS X, PROJECT AS Y, COUNT(*) AS COUNT FROM commits WHERE TOPPROJECT LIKE 'technology' GROUP BY YEAR, PROJECT

dash: 1m7.64s
pebbles: 6.47s

HOLY SMOKES. That's a bit different.

SELECT YEAR AS X, PROJECT AS Y, COUNT(*) AS COUNT FROM commits WHERE TOPPROJECT LIKE 'tools' GROUP BY YEAR, PROJECT

dash: 8.56s
pebbles: 1.74s

Try it out... if you remember that old lumbering motor home, you'll like the new big block transplant and aerodynamic treatment.

Update, Updated

Over the last couple of weeks, I’ve been rebuilding the way the Modeling Project’s update sites work. There are a number of reasons for this:

  1. To provide a Milestone (S) update site, separate from Interim builds (I & M), in accordance with what GMF & GEF used to provide before they adopted my build system.
  2. To reduce the disk footprint that has over the years gone from reasonable to insane, and make it self-cleaning.
  3. To provide site digests for improved performance.

The upshot is that I now have a system that incrementally adds new builds’ jars to the site, cleans out any obsolete jars (ie., if replaced by newer version) and regenerates both the site.xml and digest.zip for the site. Instead of 7.9G, the 7×3 sites (EMF, EMFT, MDT, M2T, M2M, GEF, GMF) now occupy 1.3G.

How does it work? Read on. Don’t care? Skip here.

It all starts with either:

  • an SDK zip (or a few zips, if you produce more than one like GMF),
  • a “Master” zip (the result of collecting all your build’s features and plugins into a single zip, then sending it to build.eclipse.org for signing), or
  • an Update zip (much like the SDK, but including a site.xml file and with the jars in plugins/ and features/ instead of in eclipse/plugins/ and eclipse/features/).

From there, an individual “sitelet” (category.xml) is created for those jars. Unjarred features/plugins are jarred. The sitelet - a single update site category - is combined with other local sitelets & their associated jars into one composite update site. A digest is produced.

Rather than just pushing that whole site from the build server to the remote public server, I use a few tricks to avoid having to upload the same stuff over and over.

  1. If the new site, which I’ll call the nth release, or rN, is identical to the zeroth (current) release, r0, then the process stops right there, as there’s no point publishing the same bits again.
  2. if rN != r0, we cycle the releases so we only ever have three of the same build’s branch (2.1.0) and type (S). r2 is deleted, r1 becomes r2, r0 becomes r1, and rN becomes r0.
  3. Depending on the type of site, we will then aggregate 1, 2, or 3 of these individual sites. For R, we only need the latest; for S we want the last two milestones; for the others, we keep 3.
  4. This aggregate site is used to produce a “clean” list of all the jars that SHOULD be present for the current crop of builds.
  5. A zip is produced containing the new plugin & feature jars, all the current individual category.xml files, a couple of shell scripts (buildUpdateSiteXML.sh, buildUpdateSiteDigest.sh) & the jar list. After pushing this zip to build.eclipse.org, the zip is unpacked and its contents combined with the current update site of the same type.

The new site’s contents are collected to produce a “dirty” list of jars. This list is compared to the “clean” list, and anything no longer needed is purged from the site.

The category.xml files are combined into a single site.xml, and from that the digest.zip is created.

If you’ve been installing any of the Modeling projects from update sites in the past, please try out the new version and compare its performance with your old experience. Feedback to bug 212203. See also the following p2-related issues. There’s not a lot of time left in this cycle, so vote for your faves!

Test early, test often!

Eclipse Certification?

Recently, I passed the UML certification test of OMG. It was pretty theoretical, but it was worth the hassle. It signals to your future employers and colleagues that you care about a subject and thought more deeply about it.

So I think certifications make sense and build trust.

Currently, there is no Eclipse certification program. But I think that would be a great addition to the Eclipse community.

This article cites top reasons for an Eclipse certification program: http://ahtik.com/blog/2006/11/11/top-5-reasons-for-eclipse-certification/

Others think certifications are not useful: http://wbeaton.blogspot.com/2006/11/certification-is-useful.html

April 30, 2008

Maven POM editor screen mockups

Many developers believe that it is hard to build a good UI. Actually this is true, but not because it is hard to glue widgets together and hooking up the logic to those widgets. That part is relatively easy if you use the right tool for the job (my favorite one is the WindowBulder from instantiations). However to build a UI with good usability characteristics we need to take into account many things that have nothing to do with the code. It is more critical to present information to the user in a most efficient way, keep UI compact, make all related data grouped together and easily accessible, as well as number of other usability and aesthetic factors.

Since we are now working on Maven POM editor for the Maven integration for Eclipse (m2eclipse), we do our best to accommodate all those factors, but to make the UI even better, early feedback on the UI is very important. This is why we posted screen mockups for the POM editor to the project wiki.

There is an XML source editor, and a multi-tabbed form-based UI. The latter should make it easy to navigate through and make modifications to the Maven POM for new and experienced Maven users and will also allow us to do some cool integration that I will blog about later. The following mockups shows the UI design for editor tabs representing certain sections of the Maven POM. Most of the tabs are using Master-Details approach there "Details" panel shows information for selected entry (e.g. details for the Maven plugin entry selected in the "Plugins" or "Plugin Management" sections. This design is also reusing UI panels in several places. For example, "Dependencies", "Repositories", "Build", "Plugins" and "Reporting" tabs look the same as corresponding nested tabs on "Profiles" tab for the currently selected profile.

If you find this interesting, please share your thoughts, ideas and suggestions in comments to this blog post, on the wiki or in project Mailing lists or Eclipse news group (web interface and registration form). Also, if you want to get more involved, the editor plugin is already in SVN, you can play with it or even help us to implement all functionality. See instructions for setting up development environment on the wiki.

Eclipse Lite Languages


As part of the Eclipse University Outreach initiative, I have developed plug-ins that allow students to evaluate Scheme and Prolog in Eclipse. A beta version of the Scheme plug-ins is now available. After resolving some licensing issues, the Prolog beta version should be available in June.  You can view the user guides here for both to get a feel for what they can do. You can also download the Scheme plug-ins from the same location. Next up will be a lite version for Java.

The Portal with a splash of Dash?


Been feeling that you just don't know what has been going on with the Portal? When was the last time you trolled through the open Portal bugs? Seems harder and harder to keep in touch these days.

Well fear not because the Portal has become part of the Dash project and now it is even easier to keep track of what your good friend the Portal has been up to. Check out the 'new and noteworthy' section every month to see all the great new features and refinements for the Portal.

The first M1 milestone has a little bit for everyone. For those how have left the fold there is the committer emeritus page. Project leads now have a new component to help them expand the list of committer emeritus by managing inactive committers. To replace those lost committers we now have a refined election process that requires a valid email address. And for those who like rounded corners we have made you happy too.

Till next time,
Darn Good Developer

Allow to move mouse into hover; or how to make it stick

If you are a user of our latest milestone build 3.4 M6a (you should!) you might have noticed that some of our hovers have changed their behavior: It is now possible to make them sticky by moving the mouse into the hover. This is much more than just a small enhancement: For us this is [...]

SpringSource Annnounces New Application Server Based on Equinox


SpringSource has just launched a new application server, called SpringSource Application Platform, that is based on Equinox, Tomcat and Spring.  The key thing is that it is not a Java EE application server but one that has been designed for modular development and deployment.

InfoQ has a good write-up about the announcement and Dana Blankenhorn has provided some coverage.   It will be interesting to see how this announcement is received in the Java community.  The Spring guys have a great reputation and community, so it will definitely get attention.

Of course this is great news for Equinox and OSGi; lots of innovation coming for this platform.

Bandit and Higgins win an Award at EIC

They said:

The second special prize goes to open source projects Higgins and Bandit, which we consider the most important open source initiatives in the field of Identity Management.