1. A method of managing network elements in an optical network at a node in the network, comprising: providing a network element independent module that includes functions for managing different types of network elements; providing one or more network element dependent modules that include functions for managing a specific type of network element and is in communication with the network element independent module; providing a network management application that is in communication with the network element independent module and calls the functions of the network element independent and dependent modules to manage a plurality of network elements in a network; receiving at the node a message indicating that there is a new network element in the network; sending a request to the new network element for information about the new network element; initializing the network element independent module for the new network element; determining if the new network element corresponds to one of the network element dependent modules accessible by the network management application; utilizing one of the network element dependent modules to manage the new network element if the new network element corresponds to one of the network element dependent modules accessible by the network management application; and receiving from the new network element and storing a new network element dependent module if the new network element does not correspond to one of the network element dependent modules accessible by the network management application; wherein the new network element dependent module, network element independent module, and network management application are stored at the node so that the node is operable to communicate directly with the new network element.