Registering the custom modules using XML is another alternative to Fluent API. The primary advantage of configuring it using XML is its independency, whenever you want to introduce new modules in the application you need not stop the application and deploy the new changes and start the application.



Sample XML Configuration 


  

<ModuleConfiguration>
<Modules>
<Module Code="ProjectModule" Name="Project Module" Description="This module contains feature and usgae of the project">
<Features>
<Feature Code="ProjectFeature" Name="Project Feature">
<Privileges>
<Privilege Name="Search Project" Description="user can search their Project list">Search_Project</Privilege>
<Privilege Name="View Project" Description="user can View their Project list">View_Project</Privilege>
<Privilege Name="Add Project" Description="user can add their Project.">Add_Project</Privilege>
<Privilege Name="Edit Project" Description="user can Edit their Project.">Edit_Project</Privilege>
<Privilege Name="Delete Project" Description="user can delete their Project.">Delete_Project</Privilege>
</Privileges>
<Entities>
<Entity>Project</Entity>
</Entities>
</Feature>
<Feature Code="ProjectTaskFeature" Name="ProjectTask Feature">
<Privileges>
<Privilege Name="Search ProjectTask" Description="user can search their ProjectTask list">Search_ProjectTask</Privilege>
<Privilege Name="View ProjectTask" Description="user can View their ProjectTask list">View_ProjectTask</Privilege>
<Privilege Name="Add ProjectTask" Description="user can add their ProjectTask.">Add_ProjectTask</Privilege>
<Privilege Name="Edit ProjectTask" Description="user can Edit their ProjectTask.">Edit_ProjectTask</Privilege>
<Privilege Name="Delete ProjectTask" Description="user can delete their ProjectTask.">Delete_ProjectTask</Privilege>
</Privileges>
<Entities>
<Entity>ProjectTask</Entity>
</Entities>
</Feature>
<Feature Code="EmployeeTaskFeature" Name="EmployeeTask Feature">
<Privileges>
<Privilege Name="Search EmployeeTask" Description="user can search their EmployeeTask list">Search_EmployeeTask</Privilege>
<Privilege Name="View EmployeeTask" Description="user can View their EmployeeTask list">View_EmployeeTask</Privilege>
<Privilege Name="Assign Task" Description="user can assign the task to particular employee.">Assign_Task</Privilege>
<Privilege Name="Update TaskStatus" Description="Employee can provide a task status.">Update_TaskStatus</Privilege>
<Privilege Name="Delete EmployeeTask" Description="user can delete their EmployeeTask.">Delete_EmployeeTask</Privilege>
<Privilege Name="Complete Task" Description="Employee can provide a complete task status.">Complete_Task</Privilege>
<Privilege Name="Reject Task" Description="Employee can provide a Reject task status.">Reject_Task</Privilege>
</Privileges>
<Entities>
<Entity>EmployeeTask</Entity>
</Entities>
</Feature>
</Features>
<Usages>
<Usage Code="ProjectUsage">
<Name>Project Usage</Name>
<TypeCode>BLOCKUSAGE</TypeCode>
<TypeName>BLOCKUSAGE</TypeName>
<Threshold>100</Threshold>
</Usage>
</Usages>
</Module>
<Module Code="ProjectDashboard" Name="Project Dashboard" Description="Project Dashboard Module">
<Features>
<Feature Code="ManageProjectDashboard" Name="Manage Project Dashboard">
<Privileges>
<Privilege Name="View Project Dashboard" Description="View Project Dashboard">View_ProjectDashboard</Privilege>
</Privileges>
</Feature>
</Features>
</Module>
</Modules>
</ModuleConfiguration>