Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the ASP.NET component design?

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what is ASP.NET component design". In daily operation, I believe many people have doubts about what ASP.NET component design is. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is ASP.NET component design?" Next, please follow the editor to study!

ASP.NET component design 1. What are components?

Looking at MSDN, Microsoft defines components as follows: in .NET Framework, a component is a class that implements the System.ComponentModel.IComponent interface, or a class that derives directly or indirectly from a class that implements IComponent. This is the definition from the perspective of pure language (technology). Popularly speaking, components are "software units that can operate independently", which emphasizes independent operation, which means that components must have the characteristics of low coupling, high reusability and so on. Microsoft divides the software into two parts: one is Component, which refers to units with specific functions and can operate independently without UI interface, and the other is Control, which refers to UI interface units with specific functions and can operate independently.

Design of ASP.NET components II. Knowledge needed to learn ASP.NET components

Any grasp of a. Net language, it is recommended to use Candlesome C # is a new language, but also draw lessons from the grammar of C++ and JAVA, while introducing some new concepts, beer is good for programmers.

Understand how IIS works and how ASP.NET works.

Proficient in JavaScript, the powerful scripting language performs very well when dealing with client actions, almost all custom components are inseparable from JavaScript, at the same time, CSS and DHTML are also well known. There is no way. They seldom show up alone and always like to perform in groups.

ASP.NET component design III. The difficulty of component design

You don't have to ask this question, maybe you have guessed a little bit, in one word: difficult.

You may notice that when writing asp.net applications, there is little in-depth research into viewstate, simply because the user objects designed by ViewState itself are not application programmers, but component designers. You wouldn't write a lot of javascript scripts in asp.net if it wasn't for client needs, and it's hard to get away with component design. More than that, is it designed as a server component? Does our component inherit Control, WebControl or Component? Do you need to customize Attribute in the component? Do you need to implement data binding? How do I draw the appearance of a component? How to communicate with IIS? Do you need post-back? Many, many problems need component designers-- hard work for you to consider one by one.

So, if you disdain to say: isn't it all about designing a component? It's not so hard! Well, I will smile, because I know that you must be joking.

But don't be afraid, "programmers need to explore the spirit!"

ASP.NET component design IV. Selection of base class

If we design a WEB visual control that forms part of the WEB page, we can inherit the Control class or the WebControl class. If it is a non-visual control, you can inherit Component, and the control that inherits this class does not appear on the page at design time, but in Component Tray. Remember the OpenFileDialog control? This file opens the dialog control that appears in the Component Tray control.

If we just enhance the functionality on the basis of the existing control, then inherit the existing control.

At this point, the study on "what is the design of ASP.NET components" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report