- Developer Resources
- Generating the Module Template
Generating the Module Template
We have developed a simple template-based solution for creating modules in the platform. To begin, install an Eleflex.WebServer and follow the instructions to complete setup. Next, add the “Eleflex.ModuleGenerator” NuGet package. Including this package will configure a web application route to “Admin/ModuleGenerator.” Rebuild and run your solution, and navigate to “Admin/ModuleGenerator”.
The module generator requires 3 pieces of information to create a new module.
- Module name
- This is the general name of your module. If you were building a module to store names and addresses of people, it might be called “Contacts.” If you were building a module to store employee clock ins and outs, it might be called “TimeClock.”
- This is usually the company name or product name. The resultant base namespace of the solution will be [Namespace Prefix].[Module Name]
Entity Framework Data Model Name
- This is the entity framework data model name. By default, the name is “[Module Name]DB”. Click the checkbox to override the name you plan on using.
After entering the required information, click the “Generate” button to download a zip file of the generated solution. The zip file will contain the following files.
- Visual Studio 2015 solution file
- Business Project - core business logic and interfaces
- Messages Project – service models and interfaces
- Server Project – service commands and data access classes
- Web.Admin Project – embeddable web application for “Admin” related views
- WebClient Project – classes for Eleflex.WebClient installations
- WebServer Project – classes for Eleflex.WebServer installations
Extract the files to a folder and open the solution. Perform a rebuild on the solution so that it can download missing NuGet packages and confirm that the build is successful.