EclipseZone logo image
Thursday, November 30, 2006  

Join the Battle Against Bad Java Code

You have an ally in the quest for quality applications... Quest Software. Our white paper, "Performance Testing Methodology," will show you how to effectively implement performance testing in your Java development environment.

Read the white paper now - and we'll send you a JProbe® t-shirt!

 EZ News Corner
dzone Most-clicked links this week
 
 EZ News Corner
 Next section
Alex Blewitt is a pilot in his spare time, when he's not hacking in Eclipse or spending time chasing Sam chasing the dogs

Alex Blewitt The importance of OSGi

Although OSGi has been around since 1999, it came to my attention in 2004 when it was used as the basis of the Eclipse platform 3.0. Since then, it's become clear that OSGi is one of the key pieces in Eclipse's modularity and runtime flexibility.

However, Eclipse isn't the only application to be based on OSGi. More recently, the WebSphere application server has been reworked to sit on top of the OSGi platform, and the Spring framework is undergoing integration with Spring-OSGi. And of course, all of the RCP Applications based on Eclipse RCP can take advantage of the dynamic extensible nature of the underlying platform.

Unfortunately, a successful deployment of an OSGi (or RCP) application may not be enough to convince others that it is the right way forward. If the application uses OSGi internally (either for enforced modularity when developing or to take advantage of the RCP framework), externally it's still likely to be indistinguishable from a non-OSGi application. Unless there's some form of external programming model that others can contribute their own functionality, there's no significant benefit seen by the end user. As an example, the fact that WebSphere is based on OSGi is a coup for component based programming, but it may not be possible to install other OSGi bundles into WebSphere. On the other hand, Lotus Notes "Hannover" is exactly the kind of application that would benefit from being able to externally contribute functions, macros etc. by end users (though one wonders whether the support in LotusScript would provide that by default anyway). In short, if you have a well-built RCP application, how do you convince others the benefits of using that over another competing technology, such as the NetBeans platform?

You'd think that the future of OSGi is pretty much guaranteed. There's certainly a lot of drive towards OSGi adoption by the large players, and of course the existing areas of mobile devices are already an existing base for OSGi systems. However, there's a few potential bumps in the road ahead.

For starters, Java 7 is likely to have some form of modularity built in under the guise of JSR 277. Of course, it may not end up being delivered as Java 7 but pushed back to Java 8, but something like this is likely to end up in the Java language in the future. (Whether people adopt it is another question.) There's probably a 2-year gap before JSR 277 becomes widespread (and maybe another year or two before it ends up in enterprise-supported environments). However, for many people just learning Java in two years time (for example, the CS graduates of 2010) the core Java will already have a potentially OSGi-incompatible modularity layer. There's many areas that OSGi could be used in before this time, but only with good examples (such as Spring-OSGi) to lead the way.

Secondly, OSGi needs to be easier to learn for new people in order for it to be adopted by large swathes of open-source projects. There's limited projects using OSGi at the moment (there was a nice summary by Piero Campanelli recently on open-source OSGi implementations and uses) -- and partially, that's because there's limited learning opportunities. However, the submissions for EclipseCon (featuring the OSGi Developer Conference) this year certainly suggest that OSGi is a hot topic for the coming future.

Thirdly, the documentation for OSGi needs to be more available. There's a set of documentation in JavaDoc form in the Eclipse help pages (or similarly for other OGSi implementations) -- but there's a separate section for the Eclipse API and the OSGi API. Apart from other things, it means that the Eclipse API documentation can't be built with hyper-links to the OSGi implementation. Unfortunately, it's also not always possible to understand what the OSGi specification means from the JavaDoc alone; for example, org.osgi.framework.Constants#BUNDLE_NATIVECODE_OSNAME can be used to find out what the OS is for determining which native libraries to load via a Bundle-NativeCode manifest entry. But there's no documentation on the internet that suggests what the valid values for Bundle-NativeCode can take for the os property.

Of course, you can (and should) download the OSGi specifications, which tell you that the OS can take values such as WindowsXP, WinXP and so on. However, you have to submit a request before you're told where the PDF documents are (though someone ended up posting a reference to the r4.core.pdf on an archived mail newsgroup recently which turns up on a quick google search if you don't want to send your e-mail address).

