Analysis on ASP. NET Component Design

Source: Internet
Author: User

ASP. NET Component Design 1. What is a component?

Check MSDN. Microsoft defines the component as follows. in the. NET Framework, the component refers to the implementation of the System. componentModel. A class of the IComponent interface, or a class that is directly or indirectly derived from the class that implements the IComponent. This is a definition from the perspective of pure language technology. In general, components are "software units that can be operated independently, this means that components must have low coupling and high reusability. Microsoft divides software into two parts: one is Component, which refers to the unit with specific functions, independent operation, and no UI interface; the other is Control, which is the Control we often call, it refers to the UI interface units with specific functions and independent operation.

ASP. NET Component Design 2. knowledge required to learn ASP. NET components

Master any one. net language. We recommend that you use C # And C # as a brand new language. However, we also use the C ++ and JAVA syntaxes and introduce some new concepts, which are good for programmers.

Understand the IIS Running Mechanism and ASP. NET running mode.

Familiar with JavaScript. The powerful functions of this script language are excellent in processing client actions. Basically, all custom components are inseparable from JavaScript. At the same time, CSS and DHTML are also well-known. No way. They rarely appear independently and always like group performances.

ASP. NET Component Design III. Difficulty of Component Design

You don't need to ask this question. You may have guessed a few points, one word: hard.

You may notice that viewstate is rarely studied in depth when writing an asp.net application. The reason is simple because the user object designed by ViewState itself is not an application programmer, it is a component designer. If it is not required by the client, you will not write a large number of javascript scripts in asp.net, but it is difficult to escape the relationship in component design. More than that, are they designed as server components? Do our components inherit Control, WebControl, or Component? Do I need to customize attributes in components? Do I need to bind data? How do I draw the component appearance? How to communicate with IIS? Do I need post-back? Many and many problems require component designers to consider them one by one.

Therefore, if you care about it, isn't it just designing a component? How difficult is this! So, I will smile, because I know, you must be joking.

But do not be afraid, "programmers need to explore the spirit !"

ASP. NET Component Design IV. Selection of base classes

If we design a WEB visual Control that forms part of a WEB page, we can inherit the Control class or WebControl class. If it is a non-visual control, it can inherit Component. The control inherited from this class does not appear on the page but in Component Tray. Do you still remember the OpenFileDialog control? The open file dialog box control appears in the Component Tray control.

If we only enhance functions on the basis of an existing control, inherit the existing control.

I will introduce you to the design of ASP. NET components here, and hope to help you understand ASP. NET Component Design.

  1. Analysis on making ASP. NET error pages
  2. Analysis on server system configuration of ASP. NET Website settings
  3. Analysis on website construction settings of ASP. NET Website settings
  4. Analysis of folder permission settings in ASP. NET Website settings
  5. Advantages of ASP. NET

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.