# Choosing a Client SDK

This chapter discusses software development kits to help you select the appropriate directory SDK for your particular situation.

This chapter covers the following topics:

- Java Naming and Directory Interface

- Directory SDK for Java

- Directory SDK for C

- Operating System libldap Library

- Support for Other Programming Languages

## Java Naming and Directory Interface

Java Naming and Directory Interface (JNDI) technology supports directory access through LDAP and DSML v2 from Java applications, and is part of the Java platform. With JNDI, you can build powerful, portable, directory-enabled applications that do not depend on classes outside the Java platform.

JNDI provides an abstract model that lets you access not only directories, but also naming services in general, including DNS, RMI, COS, and file systems.

For information about JNDI, see . The JNDI Tutorial contains descriptions and examples of how to use JNDI. The tutorial is at .

## &DirectorySDKForC;

&DirectorySDKForC; lets you access LDAP directories from C and C++ applications. &DirectorySDKForC; applications depend on &DirectorySDKForC; libraries, which are available on a wide range of platforms.

&DirectorySDKForC; was the subject of Internet-Draft work but never became a standard API. &DirectorySDKForC; closely follows LDAP v3, providing support for core LDAP operations and for LDAP v3 extensions and widely used controls. &DirectorySDKForC; offers a rich API to the C and C++ developer familiar with the LDAP model. &cnDirectoryServer; relies on &DirectorySDKForC;.

This document demonstrates how to use &DirectorySDKForC;. &DirectorySDKForC; code is published in open source form as part of the Mozilla Directory SDK project.

## &DirectorySDKForJava;

&DirectorySDKForJava; lets you access LDAP directories from Java applications, but it is not part of the Java platform.

Although not a standard API, &DirectorySDKForJava; closely follows LDAP v3 idioms. &DirectorySDKForJava; provides a rich set of interfaces to the Java developer familiar with the LDAP model.

This document demonstrates how to use &DirectorySDKForJava;. &DirectorySDKForJava; code is published in open source form as part of the Mozilla Directory SDK project.

## Operating System `libldap` Library

The native LDAP library on Solaris systems provides essentially the same API as &DirectorySDKForC;. Many &DirectorySDKForC; need only be recompiled to work with `libldap`.

The LDAP library is sometimes not compatible with `libldap` on many GNU/Linux distributions. Many GNU/Linux distributions provide OpenLDAP support by default.

## Support for Other Programming Languages

Support for directory access is available in a number of contexts where you do not choose to use the C or Java languages.

For example, Perl has the PerLDAP module and the Net::LDAP collection of modules. Python has the `python-ldap` package. PHP can be compiled with LDAP support. Ruby has the Ruby/LDAP extension module. In many cases, you can choose the language that fits the task and find that LDAP support is available.