Really, if you want a technology to be adopted, make information about it freely available; don't expect that people will give you their e-mail address just to find out about it.

Lastly, there needs to be a lot of good (and varied) examples of OSGi being used for building dynamic systems. At the moment, it's just seen as the basis of Eclipse (and thus automatically shunned by IntelliJ and NetBeans users), or for server-side J2EE/Web-based systems. There's more to the server-side than web-based applications; but, go to the Server-Side equinox and you could be forgiven for thinking that HTTP is the only use to which this technology applies. I even submitted a tutorial proposal for OSGi on the server-side not using HTTP/Web/AJAX, and it was rejected in favour of building server-side web applications, for 'being too similar'. Fortunately, at EclipseZone, we've got a few articles lined up discussing the Eclipse platform and OSGi for non-web applications.

OSGi has been chosen by a number of important decision makers, and a number of key projects. But in order for it to capture the interest of the wider Java community, it's got to be made more accessible and easier to quantify the benefits of why your next system should be implemented on top of OSGi.

Until Next Time,
Alex Blewitt
alex@eclipsezone.com

Find cool Eclipse plug-ins at Eclipse Plug-in Central

Are you looking for a specific feature to add to your Eclipse environment? Then you should check out Eclipse Plug-in Central (EPIC). There are over 600 Eclipse based plug-ins listed. It is a great way to promote your Eclipse solution!

Calling all plug-in providers, list your plug-in on EPIC.

 Tips and Tricks
 
 Tips and Tricks
 Next section
 Back to top
Nearly every day, RJ and others, bring you the hottest tips and tricks from around the Eclipse universe. Have a hot tip? E-mail the editors at editors@eclipsezone.com.
A basic Service Oriented implementation using RCP and Servlets

This article shows how to set up a simple Service Oriented development model based upon the Eclipse Rich Client Platform (RCP) for the client side and a plain Java servlet for the server side. The small footprint of this model allows the developer to focus on the basic concepts of the Service Oriented paradigm without having to deal with specific implementations (e.g. Web Services).

Full DiscussionPosted By: Vincenzo Caselli - (4 Replies)

Using longer paths on Windows with UNC

Windows had a path limit of 255 characters in total, which whilst it may not be a lot for documents, can be a limit with large directories in software installations. Eclipse is notorious for long paths, especially if the plugin or feature contains a qualifier and is an unpacked Jar. Fortunately, now it's possible to work around this ancient path limit.

Full DiscussionPosted By: Alex Blewitt - (0 Replies)

Install Eclipse Plugins - The easy way

Eclipse has a well-designed,and extensible architecture. What is valuable about Eclipse is that it provides an open source platform for creating an extensible IDE. This platform allows anyone to build tools that integrate seamlessly with the environment and other tools. The key to the seamless integration of tools with Eclipse is the plug-in. Managing Plugins becomes messy over the period of time. This tip describes an easy way of managing eclipse plugins using "links" concept.

Full DiscussionPosted By: Venu - (5 Replies)

JavaSVN now called SVNKit

Update your bookmarks ... JavaSVN is now called SVNKit. Otherwise, it seems to be the same. Version 1.1 has just been released.

Full DiscussionPosted By: Alex Blewitt - (2 Replies)

Asserting Conditions in Eclipse-Powered Applications

It is a common idiom to assert to help ensure a 'contract' in public APIs; Eclipse 3.2 now has a common facility available as a top-level facility for just this task.

Full DiscussionPosted By: R.J. Lorimer - (5 Replies)

SWT: The Newly Available DateTime Control

Eclipse 3.3 M3 brings with it a new build of SWT, and with that a new widget: the DateTime control. Learn how to use it here.

Full DiscussionPosted By: R.J. Lorimer - (4 Replies)

Working with the Eclipse FileSystem

The Eclipse filesystem is an abstract API for filesystem access with several implementations already available.

Full DiscussionPosted By: R.J. Lorimer - (8 Replies)

Bridging EMF to the common navigator

