Applications built with the eXpressApp Framework are comprised of several functional blocks. The diagram below shows the basic blocks, indicates when and how these blocks are created and last, shows you the areas where you can extend your applications. An overview for each application building block is given later in this topic.
When building a business application, you will ultimately have to deal with data. If you are using the eXpressApp Framework, you do not actually have to create a database in a DBMS, customize tables, fields, etc. And you will not need to use low-level ADO.NET constructs to access your data. Instead, you will use one of the supported ORM tools - Entity Framework (EF) or eXpressPersistent Objects (XPO).
ORM tools allow you to describe data for your application using familiar code structures - classes, properties and their attributes. To create a data table, you need to declare a class. Its public properties will define data fields in your table. Of course, you can create as many tables as you need, and specify relations between them using specially designed attributes. Note that you do not have to do much extra work when building these classes. You will only need to derive them from proper classes and supply a couple of attributes - that's all. To help you get started, we provide the Business Class Library described in the following section. This library contains several ready-to-use classes (both for EF and XPO) which you can integrate into your applications. You can also review the source code of these classes for examples on proper data declaration.
Since a data table is described by a class, the actual data is represented by a collection of class instances. So, to modify a field in a particular record, you need to get the desired object from the collection and change its property. That's a much simpler and more natural method of handling data. It hides all implementation details, letting you concentrate on your application's business logic.
Generally, you do not need to think about actual databases, except when you want to change the DBMS used by your application. Microsoft SQL Server is the default option. All you need to do to change a target DBMS is to provide an appropriate connection string. This is described in detail in the Connect an XAF Application to a Database Provider topic.
Classes that define some frequently used entities like Person, Note, Organization, etc. You can use these classes as is, or derive your own classes if you need to extend or change them. You can also review the source code of these classes to learn how to properly implement your data structures.
Interfaces that you may need to implement in your data classes. Some sub-systems of the eXpressApp Framework require data to conform to particular rules. For instance, the security sub-system requires the User class to implement the IUser interface. So, if you have decided to develop your own class to represent application users, you will also have to implement this interface.
The image below shows some classes you will find in the Business Class Library.
User Interface (UI)
WinForms, ASP.NET Web and Mobile Applications
One of the main goals of the eXpressApp Framework is to separate business logic from the application's visual representation. This makes it possible to create a WinForms application, Web site and Mobile application based on the same business logic. When you create a new application solution with the help of the eXpressApp Framework, a solution that includes two startup projects for desktop, web and mobile is generated. To learn more about application solution components, refer to the Application Solution Structure topic.
One of the key features in the eXpressApp Framework is automatic UI generation based on application data. Assume you have declared an ORM class that describes a person. This is all you need to get an application for storing contact information. You can start the application and it will display a person list using a grid control. You can add new entries or modify existing ones. These operations are performed using the automatically generated set of individual editors; each bound to a particular field.
The automatically generated UI elements used to display and manage data are called Views. In XAF, there are three types of Views.
List Views are root modules of your application. Usually, these are grids that display collections that you work with (data tables). You see one of them when you start your project, and you can switch between them using the Navigation System.
This View type deals with a single object (data record) and presents property values using standalone editors. You see these views when adding a new record or when modifying an existing one.
This is a special View type that allows you to display several Views side-by-side on a single screen (supported in WinForms and ASP.NET applications only).
Business applications are not just used to manage data. It is often useful to analyze trends, problem areas, and resource bottlenecks. And, you might need to have your data report not only on-screen, but also on paper. You can do this using the built-in, fully-functional reporting engine - the XtraReports Suite. With its help, you are free to build any reports you need, view them in both WinForms and ASP.NET Web applications, and of course, print them out.
All applications built with the eXpressAppFramework can include the Reports module. An end user can add a new report and customize its contents at runtime using the integrated End-User Designer in WinForms and ASP.NET applications. At design time, you can create predefined reports for end-users. Mobile applications support the report functionality as well, but you can only download a predefined report or report created in a WinForms or ASP.NET application.
The output produced by printing a control or executing a report can be exported in a number of formats, including RTF, HTML and PDF.
In addition to the Reports feature, the eXpressApp Framework supplies extra features that can be used in XAF applications. Refer to the following topics for details.
Controllers are objects that manage your application's flow. They are also responsible for end-user interaction. Even the simplest applications built with the eXpressApp Framework use a number of built-in Controllers supplied with the System Module and Extra Modules. These default Controllers are mostly responsible for data management. With their help, you can add new records, delete existing ones, perform full text search, etc.
For the most part, Controllers serve as containers for Actions. Like ORM classes are abstractions of data tables, Actions are abstractions of end-user interaction elements - buttons, menus, etc. An Action specifies the visual representation of a UI element and its associated code. So, you do not have to deal with low-level implementation details of particular editors, toolbar systems, context menus or anything else. And at the same time, this higher-level of abstraction allows the same Action to be used in WinForms, ASP.NET Web and Mobile applications.
For information on implementing your own Controllers and Actions, please review the following documents:
This tutorial section shows you how to extend your application's user interface with the help of Controllers. You will create Controllers with different Action types and Controllers without a single Action.
This section details the eXpressApp Framework's Controllers-Actions technique for extending applications with new features.
All the information that the eXpressApp Framework uses to build user interfaces comes from the Application Model. For example, this information includes editor classes used for particular data types, or labels associated with particular fields. The Application Model is automatically filled with metadata queried from application components - like business objects or Controllers.
Application Model definition files are stored in XML format, and can therefore be easily edited manually. But the eXpressApp Framework provides even an easier way - the Model Editor, which is integrated with Microsoft Visual Studio. You can use it for both design time and runtime customization. To run it at design time, double-click a .xafml file from any module or application project located in the Solution Explorer.
For more information about the Application Model, please refer to the following topics: