Integrate 4D Components Directly from GitHub
Many 4D developers leverage the power of third-party components found on GitHub, particularly those listed in the 4d-component topic. 4D 20 R6 introduces a fantastic new feature: directly integrating these components within the Component Manager.
This blog post dives into the details, making your development process easier and more efficient.
Using Classes Across Components
Component developers frequently require the utilization of a class from another existing component.
With 4D 20 R6, when a component has a declared namespace, its classes are now accessible to all components loaded in the host project via cs.namespace.
Simplifying Component Management in 4D
In the context of 4D development, managing components typically involves a substantial amount of work. However, introducing the Component Manager feature in the 4D environment represents a significant advancement in component management.
No longer confined to placing components in a designated Components folder, this feature relies on two key elements: dependencies.json and environment4d.json. Since 4D 20 R5, these files offer developers better visibility into application dependencies and the flexibility to customize component paths.
Create a standalone application with the Build4D component
A new build4D component has been available on GitHub for a few months. It empowers you to effortlessly create a compiled project or a component. Things are getting even better; this new component version will enable you to generate a single-user application, expanding the possibilities for your development workflow.
So with tool4D available since v20, integrating the application generation process into your CI (Continuous Integration) tools has become remarkably convenient.
Let’s delve into the details!
Build your Compiled Structure or Component with Build4D
With the introduction of the project mode, it’s pretty easy to manipulate the components of your projects.
In the last few feature releases, we have added several functionalities that allow you to create your own build chain adapted to your team, your working methods, and your needs.
For example:
- Launch a compilation by programming,
- Zip/unzip files and folders with these commands,
- Easily Manage your Application’s Information,
- Headless 4D applications to integrate it into a build tool.
To help you create your own build chain or integrate 4D into a continuous integration tool, we have developed a component named Build4D, available on GitHub with the sources.
For this first step, Build4D allows you to create a compiled structure and a component. We will continue to enrich it to enable you to manage a single-user application, client application, or server application.
Visualise your Classes Component in the Method Explorer
From the 4D v19 R5, components can publish their classes. This feature came with tips and code completion support to smooth your code writing.
To make your coding experience even easier, 4D v19 R7 is bringing a new feature: say hello to the support of classes in the method explorer.
Access your component classes from your host project
Components can now publish classes! And even better, if your application is still in binary mode, you can now benefit from classes and object-oriented development by using a component (in project mode) to create your own classes and use them from your (binary mode based) application.
Project Databases: Build your own documentation for components
In a previous blog post, we showed you that documentation for methods has returned in the Explorer. Want to take things even further and use them as documentation for your components? In this blog post, we’ll show you how!
News flash: 4D components available on GitHub!
In 2017, 4D initiated a new program to share the source code of 4D internal components to 4D Partners.
Sharing the source code of 4D components lets you customize them and make them your own! With project databases and the ability to share an application’s source code via a source control system, we’ve converted our 4D internal components into project databases and pushed the source code to the 4D GitHub account. It’s open to everyone, all you need to take advantage of it is an account on Github. Why did we do this? To make your life easier by keeping track of changes and modifications to both code and forms.
Project databases and components
Since the delivery of 4D v18, a series of blog posts on how to convert and develop with project databases have been published. What about components? This blog post answers that question.
Contact us
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy