Author: szoerner Date: Sun Sep 5 19:22:42 2010 New Revision: 992867 URL: http://svn.apache.org/viewvc?rev=992867&view=rev Log: Added content for custom application development Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-2-cad.xml directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-2-cad.xml URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-2-cad.xml?rev=992867&r1=992866&r2=992867&view=diff ============================================================================== --- directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-2-cad.xml (original) +++ directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-2-cad.xml Sun Sep 5 19:22:42 2010 @@ -28,6 +28,217 @@ under the License. xml:lang="en"> Custom application development + + + This section provides some information about connecting to ApacheDS programmatically. It focuses on Java. + This is not a programming guide, but a help to get started. + Connecting to ApacheDS from your programs remotely does not differ from connecting to any other LDAP server. + You can therefore use general information for this task. The chapter contains some reading recommendation as well. + + +
+ Connecting to ApacheDS with Java components + +
+ JNDI + + + A natural choice for LDAP integration in Java components is JNDI, the Java Naming and Directory Interface. + It has been part of the J2SE since version 1.3, and it is available as a separate download for even more ancient JDKs. + + + + JNDI offers a common interface to connect to different naming and directory services, + including DNS, file systems, CORBA naming services and LDAP. + Therefore it represents an abstraction layer, which sometimes causes trouble if special LDAP features have to be exploited. + + +
+ +
+ "Native" LDAP libraries for Java + + + On the other hand several libraries exist which take advantage of the basic Java network functionality directly. + The interfaces are organized like the LDAP protocol operations, which leads to an LDAP programming experience without abstraction. + Examples for pure Java libraries like that are + + + Netscape Directory SDK for Java + JLDAP, derived from Novell Developer Kit + + + But because JNDI is present in practically every Java runtime environment, these libraries are not widely used any longer, + although they have some advantages versus JNDI. + + + + Due to the limitations with JNDI there are some newer efforts to create a modern LDAP client API for Java. + + + UnboundID LDAP SDK for Java + Apache LDAP API + + + + +
+ +
+ A first example with JNDI + + Because JNDI is most widely used, we present a simple Java hello which connects to + our sample directory. + + + + + You can simply compile and run it; due to the use of JNDI no libraries other than Java SE are needed. + Output: + + + + + + An excellent resource to learn more about JNDI is the + JNDI Tutorial + from Sun Microsystems. + + +
+ +
+ +
+ Other programming languages + + + If you connect to an LDAP server from a program, you normally use a library which encapsulates the LDAP calls. + It depends on your programming language and platform, which options you have here. + LDAP is widely adopted, so there should be at least one solution available for you. + + + + Here are some examples: + + + LDAP APIs for different programming languages (other than Java) + + + + + + Language + Library + + + + + + C, C++ + + An RFC exists for LDAP C APIs, + RFC 1823, + although different implementation vary. The + OpenLDAP + project offers a library for many platforms. + + + + + C# + + Novell LDAP Libraries for C# + + + + + Groovy + + For instance + Apache Groovy LDAP + + + + + + Perl + + Perl LDAP + + + + + Python + + python-ldap + LDAP client API for Python + + + + + Ruby + + Ruby/LDAP + an extension module for Ruby + + + + + Tcl + + Several options exist, one of them is provided by the + TCL library + at SourceForge + + + + + + +
+ +
+ +
+ Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml?rev=992867&r1=992866&r2=992867&view=diff ============================================================================== --- directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml (original) +++ directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml Sun Sep 5 19:22:42 2010 @@ -27,7 +27,7 @@ under the License. xmlns:ns3="http://www.w3.org/1999/xhtml" xml:lang="en"> - LDAP Operations + LDAP Operations in detail