Layout Image
  • Home
  • RCP Training
  • OSGi Training
  • Contact

Real World RCP at EclipseCon

by Patrick
March 10th, 2009

In my opinion, one of the best ways to learn about a technology is to listen to people talk about their own projects. Developers who have been in the trenches and worked through the nitty-gritty day-to-day issues have so much to teach us and can save us a lot of time and effort.

If you agree, I hope you’ll consider attending the Real World RCP session at this year’s EclipseCon. If you do attend, you’ll hear 4 developers talk about some extremely interesting RCP usage scenarios, including earthquake damage simulation and nuclear plant testing. You’ll also hear about how RCP can be combined with a variety of other technologies, including CNF, EMF, and GEF to solve real-world problems.

So stop by Wednesday morning! If you’re currently working with RCP or evaluating it for a future project, I think this session will be worth your time.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Announcement, Rich Client Platform
Comments (2)

Video and Eclipse

by Patrick
March 3rd, 2009

For an upcoming project I need to be able to show Flash videos inside of an RCP application. Java has never been known for its multimedia functionality so I didn’t have very high hopes.

Fortunately, with Java Media Components things seem to be moving in the right direction. JMC is an API that allows you to play media files using the video functionality of the underlying operating system (there is work being done to provide cross-platform codecs along with the API, but it’s unclear how extensive this will be). JMC is distributed as part of the JavaFX platform, but it can function independently inside of a regular Swing application.

Using this recent article as a guide, I managed to create an Eclipse plug-in that contributes a very rudimentary video player view to Eclipse or any other RCP application. If you’d like to try it yourself, click here for the source code (exported project). Note that the current code only works on Windows.

Video playing inside the Eclipse IDE

Above you can see a Flash video of Wipeout playing inside of my Eclipse IDE. Wipeout is my 5-year old daughter’s favorite show (if people are falling down, she’s laughing), so after 20 years as a software developer I’ve finally written some code she’d be interested in!

One thing to note is that JMC relies on the codecs installed on your machine. There have been some complaints that JMC is not finding or utilizing the codecs most people have installed, and hopefully this situation will improve. If you find that you’re getting MediaUnsupportedException errors when opening files, you may want to install a codec pack. The CCCP pack seems to work for most people.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Rich Client Platform, Tips
Comments (6)

Adding the Progress View to your RCP application

by Patrick
February 16th, 2009

Last week Prakash G.R. wrote an excellent post on Using progress bars. This is definitely a post that I’ll be referring my students to in the future. There is still one missing piece to the progress bar puzzle, though, and that is how to add the Progress View itself to your application.

You might think that this view would appear on its own when requested through the UI, and in my opinion this is the way things should be (this has been discussed in past Bugzilla entries). For instance, your users may see a job running in the status bar of your RCP application, like this:

progress11

When the user clicks on the conveyor belt icon, they would expect to see a detailed progress view allowing them to cancel the job, like this:

progress2

So how do you get this working? The answer is not what you might think. Normally, you would add a view by finding the view class and creating a new view extension. But for the Progress View, things are a bit different. The ProgressView class itself is internal and is not intended to be referenced directly. It is exposed, however, through an extension factory. The XML to create the view extension looks like this:

   <extension
         point="org.eclipse.ui.views">
      <view
            name="Progress View"
            icon="icons/pview.gif"
            category="org.eclipse.ui"
            class="org.eclipse.ui.ExtensionFactory:progressView"
            id="org.eclipse.ui.views.ProgressView">
      </view>
   </extension>

The last piece we need to make this work is the view icon, which can be found in the org.eclipse.ui.ide plug-in (not part of the RCP SDK). The actual file in this plug-in is icons/full/eview16/pview.gif. You’ll need to copy this icon into your own plug-in and reference it in the view extension.

So while not extremely straightforward, it’s not that difficult either. Interestingly, there are a variety of other things you can add to your application through the same extension factory mechanism. If you’d like to find out more, check out the constants in the ExtensionFactory class.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Rich Client Platform, Tips
Comments (17)

RCP-based Marketcetera featured in the NY Times

by Patrick
January 15th, 2009

It’s not every day that an Eclipse Rich Client Platform application is covered in the NY Times. In fact, I can’t remember it ever occurring before.

But yesterday Marketcetera, a developer of RCP-based open-source trading software, was featured in the Bits Blog of the NY Times. Of course there’s no mention of RCP itself, but it’s nice to know that those building tools with this framework are having some success.

Yesterday also marked the 1.0 release of this product, so congratulations to everyone at Marketcetera! I’m sure I speak for everyone in the RCP community when I say we wish you all the best.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (1)

