It's time to change your way of development. Introduction of-XAF Information System Rapid Framework

Source: Internet
Author: User

I'm one of the people. NET developer, from the DOS ERA Turbo C (1996), immediately 20 years. Think of the code is really a lot of, but do a lot of repetitive coding work. Of course, the middle also took the team to do a few major projects, but the code is still not enough, or every day in the code, really like the eyes of this individual person this boring thing.

Perhaps my vision is not open enough, since 2002 from the ASP began to join the m$ camp, and later turned to. NET development has not changed, and has been doing business information system development, do this line, we all know is the work of heavy revision repeatedly.

Whether it's a change in demand or the boss has a new idea, we have to work overtime, for reasons that don't need so much, and only one can keep you busy.

Yes, always in this time of the project progress, forcing me to think exactly how to be faster and better to complete the task. I want a demand to come. Jane can do it simply. And then talk to your boss about your paycheck and let him have no reason to say you need to improve. Of course, this is also quite ridiculous, this is something.

Let's talk about the efficiency of information system development, in my impression, the traditional way of development is this:

First

Analysis requirements--Create a database--drawing interface--Call ado.net-> call SQL statement (or both write point stored procedure)

The painting interface, whether WebForm or MVC, is not able to run.

After doing n size items, every step makes me nauseous, take customer information maintenance as an example:

Build table: Customer (name, birthday, address, phone, contact person)

Drawing interface: The above fields are dragged through one after the other.

Write sql: Delete or change, or around the database table to do it again.

And, of course, what to do with injection attacks. If you happen to use a database class library, you might want to save a snack.

Later

Most of an information system is such operations, endless crud, and finally, the beginning of popular code generation, I also stand on the cusp, encounter raptier.

CodeProject also has the article that introduces it, rare. Development efficiency really improved, at that time the company to do the site backstage, I set up in the Raptier, a simple background generated.

That year I just came to Shanghai, three months in a row, every month and the boss to raise a salary, every time agreed. Then I thought it was going to be too low starting salary ^_^

After a period of time codesmith should be popular, of course, code generation problems, such as after the build to modify, you can directly change the code, and then to change the structure of the library, but also to regenerate. As a result, the previously modified code is overwritten. C # did not have a partial keyword at that time. So whatever it is, it's pretty uncomfortable.

and later

Because the code generation has a variety of problems, I decided to develop their own framework, it is also very ridiculous to think of things, is to do the general framework of information systems, can be said that there is no demand, it can be said that the demand is infinite. It's a big taboo. Do feel this life may also do not finish, from the database access to the interface, and then to the function module, what workflow state machine, document number, data import, Report printing, simply hopeless.

To do the control when I want to go to find out, it does not matter, directly led to the development of the framework failure, because I found the framework I imagined, so I abandoned the development of ^_^

I found xaf!. It was about 2009, when the version was 8. X version.

I began to learn the XAF, learning very smoothly, I feel this is developed for me, but also often to the screen giggle, said: How and I think the same?

Of course, I am not so smart, but from the heart of the happy to add narcissism!

The Orm came, but I did not catch the wave, and jumped straight, because the XPO ORM was used in XAF so it was touched The Entity framework is simply appalling. It's really not good to use EF friends to shoot me, but LINQ is really nice to help EF. Add a sentence now that EF is not feeling well, XPO has stopped developing. Why isn't EF so good? It would be nice if he supported the interface type as an entity mapping, and supporting different databases was also a hassle.

Right now

Now I have been using XAF, see a lot of yards farmers still struggling, I have to share the use of experience, so that more yards of farmers free, part of the liberation is good! Make time to come out, accompany the family, accompany the child, or because of the development efficiency, software quality improvement, take a little more bonuses, a happy Christmas!

Of course, if you think I am a salesman of XAF and look at commercial software with colored eyes, then please help yourself, Visual Studio is also commercial, so it is so excellent! But then it's time for Dev to give me a hard-earned death.

