XAF Application Development tutorial (I) create a project and xaf Application Development

Source: Internet
Author: User

XAF Application Development tutorial (I) create a project and xaf Application Development

 

XAF is a fast development Framework of DevExpress, short for eXpress Application Framework. It is a powerful tool for developing enterprise information systems. net Framework, I have not found a product that can be compared with it. The following describes how to apply XAF as the application center.

 

Download and install, if you have already installed sqlserver and visual studio, please download the trial version to http://www.devexpress.com, after installation is complete to experience.

I am using vs2015 + sqlserver 2014 (with built-in ).

 

I. What are the advantages of XAF?

1. Web project (B/s)

2. win project (c/s)

3. tablet (beta)

4. Mobile Terminal (beta)

The preceding four types of projects are encoded and generated at the same time. Among them, web/win is two projects, and both 3 and 4 are web projects. However, different adaptive interfaces can be used for browsing on mobile devices and tablets.

2. Support for 14 types of databases

It supports all common databases, such as Oracle, MySQL, SqlServer, Access, and DB2. You do not need to modify the encoding when switching databases.

3. Rich built-in modules, involving all aspects of development, such as permission systems, report systems, data analysis, charts, verification modules, and appearance modules.

 

The following describes some of the content in a simple CRM system.

4. Create a project:

After opening VS, choose File> New> project. The following screen is displayed. Expand Visual C #> DevExpress XAF> DevExpress v15.1 XAF Solution Wizard.

Enter a name for your project in the name. I entered XCRMDemo and press OK.

The following figure is displayed:


We are asking whether to create a windows project or a web project. I usually select the project by default. Only windows is selected by default. Click next.

The following figure is displayed, asking which ORM we want to use. If you have used Entity Framework, you should be familiar with CodeFirst and ModelFirst with EF.

I am using XPO, and the last one. Please select the last one to learn XAF. I am familiar with it later, and I will use EF again.


Next, the content related to the permission module appears. Select the second item for the first radio box group. Standard (requests login and password) indicates that a developed program requires a user name and password for login.

Active Directory (users windows account) is bound to a domain identity.

Choose Client-Side Security-UI-LevelMode as the first item for Database Security. The following items will be introduced later.

Of course, if the project is not selected at the beginning, there will be a chance to modify it in the future.


Then you will see the option to select the required module.


This project is only for demonstration, so only a few modules are selected:




Click Finish to create the project.

After the project is created, press F5 to see what XAF has created for us.


In this case, the login box appears. enter admin as the user name without a password. Press log on.


You can see the navigation menu, tool menu, and detailed interface of MyDetail. Of course, you can take a look at it and try it out: D

Okay. Now let's see what the automatic web project looks like:


In Solution Explorer, right-click XCRMDEMO. Web, find "set as startup project", and then press F5. the following page is displayed:


Similarly, the user name is admin and there is no password. Press the logon button. Enter the system.


OK. The project has been created. Let's take a look at the database situation:

1. Where is the database?

1.1web, find the Web. config file in XCRMDemo. web, and you can see the following configuration section:

<connectionStrings>
    <add name="EasyTestConnectionString" connectionString="Integrated Security=SSPI;Pooling=false;Data Source=(localdb)\mssqllocaldb;Initial Catalog=XCRMDemoEasyTest" />
    <add name="ConnectionString" connectionString="Integrated Security=SSPI;Pooling=false;Data Source=(localdb)\mssqllocaldb;Initial Catalog=XCRMDemo" />
    <!--    
    Use the following connection string to connect to a Jet (Microsoft Access) database that is already created and located in the <application root>/app_data folder. 
    <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=|DataDirectory|\XCRMDemo.mdb;Mode=Share Deny None;"/>
    If the database doesn't exist, it won't be created until you replace the |DataDirectory| substitution string with the fully qualified path to the database. For instance:
    <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=C:\myDataFolder\XCRMDemo.mdb;Mode=Share Deny None;"/>
    -->
  </connectionStrings>

ConnectionString is


Integrated Security = SSPI; Pooling = false; Data Source = (localdb) \ mssqllocaldb; Initial Catalog = XCRMDemo



1.2win: Find the App. Config file in XCRMDEMO. Win. The text above will also be found.

Look at the database:




As you can see, the XAF program automatically creates a database for us, so we don't have to worry about what these tables are doing, so we will gradually understand: D


The next section describes simple development.



QQ 4603528 QQ group: 50185791


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.