Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] re: Question about how to handle ICU...

Hi Brian,

On Wed, Feb 4, 2009 at 12:52 PM,  <brian.fitzpatrick@xxxxxxxxxx> wrote:
>
>  but I was wondering if someone
> could explain the benefits of using "Import-Package" directives instead of
> "Require-Bundle"...
>
> I'm guessing it's as simple as not having to pull in the entire bundle and
> only pulling in those packages you really need, but I was hoping someone
> could provide a better explanation.

Require-Bundle ties you to the bundle, but Import-Package allows OSGi
to provide you the packages from wherever appropriate.  I'm not 100%
on the history but Require-Bundle evolved from the eclipse plugin way
of doing things but Import-Package is the OSGi recommended way of
doing things.

For example, in the ICU case com.ibm.icu is the main bundle we ship
with the platform, but a different bundle, com.ibm.icu.base provides
the same API as com.ibm.icu but is about 20% the size (it only
provides replacements for the main com.ibm.icu.text and
com.ibm.icu.util).  If you use Import-Package, an RCP could ship with
com.ibm.icu.base and everything will still work (and they've cut 5 Meg
out of their application).

If you use Require-Bundle, then com.ibm.icu.base could not be used in
this manner.

Later,
PW

-- 
Paul Webster
Hi floor.  Make me a sammich! - GIR


Back to the top