Build Simple Applications Based on agileeas. NET application development platform

Source: Internet
Author: User
ArticleDirectory
    • I. Summary
    • Ii. Outline of this Article
    • Iii. agileeas. NET Application Development Platform Review
    • 4. Preparations
    • 5. The first simple program
    • 6. program mode configuration
    • VII. Summary
    • 8. Download source code
I. Summary

First of all, I would like to thank all of you for your support. I will try my best to write this series. This series is mainly based on my use of agileeas. summary of the experience in the. NET application development platform. I would like to know more about some shortcomings.

The criticism points out that I should first select a simple application to see how to use agileeas. from the developer's point of view, the net application development platform can quickly develop the desired applications.

What kind of development results can be brought by development and what kind of solutions can be provided for us? Maybe this is what we are most concerned about.

In my spare time, some of my previous articles may not be clear and organized. For more information, refer to the organizational structure of some Daniel in the blog Park, not only can you clearly understand your ideas when writing articles,

This is the best result for my friends who have seen this article to understand the purpose of my explanation.

Ii. Outline of this Article

· 1. Summary

· 2. Outline of this Article

· 3. agileeas. NET Application Development Platform Review

4. Preparations

· 5. First simpleProgram

· 6. Classic program + database mode

· 7. Summary

· 8. Download source code

Iii. agileeas. NET Application Development Platform Review

The agileeas. NET application development platform automatically provides the ORM technology,CodeGenerator tools, basic permission management functions [intermediate description], Basic System Configuration Management [intermediate description], system cache functions, fast

Tools such as business development, Unified Version release, rapid program deployment, and smart clients.

Agileeas. as an application platform, the net application development platform has encapsulated the underlying code functions. The platform adopts the agile development idea of plug-in, and continuously iterates to integrate the newly developed modules into the platform.

To complete the module configuration through permission management of the module.

Agileeas. the core concept of the net platform covers two aspects. The first is based on a software engineering practice. Plug-In module independent parallel development and assembly integration, and the second is exploitation. NET Technology

(Reflection call) implements this idea. It can be seen that agileeas. NET should contain the following four parts: 1. Support for Software Process Engineering; 2. Plug-in standards and platforms (running containers); 3. Plug-in organization and

Management. 4. technologies and tools supporting rapid development of plug-ins.

4. Preparations

Agileeas. after the complete package is downloaded from the. NET installation package, the package basically contains agileeas. NET platform, as long as the corresponding DLL is referenced in the program, this component can be used to provide

.

The main assembly names and functions are as follows:

EAS. Data. dll mainly provides data access services and integrates the functions of the ORM service for secondary development.

EAS. kernel. dll This component provides services related to the underlying platform, such as serialization, encryption, security, and collection.

EAS. Logger. dll This component provides powerful and rich log management services.

EAS. session. dll This component provides context session resource management services for client-to-server interaction.

EAS. ioccontainer. dll This component provides the container service during system running, including the server of the platform.

Provides system services running in containers, including plug-in service management, lifecycle, and permissions.

.

More... Click to download the corresponding component instructions(Use document. chm download)

 

At present, the simple program we build will be mainly based on EAS. Data. dll, EAS. kernel. dll,

EAS. session. dll, EAS. ioccontainer. DLL to complete basic program functions.

5. The first simple program

The examples we have explained here are all 2010 solutions, but we can see that all the code is. net.

Framework2.0, so you can rest assured that there will be no version issues, I am here because

Only 2010 currently.

1. Create a project and introduce these DLL files. The four core DLL files starting with EAS.

In the previous article, we will use the code generator to generate the code of the model and data access layer.

The Business Code is not generated.

If you do not know how to use the ORM Model Designer, see Chapter 1: use of the orm design tool.

If the code generated by using the code generator is different from the self-written ORM code, the code

The file generated by the builder has different organizational structures.

For example:

This is the code generated by the code generator. There is a folder named generat, which contains the file and the specific class name.

The relationship is distinguished by the partial keyword. That is to say, every class in the generat folder corresponds

The class files under the directory correspond one by one. Let's take an example to see how different the class files are.

Take iproduct as an example.

Iproduct. generator. Cs in the generat folder

The content of the Code in iproduct. generator. CS: generally contains the specific entity information code.

Public partial interface iproduct: EAs. Data. Orm. ientity

