This document discusses the implementation of modules in BExIS, including:
- What modules are and their anatomy (user facing functions, UI project, services, manifest)
- The module development process (ASP.NET MVC, integration, publishing)
- Creating a module from a template (copying template files and folders, renaming namespaces and files)
- The module manifest file and its use of dependencies, exports, identifiers
- Publishing and registering a completed module
3. Modules
• What is a module?
A module is a set of related user facing
functions, operating from inside the BExIS shell
3BEXIS Tech Talk #8: Implementation Notes
4. Module Development
Consideration
• ASP.NET MVC 5
• Plug-ability
– Independent development, testing, publishing
– Online deployment
• Shell Integration
– Menu integration
– State Management
4BEXIS Tech Talk #8: Implementation Notes
7. Module Development Recipe
• 1: Defines the required names
– <moduleID>: usually a three letter abbreviation of your
module name
– <Affiliation>: the institute that owns the module
– <projectName>: <Affiliation>.Modules.<moduleID>
– <projectCode>: <projectName>.UI
7BEXIS Tech Talk #8: Implementation Notes
8. Create the UI project
• From scratch:
– Read the “Module Development Recipes” doc
• From a template
– Follow up
8BEXIS Tech Talk #8: Implementation Notes
9. Create a Module from a Template
• Copy “Module.Template” folder to the Areas folder
– The template is in the “Repo/Code/Templates”
folder
– Replace the name with actual <moduleID>
– Remove the tailing “Template” token
9BEXIS Tech Talk #8: Implementation Notes
10. Create a Module from a Template
• Inside the folder, rename:
– *.csproj to <projectCode>.csproj
– *.csproj.user to <projectCode>.csproj.user
10BEXIS Tech Talk #8: Implementation Notes
11. Create a Module from a Template
• In the VS Solution explorer, at solution’s root
• Create the “Modules” folder in does not exists
• Create a <moduleID> folder under the “Modules” folder.
11BEXIS Tech Talk #8: Implementation Notes
12. Create a Module from a Template
• Add Existing Project
• <projectCode> from the Areas/<moduleId>
• To solution/Modules/<moduleID>
• Via “Add Existing Project”.
12BEXIS Tech Talk #8: Implementation Notes
13. Create a Module from a Template
• From inside VS, rename the followings:
– ModuleIDModule.cs to <moduleID>Module.cs
– ModuleID.Manifest.xml to
<moduleID>.Manifest.xml
13BEXIS Tech Talk #8: Implementation Notes
14. Create a Module from a Template
• Edit the <moduleID>Module.cs
– Update the namespace to <projectCode>
– Update the class name to <moduleID>Module
– Pass <moduleID> to the base constructor
14BEXIS Tech Talk #8: Implementation Notes
15. Create a Module from a Template
• Edit /Views/web.config
–Edit <add namespace="Template.UI" /> to <add
namespace="<projectCode>" />
15BEXIS Tech Talk #8: Implementation Notes
16. Create a Module from a Template
• Edit the module manifest
• Change the moduleId from “Template” to <moduleID>
• Update other attributes and elements
16BEXIS Tech Talk #8: Implementation Notes
17. Create a Module from a Template
• Develop designated features
– Controllers/ Actions
– Views
17BEXIS Tech Talk #8: Implementation Notes
18. Create a Module from a Template
• Shell publishing does not include the module
18BEXIS Tech Talk #8: Implementation Notes
19. Create a Module from a Template
• Publish the module
19BEXIS Tech Talk #8: Implementation Notes
21. The Manifest File: Dependencies
21BEXIS Tech Talk #8: Implementation Notes
• Must be installed and active
• Required version is checked against available
one
22. The Manifest File: Exports
• Publicly accessible module features
• Plugged into the menu structure
• Document order is preserved
– Also catalog order
22BEXIS Tech Talk #8: Implementation Notes
23. The Manifest File: Exports
• Id: export port id for path/hierarchy building
• Title: as menu label
• Description: as tooltip
• Controller: the controller name
• Action: the action name
• Argument: If the action has a parameter
• Extends: The injection point in the menu
structure
23BEXIS Tech Talk #8: Implementation Notes
24. Module Publishing
• Shell is already published
• Areas folder does not include the module
• Publish the module into a folder
• Create a zip bundle
24BEXIS Tech Talk #8: Implementation Notes
25. Module Registration
• Method 1:
– Update Modules.Catalog.xml
– Create the <moduleID>folder under Shell/Areas
– Unzip the module zip file into the folder
• Method 2:
– Use the SAM’s registration feature
25BEXIS Tech Talk #8: Implementation Notes