KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: 4D Insider Libraries vs. Components
PRODUCT: 4D Insider | VERSION: | PLATFORM: Mac & Win
Published On: April 27, 2001
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

A library is a 4D Insider file that contains a set of structure objects. By copying objects to a library, you can maintain a set of objects commonly used in your databases. This library can easily be moved to other databases, allowing you to reuse the objects in whichever database or library you want. 4D Insider libraries provide a way to exchange modular 4D structure components within a work group.

A component regroups various 4D objects (tables, project methods, forms, menu bars, variables...) representing one or more additional functions. Developing a 4D component providing electronic mail functionality is one example. A component is autonomous and must be able to be installed in any 4D structure.

Components are defined, generated, and installed with the help of 4D Insider. The component definition is based on the cross-references analysis performed by 4D Insider (target objects and source objects). Unlike libraries and groups, the components embed the idea of security of objects that they compose. During the development phase of components, each object is attributed an access type, "Public", "Protected" or "Private". This attribute determines whether the object will be visible or modifiable in 4th Dimension and in 4D Insider once the component is installed within a 4D database.

Summary:
A library is open source code that once installed in a structure file, can not be removed. It can be edited to fit the needs of any database. A component can be a library if it is declared as "Public", however if it is not then it is not open source, and therefore since it is only accessible via entry points it cannot be edited. A component can be used with any structure and can be removed from a structure.