The goal of this tutorial is to build rich data-centric Windows desktop and Web browser applications for use within a company department (Intranet), so that its employees can plan activities and manage other required data.
The following user stories cover a common functionality that will be available to end-users.
Before you start following this tutorial, please check out the requirements below.
Experience building desktop and Web applications using DevExpress Windows Forms and ASP.NET Web Forms controls, as well as any other third-party components is helpful, but not required for this tutorial.
A typical client application consists of three logical layers, as shown below.
This standard three-tier architecture is well-proven, and can be a base for more complex application architectures. For purposes of simplicity in this tutorial, this architecture should meet your needs without any changes.
With XAF, you can use any popular relational database management system (RDBMS) such as Microsoft SQL Server as a data store. In advanced scenarios, it is also possible to obtain data from a data service instead of using direct database connections.
Data Access Layer
With XAF, you can choose from two ORM libraries as the data access layer (DAL): Entity Framework (EF) from Microsoft or eXpress Persistent Objects (XPO) from DevExpress. Although the first ORM library may already be familiar to you, the DevExpress ORM library was actually developed prior to EF, and is powerful and easy-to-use, based on feedback from many of our customers. It also supports more than a dozen popular database engines, which makes it a very good alternative to EF. Technically, the DAL consists of application-specific and system persistent classes that are mapped to the database tables, and thus represent the data model plus ORM code that manages all persistence tasks. While no direct communication is allowed between the DAL and UI layers, the data model can eventually be a base for UI data screens.
Business Logic Layer
The business layer (BL) consists of user-defined code and system code that form the desired behavior of your application (i.e., a business logic that updates the UI or provides user interaction). Typically, this business logic is placed within persistent classes from the DAL or within so-called Controllers. (The term “Controller” has the same meaning as in the popular Model View Controller (MVC) pattern for UIs.) For instance, in an XAF application, all create-read-update-delete (CRUD) logic is powered by system Controllers: a user interacts with UI elements triggering various business rules, and thus causing data and UI updates.
Depending on the target platform, an XAF application uses DevExpress Windows Forms or ASP.NET Web Forms components for the UI layer. Of course, it is possible to use any other standard or third-party controls to build your application UI elements.
Next topic: Create an XAF Application