Asp. Net large project practices-reasons and ideas for selecting key technical solutions

Source: Internet
Author: User
Although I do not like to discuss too many theoretical concepts, I still have a lot of very specific opinions on the part of the "Brick House". I hope this post will not become a battle of words .... the answer is as follows (many people may not understand it correctly ):

For comments from Brick companies, see Asp. Net large-scale project practice series navigation

Why choose nhib.pdf

Reason 1: Object relationship ing (ORM)Main PurposeIt is to solve the impedance problem that does not match the object-oriented programming technology. What is the impedance? In layman's termsObject-oriented classes often have inheritance and inter-class relationships that do not exactly correspond to database tables., ORM technology may mainly want to solve this problem. Here we need to talk about the so-called entities that many students and brick companies prefer to create tables first when using ORM, and then generate a one-to-one correspondence with table fields. I personally think this is not O-> R M, but R-> o m. In fact, this practice does not reflect the most critical idea of ORM, or the previous "table-driven" (a general explanation: first design a table) rather than "business-driven" (a popular explanation: first, design a real object-oriented business entity ). Because my system services are complex and changeable, I hope I can do whatever I want.Design my business entities according to the object-oriented thinking, give full play to the role of the object-oriented thinking, do not worry about whether these designs can be persistedObviously, nhib.pdf has enabled me to do this. This is what I chose to use the ORM technology and nhib.pdf in the project.Main Purpose.

Reason 2: Through nhib.pdf and our rational design, we have implementedRemove technical details of Database AccessSo that we can focus more on business and UI implementation. In most cases (complex REPORT query and batch operations may still require the implementation of Stored Procedures), we do not have to worry about SQL statements or the like, this is undoubtedly of great significance for an information management system that mostly uses database operations. No technical solution can cover 100% of the requirements,20% of energy can be used to solve 90% of problemsEven if it is successful.

Reason 3: Because this system is not only used by one hospital, the database products used by different hospitals are different. From the engineering point of view, it is not mandatory for customers to use fixed database products. nhib.pdf largely shields the differences between different database products, so that I do not have to write specific implementations for different database products.

EfficiencyEfficiency: "efficiency YY brick house" said: NHibernate; "large system brick house" said: If the concurrency is 1 W, NHibernate:

The technology NHibernate is not efficient for a long time, but for the above three reasons (maybe there are some other reasons ..), take nhib.pdf and direct Ado. net is just as efficient as comparing c # and assembly.

Hibernate + Spring has been a textbook solution for a long time in J2EE, and there are many successful cases of large systems both in China and abroad, in this sense, Hibernate may not be so efficient. net has become synonymous with low efficiency. It seems that when talking about Hibernate, brick companies will kill with low efficiency and sneer.

I tested some typical scenarios and simulation data with LoadRunner for NHibernate efficiency. I'm not exaggerating. Have you ever tested it?

Efficiency is a complex and comprehensive problem. If you ignore the project background, actual business needs, technical implementation methods, and the impact of various software and hardware factors, one-sided YY efficiency is undoubtedly not rigorous and ridiculous. Xian Ge is also engaged in telecom and banking projects with large concurrency and data volumes, and almost all of these projects are running at IO, oracle optimization experts and hardware solutions are often used. For example, what is the concept of 1 million concurrent projects and 1 million concurrent projects as the "large system brick house" mentioned above? I didn't use a machine to run, and I was blind to everything, right... I don't know if this brick house has ever seen a machine ....

Why EXTJS?

Reason 1: The customer has high requirements on UI interaction and needs to use B/S to structure the application. Ext's strong UI component interaction capability is exactly what I need.

Reason 2: Object-Oriented Java SDK (Java) programming and componentized programming. Compared with the previous third-party server controls, the maintainability, readability, and coding experience are not much better...

Reason 3: Because the customer has high requirements on UI interaction, it is impossible to use third-party UI components without using third-party UI components. The biggest risk of using a third-party is the need to meet bugs and built-in functions, extJs's open-source and good object-oriented capabilities allow me to easily rewrite the source code to implement any features I want.

Reason 4: I am an intranet system, so I don't have to worry about the harsh speed problem.

Reason 5: It is undeniable that beautiful interfaces and Interactions during bidding or sales promotion have a considerable impact on the customer's goodwill. In most cases, EXT does not need to be related to any annoying details such as artist, Css, and Html.

Reason 6: For very complex pages and large table single pages, Ext is indeed somewhat delayed in IE (the bottleneck of this efficiency problem lies in the client ), therefore, we used Google browsers for customers during implementation, except for ActieX related to medical insurance (using google's IETab plug-in ), the performance of Ext in Google's browser is extremely satisfying (the V8 engine is really powerful )... even if complex interactions and a large number of components exist on one page, the interaction operations are almost instantaneous.

No technical solution is silver bullet, ExtJs is not the silver bullet of the UI solution, there is no best technology, only the technology that best suits your project, I don't know why I don't need Ext ....

Why use dependency injection (implemented in Unity) for inter-layer calling?

Because the hospital information system business is complicated, although many parameter configurations are made for product-based development, it is inevitable that code modification will be involved when different hospitals are implemented.

When implementing the code change, I hope to do the following:

1. modify the code without changing the original product release code version;

2. because there may be several hospital users at the same time, if a hospital has a set of code, it will inevitably increase the company's operating costs and management difficulty.

Therefore, when you need to modify the code, create a new file (class) to inherit the specific implementation of the product release code and rewrite the code as needed. In this way, I only need to modify the configuration file for different hospitals based on different services.

Of course, if the interface needs to be changed due to demand changes, there is no way .. however, we have more than 10 years of experience in the HIS business, so we can cover all the business during product development.

Of course, it should be noted that in this project, dependency injection is not only called between layers. We can use it to decouple the applicable business scenarios of the dependency Injection design mode.

Compared with the factory mode, dependency injection containers have many advantages, such as automatic assembly, lifecycle management of instance objects, and parameter passing.

Why Asp. Net MVC + ExtJs?

To be continued...

More reasons and ideas for choosing technical solutions are to be continued...

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.