Why create a custom target platform?

One of the most important tips I have for beginning RCP developers is to please, please, please set up a custom target platform for your applications. As a trainer, it’s one of the first things I have students do. This is because target platforms are central to many other things we do as RCP developers, including the management of launch and product configurations. 

A target platform is simply the set of base plug-ins on which your application depends. By default, this target is set to be the entire collection of plug-ins shipped with Eclipse itself. So the first reason to set up a custom target platform is that the default is just messy. Why have hundreds of plug-ins in your target platform when you only need 20 or 30?

So setting up a target platform satisfies my sometimes excessive need for cleanliness, but there are other reasons as well. The best reason is that it decouples your application from the Eclipse development environment. Consider the following scenarios:

  • You’d like to upgrade your Eclipse development environment to a milestone release, but you don’t want your RCP application to depend on beta plug-ins.
  • You want to add GEF, EMF, BIRT or whatever to your application, but you don’t want to add it to your development environment.

In both cases, you’re out of luck if you’ve left your target platform defaulted to your Eclipse install. So save yourself some future headaches and set up a custom target platform.



2 Responses to Why create a custom target platform?

  1. Paul,

    Thanks for this post. It could not have come at a better time.

    I am currently working on an RCP Application with a team of developers. We are in the initial stages when we happened upon your blog post. I am convinced that the creation of a target platform is critical to the life of an RCP Application.

    Now that we have that established, I was wondering if you knew of a good way to create an initial target platform. I went ahead and manually a folder and placed all of the necessary RCP Binaries into that folder. I was hoping that there would be a way to do this more automatically, but I could not find anything.

    Also, what is the best way to share the target platform with other developers. One of the main reasons why I put the plugins manually into a seperate folder is so that we can then version control the Target Platform in Subversion.

    Is there a better approach for the above two methods?

    Thanks in advance for your response.


  2. Patrick says:

    Hi Carlus,

    Good to hear from you! I don’t know of any easier way to create a target platform than the one you describe. But downloading and zipping the file isn’t too difficult! You then will need to add at least the JUnit plug-in if you want to do unit testing.

    As for sharing it, I’d definitely consider placing the platform on a shared drive. It’s also nice to have a wiki page listing the plug-ins needed for each application. And versioning the target platform is a *great* idea.

    I’m actually preparing a post on target platform best-practices for next week, so keep watching for that.

    — Patrick

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: