November 8th, 2007 |
Published in
Uncategorized
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!
November 7th, 2007 |
Published in
Uncategorized
Note: For those of you reading my posts on Planet Eclipse, you’ve probably noticed the titles have reverted to my WordPress user name. I’ve posted a Bugzilla entry about this, but if anyone has a clue what’s going on, I’d appreciate the help!
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.
November 2nd, 2007 |
Published in
Uncategorized
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.
November 1st, 2007 |
Published in
Announcement
Do you ever feel overwhelmed by TMA – Too Many Acronyms :-) ? Sometimes as a software developer I feel like my job is to figure out William Steig puzzles, except that his make sense!
So to translate the title, there is a new Eclipse project proposal – the Open Financial Market Platform (additional info here). This project is meant to create an OSGi/RCP-based client-server platform for financial applications, allowing users to extend it in areas that capitalize on their core competencies.
And with Eclipse World coming up next week, I’m wondering if there are others intrigued by OFMP who would like to get together at the conference for an informal Birds of a Feather (BoF) to discuss how we might like to contribute to or utilize this platform.
If you’re interested, just send me an email with times that work or don’t work for you. If there’s enough interest, I’ll send out an announcement with a time and location.