Skip to main content
A newer version of this page is available. .

Application Solution Structure

  • 3 minutes to read

A typical XAF solution consists of several projects. This topic describes all the projects a typical XAF solution contains and shows where to add your code when developing an application.

ApplicationSolutionStructure

Projects

  • Module Project

    Use this assembly to implement UI-independent application elements. For example, you can define a business model and implement UI-independent Controllers. Subsequently, the WinForms, ASP.NET Web and Mobile applications have a similar business model and similar controllers. To declare a new class in a module project, add a new code file using the Add New Item dialog. Use a special template (Domain Object, View Controller or Window Controller) to create a business class or Controller.

  • WinForms Module Project

    Use this assembly to implement application elements only for the WinForms application version. For instance, you can implement a Controller that includes WinForms-specific code, or an editor that creates a WinForms control.

  • ASP.NET Module Project

    Use this assembly to implement application elements only for the ASP.NET Web application version. For instance, you can implement a Controller that includes ASP.NET-specific code, or an editor that creates an ASP.NET control.

  • Mobile Module Project

    Use this assembly to implement application elements only for the Mobile application version. For instance, you can implement a Controller that includes Mobile application-specific code, or an editor that creates a control for the Mobile version.

  • WinForms Application Project

    Contains code specific to your application’s WinForms version. Usually, only the Program.cs (Program.vb) and WinApplication.cs (WinApplication.vb) files can be modified. Avoid adding business classes, editors or Controllers to this project - XAF cannot automatically discover those items and add them to your application. The best location for these items is one of the Module projects that define the application’s logic.

  • ASP.NET Application Project

    Contains code specific to a browser-based interface. Usually, only the Global.asax.cs (Global.asax.vb) and WebApplication.cs (WebApplication.vb) files can be modified. Avoid adding business classes, editors or Controllers to this project - XAF cannot automatically discover those items and add them to your application. The best location for these items is one of the Module projects that define the application’s logic.

  • Mobile Application Project

    Contains code specific to your application’s Mobile version. Usually, only the Global.asax.cs (Global.asax.vb) and MobileApplication.cs (MobileApplication.vb) files can be modified. Avoid adding business classes, editors or Controllers to this project - XAF cannot automatically discover those items and add them to your application. The best location for these items is one of the Module projects that define the application’s logic.

Important notes

WinForms, ASP.NET, and Mobile applications can be built based on the same business model, business logic, and Controllers. This takes place if all applications use the same set of modules.

If you do not need the WinForms, ASP.NET or Mobile application version, you can delete the corresponding project from the solution. In this instance, the most straightforward application can contain at least two projects: the application project and the module.

You can also create a platform-specific solution with three projects: an application project (WinForms or ASP.NET), a module project and a UI-specific module project (WinForms or ASP.NET).

Optionally, your XAF solution may include the Application Server Project, Workflow Server Project and any other custom projects you create.

See Also