. Net commercial application architecture issues to be resolved (from ron2k's personal blog)

Source: Internet
Author: User

. NET web business application architecture to solve a number of problems(Original)

Microsoft was launched. it has been four years since the Net Revolution. In terms of its core Clr and C # syntax, it is indeed much better than J2EE, even Martin flower does not consciously use C # To illustrate the OO method. However, from the perspective of commercial applications, Microsoft lags behind J2EE too much, mainly in terms of commercial application architecture. Due to the relatively weak nature of the Old Master Sun, J2EE was unable to control the situation well. Therefore, the J2EE camp experienced pain relief in the early stages of development, but finally reached an unprecedented stage by relying on open source, the J2EE camp focuses on the principles of standards, openness, and good architecture, and is now starting from Microsoft's best usability.. I am afraid the advantage of net will continue. In contrast. net camp, strong commercial atmosphere, due to the strength of Microsoft, resulting in pressure on any civil organizations, Microsoft's development or insertion point is based on ease of use, from some small projects of Hello world or PetStore, there are indeed many advantages, as if any project can be completed in the case of a plug-in, and is that true for large projects? Microsoft usually uses mouse clicks to generate hard-codeCodeIn terms of reusability, maintenance, and scalability, there is a huge cost. The Microsoft camp is used to using APIs provided by Microsoft to complete projects. the. NET camp is characterized by closed, oligarchy, and ease of use. From the current situation of Microsoft, we can only take advantage of J2EE in Clr and C # (JRE, and Java syntax) or infrastructure, however, when it comes to the upper-layer or-mapping, presentation layer framework, and AOP architecture, Microsoft has almost no advantages, and these are the most necessary architectures for building commercial applications. in the. NET project, many of these business architectures are completed by the project team .. The competition between net and J2EE seems to be the competition between a high-quality professional corps consisting of 60 thousand people and a civil institution consisting of millions of people, the competition between "usability-> architecture" and "architecture-> usability" routes leads to victory or defeat and is only judged by history.

I suddenly found myself far away, huh, huh! It doesn't matter. I'm excited to talk nonsense. It's time to complain about living in the. NET camp for too long. Next, let's take a closer look at the. NET commercial application architecture. First of all, I would like to explain why the business architecture should be raised and what problems I want to solve. In general, what the business architecture should solve is:Improve software quality, speed up development efficiency, and reduce maintenance costs. The following describes all aspects of commercial applications:

  1. Or-Mapping: I think this is the first problem to be solved, and it is the most important aspect to be improved in commercial applications. With or-mapping, you can transfer data-centric development methods to model-centric development methods. Without solving this problem, we will never be able to achieve the highest-level domain model of the three basic models mentioned in enterprise application architecture model. If this problem is not solved, the OO of the business logic layer of the key layer in the layer-3 enterprise application cannot be executed.

    Problem:Business logic and persistence decoupling are required, and project requirements can be implemented across databases.

    Possible solutions:Nhib.pdf (available in Beta) and ibatis (1.0)
  2. Complex query:Or-mapping cannot solve the problem of complex queries, and hql in nhib.pdf cannot solve this problem well. (If the query involves sub-objects, you must send additional query statements, and the entity in or-mapping cannot fully accommodate the fields required for the query ).

    Problem:The complex query implementation required by various businesses requires the Dynamic Construction of many query statements, which cannot be well unified or well maintained.

    Possible solutions:Ibatis (version 1.0)
  3. Data Dictionary:Or meta-data, that is, the structure of the data structure.

    Problem:Many commercial projects require custom fields, Custom reports, and custom query lists. In addition, the Code for many query conditions and lists in commercial projects is too repetitive.

    Possible solutions:No, but you can refer to the implementation of meta-data in mscrm.
  4. MVC:

    Problem:Needless to say.

    Possible solutions:Maverick. net, uipb
  5. Transaction:

    Problem:

    1. database transactions cannot implement the business transaction function. You must implement the transaction functions in the form of required, nonsupported, supported, and so on.

    2. Start and commit a transaction. The code for rolling back the transaction is too repetitive. It is inevitable that a bug will be introduced to implement the transaction by human constraints.

    Possible solutions:Enterprise Services (COM +) (but it will introduce problems that are difficult to deploy)
  6. Unify data verification, reading, and loading on pages

    Problem:
    Data verification, reading, and loading on many pages are similar, but repeated writing is too cumbersome. The format, such as date and amount, is required to be unified throughout the project. Developers do the same tedious operations on each page without maintenance.

    Possible solutions:None
  7. Logs:

    Problem:In every commercial application, a lot of similar log code is required, which is too cumbersome.

    Possible solutions:Spring. net, aspect #, Edra
  8. Permission Verification:

    Problem:In every commercial application, it is too cumbersome to write a lot of similar permission verification code.

    Possible solutions:Spring. net, aspect #, Edra
  9. Resolve concurrency conflicts:

    Problem:The concurrency problem in Web development is particularly serious. Each page may be opened by multiple users at the same time, and the architecture should handle this concurrency problem.

    Possible solutions:Chapter 1 of enterprise application architecture model is described.

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.