Advantages of XAF

一、一次 encoding, simultaneous use of multiple platforms

With one code write, you can produce four items at the same time:

1,web Project (b/s)

2,win Project (c/s)

3, Tablet PC (Beta)

4, Mobile (Beta)

Web/win is two projects, 3,4 are Web projects, just use a different interface can be used on mobile devices and tablets for browsing operations.

In Sliverlight just appeared for a while, Xaf tried to support the Silverlight version, but because of the rise of HTML5, Microsoft should have put Sliverlight in the corner, so also led to the dev company does not support Sliverlight. But they have some sliverlight controls.

WPF is also a verdict state, at least I see few applications. VS, That's Ms's own thing: D

Sliverlight If there is no HTML5, is a good thing, too pity, the rise of HTML5, will we pull back to the damned JavaScript development.

Second, database support

This should be the advantage of XPO, support 14 kinds of database, sqlserver,oracle,mysql,db2 ... Common libraries are supported. When switching databases, there is no need to modify the source code, of course, if you start using Oracle and manually invoke the SQL statement, in SQL Server must not be executed correctly.

Support for the entity Framework, although I do not use this, but Dev is still supported, perhaps because the m$ is too strong reasons for it.

Third, internationalization localization support

XAF supports multi-language versions, and when application development is complete, you can generate localized translation files in various languages in the application model, which is a big support.

Iv. automatic mechanism

