Building an NDS-enabled Application Using Visual Basic and the Novell Controls for ActiveX, Part 1
Articles and Tips: article
Software Engineer
Novell DeveloperNet University
madair@novell.com
01 Jul 2000
In this course, you will develop a complete, working application, using Visual Basic and the Novell Controls for ActiveX. This tutorial is the first part in a series on buildng an NDS-enabled application.
Introduction
To proceed with this tutorial, you need a basic understanding of the OrgChart sample application and how to use it. The following sections explain various aspects of the OrgChart application.
Application Description
In this tutorial, you will develop a complete, working application, using Visual Basic and the Novell Controls for ActiveX. The application, called OrgChart, allows a user to browse a company's organization chart. The program presents a tree-structured view of an organization.
In Figure 1, OrgChart is browsing the organization structure of "Top Ten, Inc."
Figure 1: OrgChart displays the organization structure.
OrgChart reads user and department data from the NDS directory. The user can select a department within the organization and view a list of its members and manager (see Figure 2).
Figure 2: Viewing members within a department.
Finally, OrgChart allows the user to get information about members of the organization, like their title and phone number (see Figure 3).
Figure 3: Viewing specific member information.
The complete OrgChart application consists of two parts:
OrgBuilder. A setup utility that an administrative user runs. OrgBuilder adds data structures to the NDS directory that OrgChart uses to store information about the organization's structure, then creates user and department entries in the NDS database.
OrgChart. The organization browser application shown above.
This tutorial will tell you how these programs work and give you step-by-step instructions on how to create them. You can download the source code and executable version of OrgChart by clicking on the "Download" link at the top of this page. We also provide you with the data files you need to create the Top Ten, Inc. organization.
Directory Object Model
The information in this section will help you understand the directory object model that OrgBuilder creates and OrgChart uses. It is essential that you be familiar with this model before you begin programming so that you will know which attributes to read from or write to when developing OrgChart.
OrgBuilder extends the schema in your target directory to facilitate links between organizations and users that are necessary to produce an organizational chart. OrgBuilder adds the following data structures to the NDS directory:
Three fields that will contain data pertaining to organizational units (departments, divisions, and so on).
Three fields that will contain data about an individual employee's group membership.
A new layout named DNU:OrgChart.
It is recomended that companies register their new layouts so that layout names remain unique. For example, in the name DNU:OrgChart, the "DNU" specifies that the layout was designed by DeveloperNet University, and "OrgChart" specifies the purpose of the new layout.
The User layout will be extended with three new OrgChart-specific optional fields. The Novell Directory control currently does not extend layouts in the NDS base schema, so you will use the NDS Schema Manager utility to add these fields to the User layout.
The DNU:OrgChart Layout
Since the DNU:OrgChart layout (shown in Figure 4) inherits from "Top," it gets all of Top's fields by inheritance. In addition, OrgChart uses three fields from the default NDS schema:
DNU:OrgChart:Group Title. This field contains the name of the group or department in the organization that the OrgChart object describes.
DNU:OrgChart:Group Manager. This field identifies the User object belonging to the manager who owns (manages) the group in the organization that the OrgChart object describes.
DNU:OrgChart:Group Member. This is a multi-valued attribute. Each full name value added to Member identifies a member of the group
These three fields are summarized in the table below.
Field Name
|
Syntax
|
Multi-Valued
|
DNU:OrgChart:Group Title |
Case Ignore String |
False |
DNU:OrgChart:Group Manager |
Distinguished (Full) Name |
False |
DNU:OrgChart:Group Member |
Distinguished (Full) Name |
True |
The User Object, Extended for OrgChart
Because the User layout inherits from several other layouts in the NDS base inheritance hierarchy, it already possesses many inherited fields. OrgBuilder adds three fields (which you must add to the User layout with the NDS Schema Manager utility) so that User entries will have the OrgChart-specific fields:
DNU:OrgChart:Manager. This field contains the full name of this user's manager.
DNU:OrgChart:Organization. If the user is a manager, this field identifies his or her OrgChart object.
DNU:OrgChart:Picture. This is a stream attribute containing a picture of the user.
These three fields are summarized in the table below.
Field Name
|
Syntax
|
Multi-Valued
|
DNU:OrgChart:Manager |
Distinguished (Full) Name |
False |
DNU:OrgChart:Organization |
Distinguished (Full) Name |
False |
DNU:OrgChart:Picture |
Stream |
False |
Conclusion
OrgChart presents a tree-strcutured view of an organization and allows a user to browse the organization chart. The complete OrgChart application consists of OrgBuidler, a setup utility than an administrative user runs, and OrgChart, the organization browser.
OrgBuilder extends the schema in your target directory to facilitate links between organizations and users. OrgBuilder adds three fields so that User entries will have OrgChart-specific fields.
Part 2 of this series will offer specific steps for building an NDS-enabled application.
* Originally published in Novell AppNotes
Disclaimer
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.