A common task in building plugins is to provide a new project structure within the navigator. The JDE created its own navigator, and in past projects I was force to do the same. Now there is the means to extend the base navigator for your project structures. There should be an easy way to bridge from the navigator content extension to any EMF model. That is my objective here.

Full DiscussionPosted By: Jeffrey Ricker - (0 Replies)

Field Decorations with JFace

Field decorations in JFace are a useful feature for providing per-field feedback and assistance, and they are easy to use.

Full DiscussionPosted By: R.J. Lorimer - (0 Replies)

Text Field Content Proposals in JFace

A particularly nice feature of GUI applications is the ability to provide context-sensitive rich field assist for text-fields. Learn how to add your own with JFace.

Full DiscussionPosted By: R.J. Lorimer - (1 Replies)

 Ask EZ
 
 Ask EZ
 Next section
 Back to top
Everyone has questions, especially about a platform such as Eclipse that has so much potential to be customized. EclipseZone comes to the rescue as our editors answer nearly any question you can think of in our Ask EZ forum.
Eclipse / PHP Editor Problem starts Dreamweaver 30% of time.

Trying to convert to Eclipse for PHP development for projects using Smarty. Fighting conversion to Eclipse/PHP problems more than PHP code problems.

Full DiscussionPosted By: Eli Johnson - (0 Replies)

IWorkspaeRunnable implemantation

Please tell me how can i implement IWorkspaeRunnable interface. I am calling marking statements inside this class, which is not working as expected...

Full DiscussionPosted By: Jayaprakash K R - (0 Replies)

Problems with Eclipse 3.2.1

The projects in Navigator view are not in sync with those shown in Package Explorer view. And a project does not build at all.

Full DiscussionPosted By: Yamini - (0 Replies)

Eclipse running tooo slow, please help!

Eclipse running too slow in a good notebook, while running ok in a desktop with equivalent configuration and operating system... Whats wrong here?

Full DiscussionPosted By: Cassio Marques - (0 Replies)

Selecting a new Project type

When selecting a new project type, if you want multiple functionality in the project (such as EJB3, JSP, EMF, etc), which one do you choose?

Full DiscussionPosted By: V K - (0 Replies)

The Help window cannot be opened(Help->Help Contents)

When opening eclipse's built-in help it fails to open. in the log, I see that an exception is thrown: LogConfigurationException.

Full DiscussionPosted By: Moshe - (2 Replies)

How i add task using track repository

Hi All I'd like to be able to use mylar plugin;when i am add a task in to trac repository at the time it will show error like this Con

Full DiscussionPosted By: Murugan - (1 Replies)

Customizing eclipse generated getters and setters

Customizing eclipse generated getters and setters. As of now i see some code generated by eclipse, but i want to customize that

Full DiscussionPosted By: solomon - (2 Replies)

How to make a custom project template?

I'd like to be able to set up a project template; maybe one that follows a new project wizard of some sort. It would create files as necessary and ..

Full DiscussionPosted By: Ivan - (2 Replies)

CVS checkout and update error?

I "updated" some files, but Eclipse reported "A resource exists with a different case: current relative location ". What's wrong with it?

Full DiscussionPosted By: Sha Jiang - (0 Replies)

Runtime WorkBench

Could any one tell me what is a Run time workbench? How to a new runtimeworkbench? Also help me how to create a protege plugin

Full DiscussionPosted By: Satyajit Malugu - (0 Replies)

Use specific encoding?

I want all of files are in unique encoding, how to get it? I used "javac" to compile the source in CMD, then reported there was bad character \6527

Full DiscussionPosted By: Sha Jiang - (2 Replies)

how do i make my own shortcuts

hello, how, in Eclipse, can i make my own keyboard shortcuts?? for example: when i'll press Alt+j it will write: "JahJahBless"

Full DiscussionPosted By: Ofir - (3 Replies)

Error: Cannot retrive javadoc

