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

Archive for Uncategorized – Page 4

Snow Day

by Patrick
February 6th, 2008

I was all set to write a blog post today on creating an RCP target platform, and then it started to snow … and snow … and snow.

So I decided to take a snow day instead, which unfortunately means I spent most of the day shoveling. I did get a chance to take a walk with my dog, though.

Patrick and June going for a walk

Hopefully tomorrow I’ll be able to get back to work!

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

MVP Example Code

by Patrick
November 8th, 2007

Note: For those following the saga of my post titles reverting to my WordPress user name, it appears the problem is that I have an avatar image in my WordPress profile (thanks Gunnar!). WordPress is embedding the image in my RSS feed with a “title” attribute and Planet Eclipse is grabbing the string from there. I’m now trying to work with WordPress to remove my avatar because there is no way to do this through their UI. The bottom line is if you use WordPress and you’d like to add your feed to Planet Eclipse, do not specify an avatar.

I gave a talk this morning at Eclipse World on Leveraging the Model-View-Presenter Pattern in Rich Client Applications. And as promised, here is the sample code illustrating the various approaches one can take in integrating MVP and RCP.

I’m about to catch a flight, so I don’t have time to go through all the details needed to get the code running. In short, though, if you get RAP via update site you should be able to run the code. I’ll try to help out with any issues you run into.

Thanks to all who attended the presentation!

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

Plug-in Best Practices for RCP

by Patrick
November 7th, 2007

I just finished giving a talk at Eclipse World entitled Plug-in Best Practices for Rich Client Applications. For those who attended, and anyone else who’s interested, here is a summary list of the practices discusses. Feedback is obviously welcome and much appreciated.

Encapsulation

  • Design plug-ins to maximize encapsulation. Expose packages only when forced to.
  • Use a package structure that maximizes your ability to hide code.
  • Never mix public and private classes in the same package.
  • Consider incorporating the “internal” keyword into your package naming convention.

Cohesion and abstraction

  • Start thinking of plug-in contracts in addition to traditional class/type contracts.
  • Your plug-in should have a coherent API. In some cases, this can be composed of a set of factories that return a set of interfaces.
  • A plug-in should represent a coherent concept or subsystem.
  • A plug-in should do one thing and do it well.
  • Add a “New plug-in” refactoring to the list of design refactorings you look for.
  • Many fine-grained plug-ins should be preferred to a few large-grained ones. Don’t worry about plug-ins with a small number of classes.

Dual use code

  • If code is going to be used both inside and outside of an OSGi framework, make it into a plug-in. It’s still just a JAR!
  • If running plug-in code outside of an OSGi framework, remember that your encapsulation mechanisms will no longer be enforced at runtime. The “internal” keyword in package names can help here to inform non-OSGi developers that they should not access certain code.

Third party libraries

  • Third party libraries should always be distributed as separate plug-ins. Do not embed these libraries into plug-ins that also contain your own code.
  • When using third party libraries, look at repositories like Orbit to see if there is already a version packaged as a plug-in.
  • Move third party plug-ins out of your workspace and into your development and build targets.

Activators

  • Activators should be used strictly for lifecycle management. Do not let them become a dumping ground for factory methods.

Plug-in dependencies

  • Visualize plug-in dependencies as a stream, not as a hierarchy.
  • Use Require Bundle to declare dependencies when you want to hard code a dependency to a specific plug-in.
  • Use Import Package to declare dependencies when you want to allow multiple plug-ins to provide an implementation.
  • Minimize the coupling between plug-ins, just as you do with classes.
  • Use extension points and OSGi services to help minimize coupling.
  • Avoid reexporting dependencies unless the exporting plug-in represents a coherent API. Unnecessary reexporting leads to dependency leaks and makes issues like circular dependencies hard to track down.

RCP-related

  • Always create development and build targets for your application. Version those targets.
  • Place RCP product definitions (Application, advisors and branding) in separate plug-ins, Do not mix products into your other code.
  • Use features to wrap your plug-ins and simplify your product configurations.
  • Place unit tests in a separate plug-in or, better yet, a plug-in fragment.
DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (8)

EclipseCon or the beach?

by Patrick
November 2nd, 2007

I was just working on my EclipseCon submission when I realized the conference is scheduled over my children’s spring break! So now I have to choose between EclipseCon and the beach. Let me think… um, I choose the beach.

Seriously, though, I’ll be sad to miss the conference, and I’m just curious how many others are in the same boat. At least in the midwest of the United States, it’s very common for schools to schedule breaks the week before Easter. Even public schools do this so that most kids are out at the same time. My guess is there are a lot of people who will be choosing between a family vacation and the conference.

If it’s a big enough deal to people, maybe EclipseCon 2009 could be scheduled to avoid this conflict. If not, thanks for listening to me vent.

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

EclipseWorld is just around the corner (well kind of…)

by Patrick
August 27th, 2007

I’m really excited to attend EclipseWorld in November. I wasn’t able to go last year but have heard from others that the signal to noise ratio was pretty high. The highlight for me will be doing a full-day tutorial on Test-Driven Development with Robert Martin (who’s also a keynote speaker). I’ll also be giving two talks of my own:

  • Plug-in Best Practices for Rich Client Applications
  • Leveraging the Model-View-Presenter Pattern in Rich Client Applications

Hopefully, I’ll be contributing more signal than noise!

I thought this would be a good time to mention the conference because the cost goes up on August 31st. Also, my personal conference tip is to always book a hotel room even if you’re not committed to going. There are no cancellation charges and you’re guaranteed to not wind up in an overflow hotel. I’m sure the hotels are thrilled with people like me!

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (1)
« Previous 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?

There are still spots available in the next online RCP Quickstart course being held February 27 - 29.

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