Extension Library (DLL) Versus Code in a Customization Project
While you are developing source code for a customization task, you can either keep the code in the customization project as DAC and Code items or move the code to an extension library and include the library in the project as a File item.
DAC and Code items are saved in the database, and, if the customization project is published, in the files located in the App_RuntimeCode folder of the website. MYOB Acumatica Customization Platform compiles all the code located in this folder at run time.
We recommend that you keep the source code in the customization project only if the customization is elementary, such as if the code contains an event handler for a control on a form. When you work with a code item, it is easy to view the code of the applied customization directly in the Code Editor without Microsoft Visual Studio. However, if you are solving a complex customization task, it is generally better to develop the solution code in an extension library by using Visual Studio.
You can use Visual Studio to develop a Code item as well as code in an extension library. But the IntelliSense feature in Visual Studio is not available for the source code of a Code item if the code either uses custom fields or invokes members of class extensions defined in other Code and DAC items.
Code in DAC and Code items | Code in an Extension Library | |
---|---|---|
Best for: | Quick start of a customization | Development of a customization project when more than one developer is involved |
Primary storage: | Database | File system |
Location within the website folder: | App_RuntimeCode | Bin |
Intellectual property protection: | No—the source code is open in the deployment package | Yes—the source code is not provided in the deployment package |
Run-time compilation without the application domain being restarted: | Yes | No |
Editor: | Code Editor, Visual Studio | Visual Studio |
IntelliSense feature in Visual Studio: | No | Yes |
Acuminator extension for Visual Studio: | No | Yes |
Debugging: | Yes | Yes |
Integration with a version control system: | Yes | Yes |
Additional: | Can be moved to an extension library when needed |
- How much code will be in the customization project?
- Is there a need for replicability of the customization?
- How many developers will take part in coding?
- Do you need to open the source code in the production environment?
- You intend to have more than five class extensions for business logic controllers.
- The customization will be deployed on more than one system.
- The customization code will be developed by a team that needs to use a version control system.
- You have a reason to protect the intellectual property of the source code of the solution.
- You develop a plug-in for MYOB Acumatica.