All Projects → DolibarrLabs → damb

DolibarrLabs / damb

Licence: GPL-3.0 license
An advanced module builder for Dolibarr ERP/CRM

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to damb

Neural-Plot-Development
A Library for visualizing Neural Networks of the TensorFlow/Keras models.
Stars: ✭ 16 (+14.29%)
Mutual labels:  module
xhttp
Tiny shortcuts for using the native fetch API. Provides a fluent builder-style API for request building and response reading.
Stars: ✭ 31 (+121.43%)
Mutual labels:  builder
go-checksum
Simple tool to calc Golang module checksum of go.mod and module dir.
Stars: ✭ 45 (+221.43%)
Mutual labels:  module
duckpy
A simple Python library for searching on DuckDuckGo.
Stars: ✭ 20 (+42.86%)
Mutual labels:  module
Tomcat-Webmin-Module
Apache Tomcat Plugin for Webmin
Stars: ✭ 19 (+35.71%)
Mutual labels:  module
elastic-composer
Client-side Elasticsearch query generator and executor. Filter fields, find search suggestions, and paginate query results for your indicies using a simple, reactive, and high-level API
Stars: ✭ 14 (+0%)
Mutual labels:  builder
sphinx-jekyll-builder
sphinx builder that outputs jekyll compatible markdown files with frontmatter
Stars: ✭ 18 (+28.57%)
Mutual labels:  builder
cisco ios
Cisco IOS Catalyst module
Stars: ✭ 14 (+0%)
Mutual labels:  module
fastlane-plugin-create xcframework
Fastlane plugin that creates xcframework for given list of destinations 🚀
Stars: ✭ 58 (+314.29%)
Mutual labels:  module
i3blocks-crypto
💵 View your favorite coins' ticker prices with i3blocks.
Stars: ✭ 30 (+114.29%)
Mutual labels:  module
Nginx-builder
A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Stars: ✭ 143 (+921.43%)
Mutual labels:  builder
as-string-sink
An efficient dynamically sized string buffer (aka String Builder) for AssemblyScript
Stars: ✭ 23 (+64.29%)
Mutual labels:  builder
atom-perl6-editor-tools
A collection of useful Perl 6 editor tools
Stars: ✭ 19 (+35.71%)
Mutual labels:  builder
twbs-helper-module
Laminas (formerly Zend Framework) module for easy integration of Twitter Bootstrap
Stars: ✭ 18 (+28.57%)
Mutual labels:  module
glitchify
Tweaks for the official twitch.tv android app
Stars: ✭ 33 (+135.71%)
Mutual labels:  module
makestudio
Setup your Delphi Environment very easily - build your projects with more comfort
Stars: ✭ 43 (+207.14%)
Mutual labels:  builder
terraform-lambda-fixed-ip
Provide a fixed IP (ElasticIP) to your AWS Lambdas
Stars: ✭ 20 (+42.86%)
Mutual labels:  module
sphinx-markdown-builder
sphinx builder that outputs markdown files.
Stars: ✭ 135 (+864.29%)
Mutual labels:  builder
terraform-remote-state
A Terraform module that configures an s3 bucket for use with Terraform's remote state feature
Stars: ✭ 21 (+50%)
Mutual labels:  module
MCM2017
MCM 2017
Stars: ✭ 17 (+21.43%)
Mutual labels:  module

DAMB

DAMB stands for Dolibarr Advanced Module Builder, unlike dolibase, DAMB don't need any dependencies & integrates with dolibarr as a regular module.

Screenshot

Features

  • Simple & easy to use.
  • Integrates with native modules.
  • Supports old versions of Dolibarr (starting from 3.8.x).
  • Outputs clean & structured code (less boilerplate).
  • Brings advanced building options.

Pros

  • Simplicity over complexity

DAMB comes with multiple libraries containing simple separated functions to allow an easy integration with the other modules, example:

To include the module library, copy the module.lib.php file to your module lib folder, then in your module class simply include the library as below:

dol_include_once('mymodule/lib/module.lib.php');

Now, you can call any function that you want to use from this library.

Note: When using DAMB to create a new module, it will automatically include all the files/libraries required by your module. However, some libraries like the debug library still need to be included manually.

  • Flexibility

In libraries, every function is surrounded by an if condition which verifies its existence before implementing it, so if you are not satisfied with a function behavior, just override it! Example:

To override print_header function of the page library, create a page_overrides.lib.php file then include it before the page library inclusion like this:

dol_include_once('mymodule/lib/page_overrides.lib.php'); // just before the main lib inclusion
dol_include_once('mymodule/lib/page.lib.php');

All you have to do now is to write your new function(s) inside page_overrides.lib.php.

Exception: This may not work as expected for module & widget libraries, because dolibarr's default behavior on modules & widgets list pages is to include all the module classes at once, so your override(s) may be overrided by functions having the same name but from other modules.

Solution: Just change the overrided function(s) name, example: name your function my_module_function instead of my_function.

  • Easy debugging

There is a debug library compatible with the debugbar module that you can use to easily debug your modules, example:

To print a debug message use:

dol_include_once('mymodule/lib/debug.lib.php');

debug('my message');

To measure execution time:

dol_include_once('mymodule/lib/debug.lib.php');

start_time_measure('my_measure', 'Execution time of my code');

// Write some code...

stop_time_measure('my_measure');

Known Cons

  • Lib files are not centralised

Instead of that they are duplicated/cloned on each new module you create. This can be considered as a good point too, since you don't need any additional module, framework or dependency to handle libraries separately. Also, you still have the choice to update them manually whenever you want.

Installation

Download the latest release from Dolistore.

Documentation

Find the documentation here. You can improve it by sending pull requests to this repository.

Contributing

Read contributing guidelines.

License

DAMB is licensed under the GPL license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].