Whenever I press ctrl+space for showing choices of methods, error- Java ModelException: Java Model Status [Cannot retrieve the attached javadoc...

Full DiscussionPosted By: alice9 - (0 Replies)

How to specify my own config.ini file

How to specify my own config.ini file. i want to specify my own config.ini which is not under \configuration? is there any other eclipse/osgi arguments?

Full DiscussionPosted By: hotiday - (2 Replies)

EMF package initialization issue

Finding a way to avoid class regeneration for a big ecore MetaModel (200 classes), lead me to a Java reflection issue.

Full DiscussionPosted By: Radu Bretean - (0 Replies)

Run/Debug Preference

Customizing Run/Debug Preferences so that I can use the same in my application acording to my own requirement. I am using Eclipse 3.2

Full DiscussionPosted By: Shahbaz - (1 Replies)

How to configure Eclipse 3.0 IDE?

Hi guys i'm a beginer in java development till now i used to work with EDITORS for coding,now i would like to go for ECLIPSE 3.0 IDE?

Full DiscussionPosted By: kiranteki - (1 Replies)

Close Project in Eclipse

Problem Closing project in Eclipse. I get an error window after closing the project which is described below.

Full DiscussionPosted By: Wesley Phillips - (1 Replies)

how to get line number and content of the custom editor

getting the line number and the content of the line in which the user right clicks on the custom editor.

Full DiscussionPosted By: subramanian - (1 Replies)

Cheat Sheets in the Eclipse RCP apalication

Not sure which plug-ins are needed for the Cheat Sheets. I use the Product export wizard and when i launch the product i dont see any menu item with the cheat sheets.

Full DiscussionPosted By: Suresh Krishna - (0 Replies)

Eclipse branding and the picture in the About action

Eclipse branding and the picture in the About action. Somehow i am not able to get the feature picture in the About dialog.

Full DiscussionPosted By: Suresh Krishna - (0 Replies)

How do I set the background color of a TabFolder?

Using the setBackground method of a TabFolder object appears to do nothing. The TabFolder background color is always gray.

Full DiscussionPosted By: Aaron - (1 Replies)

Missing libraries (sometimes...)

There is one thing with Eclipse I'm experiencing for a good while already, I was hoping the problem will be resolved with version 3.2, but it seems it is still there.

Full DiscussionPosted By: bohdan - (2 Replies)

Detecting useless method calls

How can I detect when the return value from a method is not being used? I've made the same mistake a few times now...

Full DiscussionPosted By: Ricky Clarkson - (8 Replies)

 Popular at EZ
 
 Popular at EclipseZone
 Next section
 Back to top
A recap of some of the most popular and active EclipseZone discussions this week.
Anyone Using the Java Browsing Perspective?

JDT contains a lot of really neat tools to help expediate your development workflow. The Java Browsing perspective is one of them. But how many of you actually use it?

Full DiscussionPosted By: Daniel Spiewak - (13 Replies)

Is Eclipse 2.1 Really Dead?

Eclipse 3.0 has been out for over three years now. Since the release of 3.0 M4, I haven't touched a previous version of the IDE. But what about everyone else?

Full DiscussionPosted By: Daniel Spiewak - (8 Replies)

Eclipse on Linux Proposal Approved

Almost a year ago now, a proposal was started to improve Eclipse integration on Linux. Well, clap your hands penguin fans, it has been approved!

Full DiscussionPosted By: Daniel Spiewak - (9 Replies)

Generic Quick Fix Plugin

Ever wanted to define your own Quick Fix items? (like "Add import", etc...) Well, this plugin lets you do it using regular expressions and a little basic investigation.

Full DiscussionPosted By: Daniel Spiewak - (6 Replies)

How much of Eclipse do you use?

Eclipse is an increadibly powerful IDE with loads of features. I don't use anywhere near all of them on a daily basis, do you?

Full DiscussionPosted By: Daniel Spiewak - (5 Replies)

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other DeveloperZone publications.
Manage your DeveloperZone membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editors@eclipsezone.com
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

EclipseZone News is a service mark of DeveloperZone, Inc.
Copyright ©2001-2006 DeveloperZone, Inc.

Thank you for your continued support of DeveloperZone. If you prefer not to receive the EclipseZone weekly newsletter, send an e-mail to unsubscribe-eznews@javalobby.org and please ensure the actual email address to be removed is present.
DeveloperZone Inc., 113 Legault Drive, Cary NC 27513 USA