• Start with domain objects • Automatically set up a database • Automatically create an interface? List interface? Search interface • Built-in additions and deletions without SQL programming v. Application of AOPAOP is an aspect-oriented application, the XAF is applied to the extreme, such as the system built-in Save button, no matter how many business objects you have, as long as this one save button, their behavior is consistent, are saved to the database table, if you need to modify the text of the Save button, as long as in a place to modify, The whole system has changed. Modular Application: If we develop an Excel data import function, we can also apply it to all business objects, do an import function, and use it all at once. Xaf has a very rich meta-data that we can make available. Control reuse: There are many places in the system where a control is needed, such as time selection, and when Xaf does not have these controls by default, we can develop them and can be set as default controls, such as applying to a timespan type, in one step, and the entire system will apply this control. In the XAF there are many such automatic mechanism, can be resolved at once, resolutely do not have to do two times, refused to repeat, refused to copy. vi. meta-data managementMetadata refers to the information of the code itself in our program, such as the name of the class, what class it inherits from, what interfaces it implements, what attribute it has, and what properties are there? Yes, in. NET, this information can be obtained with reflection. In the development of information systems, this metadata will be expanded, such as what this class will display on the interface, what is required to fill in the data, what filtering conditions are, and so on. You would say, isn't that the code we wrote ourselves? This information also needs to be maintained in XAF, and we are helping customers manage their information when they write programs to them. They are improving the level of information. But our own code, the system itself is also a huge amount of information need to manage the content. If we do not consider the contents of the planning process, then it is normal for us to make a mess behind it. Looking at object-oriented software design, isn't it the use of various concepts to plan these content? So there is a noun called meta-programming, is also fascinating things. So what's the use of Meta data management? It is also used in conjunction with the AOP concept to be effective. For example: I want all types that have the "name" attribute to be displayed in red on the interface, and we can use it programmatically
foreach (var in classes) {       if(X.members.contains (' name ' )  ) {  var member = x.members[" name "= color.red; }}

This is only a pseudo-code, if you use the traditional way of development, each interface to do this once, there may be a lot of errors, the biggest question is, we need to deal with everyday problems so stupid? Why don't we have a simple way to save time and not do that kind of boring change? In addition, the meta-data can be extended, built-in is not provided, we can implement it ourselves. Seven, domaincomponents technologyUsually referred to by the XAF developers as DC Technology, DC technology is the use of interfaces to define business logic objects, in EF, we usually use class to define a business object, the use of interfaces to define business logic is faster and simpler, I think the biggest benefit is the implementation of multiple inheritance, such as:
 Public Interface Customer {...}  Public Interface Company {}  Public Interface  publicinterface  Company customer: Company, customer {}publicinterface  Individual customer: Individual, customer {}

This is how simple, if you use class, only support single inheritance, the content of the other interface, can only manually re-knock out the code, that is how boring things. It is a little pity that DC technology does not support the generic mechanism, which is perfect if it can be supported later. In a invoicing system, the document is very much, but nothing is out of the library class, warehousing class, not out of the class, the three kinds, and then there are a variety of combinations can be thought out, the combination of n multiple documents, if we use the DC technology, the sky is instantly clear. Eight, built-in function moduleFirst, the rights module: 1. Support the business object level permissions, and delete and change the view permissions. 2. Field-level permissions are supported and a field is readable and writable. 3. Support row-level permissions, the records of certain conditions in a business object have permission to delete, change, view 4. Support for the above 4 hybrid rights 5. Support roles, and support role nesting, that is, role 3= role, and the audit module for each environment that implements changes to business objects, creation time, modification time, Delete the time, modify the content, and change the value of each attribute from what the value to, who manipulated. The resulting record is quite large, but can be optionally logged, or customized. Third, business Class Library Customization Module service object support

This is the base module, which implements a non-SQL CRUD operation for business objects. Four, the chart module can achieve a variety of chart display, histogram, pie chart and so on, if you have used the dev control, you have seen it. The Clone objct module realizes the replication of the business object, which is a small module. Six, Conditional appearance module overview conditional appearance module, a very common module, to achieve global control whether control is available, visible, color, font and so on. Vii.. fileattachment module, file attachment module is used to manage attachment files, can be uploaded to the database, can also be personalized file system. HTML Property Editor can use the HTML editor in a business object. Nine, notifications module remind modules, like Outlook, to arrive at a certain time to give a pop-up reminder, you can choose to postpone or cancel, can be personalized in the business module. For example, to time reminders to contact customers, update orders and other operations. Ten, KPI Module performance Evaluation module, the work of friends should have been evaluated, is the standard module, you can provide some charts. The maps module supports the display of the map, which I haven't used yet, but it looks good. 12, Pivot chart module cross-data analysis tables + chart modules, in Excel, there is a cross-pivot analysis table, because looks like the same, I translated.
This is really quite powerful, customer maneuverability is very strong, to what data statistical results, arbitrary, of course, customers are willing to operate. This module also has a chart display, which can display the data in pivot simultaneously as a chart, which is very intuitive. 13, Pivot Grid module and the above, only the pivot table display. 14, the current version of the report module is 15.2, the new features are constantly increasing, the previous version we have been waiting for a lot of good features. For example, the report module, can only be used in win report design, now the web also has a report designer. Quite tall on. XV, the Scheduler module is the same as the calendar in Outlook. 16, the State machine module to do a simple approval flow, but also good. 17, Treelisteditor tree-shaped list module, this is also very common. 18, the verification module This use frequency is the highest, must fill the verification, the only verification, and so on, you can think of all have. Of course, the extension interface is also mentioned. 19, View variant allows a variety of business objects are displayed, and can quickly switch. The table interface switches to a tree view. 20, Workflow module is the workflow, currently only available under WinForm. Ix. shortcomings 1. Need to learn 2. The system is huge okay, so much is introduced today, I can only think of so many! In addition, this article published, I have written 6 introductory tutorials, if necessary please come to my blog to view. In addition, even if you do not intend to use the XAF does not matter, we design the system, it is very important to learn from other people's good ideas. Xaf is not perfect, never perfect tool, right time to choose the right tool! Really hope to help you! QQ4603528 Group: 50185791

It's time to change your way of development. Introduction of-XAF Information System Rapid Framework

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.