KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Different ways for integrating 4D Components into your projects
PRODUCT: 4D | VERSION: 20 R | PLATFORM: Mac & Win
Published On: May 9, 2025

4D components are modular packages that enhance your 4D applications by adding reusable functionalities, such as methods, classes, and forms. Integrating these components can be achieved through several ways:


  1. Manual integration via the Components Folder:

  2. Steps:

    1. Obtain the Component: Download or clone the component, ensuring it has a .4dbase extension (e.g., MyComponent.4dbase).

    2. Place in Components Folder: Move the .4dbase folder into your project's Components directory.

    3. Restart 4D: Upon restarting, 4D will automatically load the component, making its functionalities available in your project.


    This method is straightforward and ideal for quick testing or integrating components not hosted on GitHub.


  3. Integration via GitHub using the Project Dependencies Interface:

  4. Steps:

    1. Open Project Dependencies: Navigate to Design > Project Dependencies in 4D.

    2. Add a new component: Click the '+' button to add a new component.

    3. Specify GitHub Repository: Enter the repository in the format account/repository, e.g., 4d/4D-NetKit.

    4. Select versioning rule: Choose from the following options:


      • Latest: Integrates the most recent stable release.


      • Exact Version: Specify a particular tag.


      • Up to Next Major Version: Allows updates up to the next major version.


      • Up to Next Minor Version: Allows updates up to the next minor version.


    5. Finalize Addition: Confirm your selections. 4D will automatically update the dependencies.json file.


    Advantages:

    • Streamlines the integration process, reducing manual errors.

    • Facilitates easy updates and version control of components.