You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@directory.apache.org by Stefan Seelmann <se...@apache.org> on 2010/09/04 18:40:22 UTC

Different layers

Hi guys,

in IRC we had the idea to have different levels of abstraction in the
API: A low-level API that represents the LDAP protocol and a more
convenient API for common users that hides the LDAP complexity.

Lets start with the search method.

In the low-level API the search method would return a Cursor<Response>
and the user has to deal with all possible results (SearchResultDone,
SearchResultEntry, SearchResultReference, IntermediateResponse)

In the convenient API the search method would return a Cursor<Entry>
and the search method could also deal with referrals and search
continuations (throw as exception or follow transparently if the user
wants to).

Does that make sense? This is just a first thought, we have to figure
if it makes also sense for the other operations too.

Kind Regards,
Stefan

Re: Different layers

Posted by Emmanuel Lecharny <el...@gmail.com>.
  On 9/6/10 9:30 AM, Pierre-Arnaud Marcelot wrote:
> Hi Stefan,
>
> On 4 sept. 2010, at 18:40, Stefan Seelmann wrote:
>
>> Hi guys,
>>
>> in IRC we had the idea to have different levels of abstraction in the
>> API: A low-level API that represents the LDAP protocol and a more
>> convenient API for common users that hides the LDAP complexity.
> I really like the idea.
>
>> Lets start with the search method.
>>
>> In the low-level API the search method would return a Cursor<Response>
>> and the user has to deal with all possible results (SearchResultDone,
>> SearchResultEntry, SearchResultReference, IntermediateResponse)
>>
>> In the convenient API the search method would return a Cursor<Entry>
>> and the search method could also deal with referrals and search
>> continuations (throw as exception or follow transparently if the user
>> wants to).
>>
>> Does that make sense? This is just a first thought, we have to figure
>> if it makes also sense for the other operations too.
> +1. Makes totally sense to me.

+1 too. Let's try to do that.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Different layers

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Stefan,

On 4 sept. 2010, at 18:40, Stefan Seelmann wrote:

> Hi guys,
> 
> in IRC we had the idea to have different levels of abstraction in the
> API: A low-level API that represents the LDAP protocol and a more
> convenient API for common users that hides the LDAP complexity.

I really like the idea.

> Lets start with the search method.
> 
> In the low-level API the search method would return a Cursor<Response>
> and the user has to deal with all possible results (SearchResultDone,
> SearchResultEntry, SearchResultReference, IntermediateResponse)
> 
> In the convenient API the search method would return a Cursor<Entry>
> and the search method could also deal with referrals and search
> continuations (throw as exception or follow transparently if the user
> wants to).
> 
> Does that make sense? This is just a first thought, we have to figure
> if it makes also sense for the other operations too.

+1. Makes totally sense to me.

Regards,
Pierre-Arnaud