Making Music with Eclipse RCP

by Patrick
December 18th, 2008

I’m always on the lookout for Eclipse Rich Client Platform applications that push boundaries. RCP is much too often associated with the Eclipse IDE itself, and this leads us to think that RCP applications need to be IDE-like. But there are many more uses to which RCP can be put, and I think we’re still only beginning to scratch the surface.

For example, check out Neck Diagrams (nice web site, by the way!), an RCP application that allows guitarists to create chord boxes and neck diagrams using a visual editor. I’m not much of a musician myself, but this seems like a great tool. What I really like, though, is how this program stretches the idea of what we think of as an “RCP application”.

neckdiagrams11

This is also a great example of software created by a single developer. I love that RCP makes it possible for a solo developer to realize their vision and bring a product to market quickly.

neckdiagrams2

If you’re interested in seeing this software in action, check out the screencast.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Applications, Rich Client Platform
Comments (3)

Perspective Layouts – Programmatic vs Declarative

by Patrick
December 11th, 2008

One issue that developers new to RCP face is whether to add UI elements programmatically or declaratively. In my experience, most initially choose the programmatic approach because it seems more familiar. You know, why mess with extension points when you can just code it up and be done with it.

But it’s almost always better to do things declaratively through extension points, the main reason being that doing so allows you leverage the power of RCP as a modular user interface framework. To illustrate this, let’s look at our options for laying out perspectives.

Programmatic Layout = Centralized / Hard Coded

Here is the simplest code needed to add a view to a perspective programmatically. To do so, we implement the IPerspectiveFactory interface and add a view using its string id.

public class MyPerspectiveFactory implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		layout.addView(MyView.ID, IPageLayout.BOTTOM, 0.5f, layout.getEditorArea());
	}

}

The problem here is that we’ve coupled our perspective to the view being added. This view may exist in the same plug-in as the perspective, but often it does not. If the view is in a different plug-in, we have to declare a dependency on that plug-in just to add the view. It’s possible to reduce the coupling somewhat by replacing MyView.ID with the actual string id itself, but hidden dependencies based on string equivalency are arguably even more smelly.

In the end, a programmatic perspective layout results in a hard-coded and centralized architecture looking like this.

perspective-layouts-central

Declarative Layout = Decentralized / Modular

The declarative approach based on extension points resolves these issues. To layout a perspective declaratively we extend the org.eclipse.ui.perspectiveExtensions extension point.

   <extension
         point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension
            targetID="com.mycompany.myperspective">
         <view
               id="com.mycompany.myview"
               minimized="false"
               ratio="0.5"
               relationship="left"
               relative="org.eclipse.ui.editorss">
         </view>
      </perspectiveExtension>
   </extension>

Using this approach, each plug-in adds the views that it knows about, resulting in a decentralized architecture where the plug-ins containing the views are now in control.

perspective-layouts-decentr

Note that we have not eliminated all coupling, as the perspective extensions still need to refer to the perspective by its string id, but this is not as bad as it sounds. Perspectives are much more static than views – you typically define them and make few changes afterwards. Views, on the other hand are often moved from one plug-in to another or have their purpose (and potentially their id) redefined. Decentralizing control allows you to make these kinds of changes without breaking the perspective layout.

Conclusion

Adding UI elements declaratively is definitely the way to go. It gives you much more flexibility (e.g. you can add views to perspectives you didn’t create) and also allows you to leverage the modular nature of the framework.

Sure, there will always be cases where a declarative approach cannot be taken, particularly when some part of an API is not yet surfaced in the related extension point. But in the absence of such a need, I urge RCP developers to always turn first to the extension point mechanisms and fall back to programmatic approaches as a last resort. As your application evolves over time, you’ll really come to enjoy the flexibility and increased reusability that a declarative approach makes possible.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Rich Client Platform, Tips
Comments (18)

What a month!

by Patrick
December 11th, 2008

I haven’t been posting much as I’ve been buried with work lately. Considering the state of the economy, I guess I should feel lucky! I hope to get back to posting more now that things have calmed down.

Also, I wanted to apologize to anyone who was hoping to attend my Eclipse World presentations in October. My daughter, who goes to college in Manhattan, needed to have an emergency appendectomy. I flew up to New York for the surgery and needed to cancel the presentations. Her surgery went well and she’s fine now. Hopefully there will be opportunities in the future to present the Eclipse World material.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Announcement
Comments (0)

What I'll be attending at Eclipse World

by Patrick
October 27th, 2008

Tomorrow I head to Eclipse World and after doing so much training I’m really looking forward to sitting and listening to others for a change! I am going to be doing a few presentations at the conference, but in this post I wanted to focus on what I’ll be attending next week.