{

/// <Summary>
/// Record number.
/// </Summary>
Int IDN
{
Get;
Set;
}

/// <Summary>
/// Product code.
/// </Summary>
String code
{
Get;
Set;
}

/// <Summary>
/// Product name.
/// </Summary>
String name
{
Get;
Set;
}

/// <Summary>
/// Product specifications.
/// </Summary>
String spec
{
Get;
Set;
}

/// <Summary>
/// Large package.
/// </Summary>
String bigunit
{
Get;
Set;
}

/// <Summary>
/// Small package.
/// </Summary>
String smallunit
{
Get;
Set;
}

/// <Summary>
/// Packaging specifications.
/// </Summary>
Int packrulr
{
Get;
Set;
}

/// <Summary>
/// Description.
/// </Summary>
String description
{
Get;
Set;
}
}

Code in iproduct. CS

/// <Summary>
/// Object interface iproduct (product ).
/// </Summary>
Public partial interface iproduct
{
}

It can be seen that this is a design skill of the agileeas. NET application development platform.

When the corresponding business code is added, the content modified by iproduct. generator. CS and iproduct. CS are separated,

Although only the separation of physical files

This is my own code engineering file:

Public interface iproduct: EAs. Data. Orm. ientity
{
}

Of course, there are not so many files, but all things must be written by yourself. The specific writing method is similar to the writing method in the code generator. The code at the data access layer is similar,However, there is a place to pay attention.

When defining an object, all business entity classes must define an object table corresponding to the object. By default, query statistics and other functions are implemented based on this entity table.

How can I define a query method in an object table? I want everyone to understand that the query method must be defined in the interface and then implemented at the implementation layer.

To call the corresponding query method to implement related business functions.

This step mainly completes the basic object information and related business operation methods between the interface layer and the business layer.

2. How to implement your own query business.

The above briefly introduces how to define your own query method. Next I will demonstrate how to do it step by step.

For example, if I create a new query method getlist () on the iproductlist object table corresponding to the iproduct object, there is no parameter and no return value. The default value is void.. In this case

The system provides a default list of objects. The list is in the form of a datatable. You can use the foreach loop to cycle the objects in the table. Each object corresponds to a datarow.

Let's look at the general situation, that is, the definition of a query method with query conditions.

/// <Summary>
/// No return value
/// </Summary>
Void getlist (string name, int classid); // product name, product category for retrieval, no return value. The list set is provided by default.

Condition is a common where condition class provided by the agileeas. NET application development platform for developers. It provides a wide range of methods. In details, you will gradually find

Secret. Condition. addelement ("database column name", "parameter name", EAS. Data. Orm. elementtype. equal to); each method has a corresponding description.

The final code format is as follows:

Here we only demonstrate how to write a query method based on an object table.

3. Write the UI Layer and call existing business code to complete simple business functions.

Write the Business Code directly with the code:

The above are detailed code annotations, which can be understood by everyone.

Other Business Code forms are the same as the Business Code that you usually write.

4. add, edit, and delete operations in addition to queries ].

Take product editing as an example:

Here we have done the most common cross-form value transfer.

The following are operations on objects:

For detailed code, download the source code. The source code is finally downloaded.

6. program mode configuration

The life cycle in is incorrectly interpreted. singleon represents the meaning of a singleon.

VII. Summary

There are not many concepts mentioned in this article, but as a basic article, I hope everyone will pay attention to it. Without it, we will not discuss the relevant tutorials later. Through this article, we must

Have a perceptual and rational understanding. The most important thing is to recognize his usage methods and the corresponding help that this platform brings to me. Of course, today's example is only the simplest example of platform development and application, but we

It is necessary to develop the habit of thinking, such as the Development Mode in other development platforms and the Development Mode in the project process, what did the development platform bring to us in the process of program development?

If you believe that you have better comments and suggestions on the current development platform, you may not be clear about it in many places, if there are any mistakes, I hope you can criticize them.

Correction!

If you are interested in this platform, you can have a simple understanding. Please stay tuned for your deep understanding.

8. Download source code

Here is only a simple example of project use. The specific business code is not written. If you want to learn more about it, please stay tuned to this series, this series will give more and more in-depth explanations

.

Source code download

 

More platform documentation


More links

Agileeas. NET platform development guide-series Directories

Introduction to agileeas. NET application development platform-Index

Official website of agileeas. net

Agile Software Engineering Lab

 

Official chat QQ Group on agileeas. Net: 116773358


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.