Re: Java Project API/SPI

Svatopluk Dedic <[email protected]> Tue, 22 Jul 2003 12:45:34 +0200
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Message-ID <[email protected]>
Jan Pokorsky wrote:
> 
> First of all I do not think the main purpose of JavaProject is to be 
> implemented by providers but to be consumed by clients. Actually there 
> is just one provider. So why clutter the class with methods useful only 
> for  providers. Maybe we could hide the spi part at all till some one 

IMHO this approach clutters the platform with paired types, one for API, 
one for SPI, while it is obvious for a client what methods it calls (the 
public ones) and what methods are part of the contract.

Comparing to other frameworks (e.g. Eclipse), NetBeans take the purity 
approach far from APIs that are readable (and understandable) by 
platform users. Eclipse takes the issue into the other extreme by merely 
documenting methods to be for client use, provider use or internal use. 
Strangely, their APIs seems more scannable than ours.

This separation should be (IMHO) only considered when the SPI interface 
is very slim compared to the client-side API built around it. But even 
then, there's no added value since the paired API/SPI classes have to 
evolve in sync, with exactly the same compatibility considerations as 
with protected methods directly in an abstract API class.

> really needs to plug own implementation in. Do you suppose to provide it 
> in ide4dev?
> 
OTOH, modal Ok/Cancel project settings dialog, which would allow to 
create targets and resources could use one.

-Svata