Converting Your Applications From Swing to SWT and the RCP

This topic is becoming increasingly important to my clients. I’ve seen more than a few projects that are trying to leverage existing AWT/Swing resources as they migrate to RCP and are struggling with how to do this properly.

Creating Graphical Editors and Views Using Eclipse GEF

I’ve used GEF occasionally over the past few years, but I’ve never had the opportunity to hear it described in a systematic way. I’m also excited to hear some more about Zest, which I’d love to start using in upcoming projects.

RAP or GWT: Which Java-Based AJAX Technology Is for You?

RIA technologies look to become central to future Eclipse architectures (see the e4 project for the details). I have to admit I’m still somewhat ambivalent about thin-clients and would rather see rich clients with awesome provisioning support instead.

Java UI Testing Patterns and Best Practices

UI testing is always problematic and I think approaching this topic from a patterns and best-practices angle makes a lot of sense. I’m particularly interested in ways to create UIs that are designed to be testable.

So that’s what I’ll be attending this year, and if you see me at the conference be sure to stop me and say hi. And if anyone is interested in having a beer or something, just let me know!

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (0)

Public RCP Quickstart course in Washington DC area

by Patrick
October 14th, 2008

I try to keep marketing posts to a minimum on this blog (I think this is my first one…), but I’m excited to say I’m going to be offering my first public RCP Quickstart course in early November. I often get requests for RCP training from smaller groups of developers and up to this point I haven’t been able to meet this need. Finally, I’ve managed to find the time to schedule a public course that may work for these developers.

So if you’re interested in RCP training and the Washington DC area is convenient for you, I hope you’ll consider attending in November. To get started, you can check out the course syllabus and registration information.

On a slightly different note, I’ve just finished offering my first remote training course to a group of developers in Australia (hello to the gang in Melbourne!). The course went extremely well and it’s got me very interested in offering further remote courses. I’d be willing to offer public or private remote training classes for fairly small groups, so this may also be an option for smaller development teams, or for those in Australia :-)

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (1)

Creating a good presentation

by Patrick
September 15th, 2008

We all like to attend conferences and most people like the idea of presenting at one. But when the excitement of your submission acceptance fades, many of us sit down to face an empty PowerPoint deck and wonder where to start. Creating an effective presentation is a difficult task and it’s made even more difficult by the fact that most of us have never been taught how to do it. 

I’ve spent some time this summer thinking about presentations and reading what I can on the subject. I’m hoping this makes me a better communicator, and in any case I now know what I’m doing wrong! For those of you currently working on presentations or thinking about submitting for next year’s EclipseCon, here are two books I highly recommend.

Presentation Zen

This book by Garr Reynolds is fundamentally about getting your head in the right place. Stylistically, the emphasis is on graphical simplicity and storytelling, but to me the best parts were those that got me focused on why I want to present in the first place. Read this book first to get inspired by what great presentations can accomplish. And also check out Garr’s blog which is full of good information.

One of the best suggestions Garr has is to watch great presenters at work. Spend a few hours watching TED presentations, and you’ll have a new appreciation for how good a presentation can be.

slide:ology

Nancy Duarte’s claim to fame is that she developed the slides used by Al Gore in his talks about global warming. In this book she goes into great detail about how to create an effective presentation. The emphasis here is on the nuts and bolts of creating (but not giving) a presentation, and believe me if you’re not a graphic designer this information will help a lot. By the way, this book is also available on O’Reilly’s Safari Books Online.

If you act on the information in these two books, you’ll be well on your way to becoming a great presenter and your audiences will thank you for it.

I’m in the early stages of incorporating this material into my work, but I can already see some benefits. And if anyone in the Chicagoland area would like to see where I’m at right now, I’ll be speaking tomorrow (September 16th) at CJUG on the topic of “OSGi: Why Java Modularity Matters”.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (5)
« Previous Page
Next Page »

Want to know more about RCP training?

Get information on private training options, pricing, availability and references.

Email address

Want to learn RCP online?

Four days of training for the price of three!

As part of the Eclipse Training Series, two 4-day RCP Quickstart courses are being offered at a significant discount. If you've been waiting for the right time to get RCP training, this is a great opportunity.

Register for May 21 - 24 class

Register for June 12 - 15 class

About me

Patrick Paulin

Patrick Paulin is a software developer and trainer specializing in modular technologies such as OSGi and the Eclipse Rich Client Platform.

Patrick lives in Madison, Wisconsin with his wife and two daughters.

Email - patrick at modumind dot com

Modular Mind
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress