New Learning Materials on Data Modeling Approaches - UI First, Data Model First, Database First and Code First

XAF Team Blog
01 August 2012

DevExpress provides a series of videos and help topics that describe the newly available UI First and Data Model First approaches to XAF development, as well as the existing Database First and Code First workflows. The videos and corresponding tutorials are organized according to data modeling method.

UI First

 

ui-first

The UI First approach begins with UI prototyping in the Business Object Designer, which ships with XAF starting with v12.1. In this designer, you will specify the properties that are exposed by your business objects, adjust the Detail View layouts, specify List View settings and define associations between objects. This will create ready-to-use Desktop and Web applications without writing a single line of code.

Watch Video | Read Tutorial

Data Model First (XPO)

 

model-first

The Data Model First approach begins by defining a data model in the Data Model Designer, which ships with XPO starting with v12.1. In this designer, you can add new objects, specify object relationships, and define persistent and calculated properties. The designer visualizes the entire data model in a single window.

Watch Video | Read Tutorial

Data Model First (Entity Framework)

 

ef

If you have used the Entity Framework in your previous projects, you may wish to reuse your data model definitions in XAF. If you are new to XAF, you may choose to skip the tutorials on XPO (the default ORM tool), and use your Entity Framework experience instead. Starting with 12.1, we provide experimental (community technology preview) support for Entity Framework as an ORM layer.

Watch Video | Read Tutorial

Database First

 

db-first

Programmers are often required to maintain a legacy database rather than build an application from scratch. The XPO Data Model Designer can automatically generate a data model for a specified database. Many popular database engines are supported, including MS SQL Server, PostgreSQL, MySQL and Oracle (see more). The created data model is visualized by the designer and can be customized.

Watch Video | Read Tutorial

Code First

 

code-first

The Code First approach begins by implementing business classes that define your data model (it is a good idea to use CodeRush Templates, which speed-up coding significantly). This standard approach has been used in XAF from early on. Although this information is included in our documentation and demos, we decided to introduce a new simple tutorial, targeted for those who wish to quickly get acquainted with XAF.

Read Tutorial

Let me know what you think of our videos and tutorials.

James S K Makumbi
James S K Makumbi

At heart, am a code first guy especially with the use of CodeRush. I love the UI First and Data Model First methods too but it still requires dropping into code to do the really significant stuff.

Take inheritance for example. I would like to inherit from another Data Model as I go along. I have not yet tried this in the Data Model First method but in the UI First technique if I implement inheritance the changes are reflected in the UI designer on refresh.

I would LOVE to have this in the Data Model wizard but I can still work without it.

These improvements to the DevExpress tools really help transform us from mere code typists into Application Architects.

1 August, 2012
Taradanov
Taradanov

Why there is no PersistentAlias field in UI First mode? If im to create it in code behind then i cant specify anything in Designer for this property. Its not nice.

And why i cant select any base class in the Data Model First? Just a couple of base classes? No custom defined classes? No BaseObject? Oh come on! I cant use classes, that was defined in module that was used in my application? Then how im suppose to create my Data Model?

Its really usefull features, but each have some critical flaw that make them almost useless. Ill have to stick to Code First for now. I really hope all these features will be implemented later.

5 August, 2012
James Zhong
James Zhong

I think UI First mode is useful for prototype and those who are new to the framework.

6 August, 2012
Konstantin B (DevExpress)
Konstantin B (DevExpress)

> Why there is no PersistentAlias field in UI First mode?

Alexey, we have the following suggestion in this regard:

www.devexpress.com/.../ViewIssue.aspx

> And why i cant select any base class in the Data Model First? Just a couple of base classes? No custom defined classes?

Custom base classes are already supported - see www.devexpress.com/.../ViewIssue.aspx

7 August, 2012
Taradanov
Taradanov

Im glad that all this issues is addressed already. Its not exactly convient to point to DLL in the Data Model designer - it will be much more usefull if classes can be imported from the project and used modules automatically (with auto updates in case something changes). UI designer is in the CTP, as i can see. Too bad - it is quite usefull and handy - all Views and object properties in one package. The only thing i miss in UI designer, besides PersistentAliases, is DataModel viewer, so i can see data model structure with relations between objects.

Anyway - thank you for your efforts. I will eagerly wait for UI designer in RTM and hope for more friendly DataModel importing process.

7 August, 2012
Tito Alomia Vergara
Tito Alomia Vergara

I created a project with XAF and XPO with Database First I generated my BO from my MySQL database. Selected two tables but these I are associated through a field, and the designer XPO does not take that association, one of the tables has many fields but when I run the windows application in the initial datagrid does not show me the data in columns, how can I customize the views generated automatically?

30 April, 2014

Please login or register to post comments.