An Introduction to .NET(非原创---外教讲义)

An Introduction to .NET

 

Basic concept of .Net

 

Programming

Set of instructions provided to computer is called programming.

Program development cycle

Program development cycle is divided into six steps.

1- Analyze the problem

Analyzing the problem means identifying specification and defining each program’s input, output and processing components.

2-            Design programs.

 In this step, the solution to the problem is planned. The sequence of each module of is carefully prepared. Such a sequence of steps is called algorithm.

3-            Code programs

coding is the word used for writing the program lines. The programming codes are written in programming languages.

 

 4- Test and debug program

 Testing is the process of finding the errors in a program, and debugging is the process of correcting errors found during the testing process.

5- Complete the documentation

Documentation is the process of explaining the various steps of the program code into simple understandable language so that the codes of the program can be understood by other person .

6- Manintain the program

Maintaining the program means modifying and enhancing the program with different rfeatures according to the needs of the company for which the program is made

What is event and event driven programming?

Event

In terms of programming event means occurring or happening of a user-action. Event driven programming responds to the many types of events. For example mouse click, mouse release and dragging of mouse are some examples of events.

What do you understand by GUI?

The full form of GUI is graphical user interface. It is a type of programming environment in which the commands  are represented in the form of pictures. For example save command, ok command and cancel command buttons of windows.

What do you understand by a message?

A message is the information/request sent to the application

What is the similarity  and difference between option button and check boxes?

 

The Evolution of Microsoft .NET

As is the case with most of the technologies, .NET too was not developed overnight. Instead, .NET evolved over a period of years during which many technologies came and were found lacking somewhere that lead to the development of the other technologies. And there is no doubt that .NET is the latest in the league of these technologies. And there is not doubt that .NET is the latest in the league of these technologies and strategies. So let us have a glimpse at the road map that led to the development of .NET.

 

Microsoft’s MS-DOS operating system was initially developed for a very limited computer (in terms of processing capabilities) and therefore was designed to run only one application at a time. But with the passage of time and advent of new techniques, Intel Corporation developed more and more powerful CPUs, such as the 80286 and 80386. At that time Microsoft began envisioning the limitless possibilities of running multiple applications concurrently and this vision led to the development of the cooperatively multitasking Microsoft Windows environment. Further, it lead to the development of various technologies like OLE (Object Linking and Embedding). ODBC (Open Database Connectivity) and ADO (ActiveX Data Objects) for data exchange, which ultimately led to one of the most successful component architectures named COM (Component Object Model). Having achieved tremendous success in the desktop arena, Microsoft had the vision of making inroads into the Internet world. And this strategy had to be developed with web-centric environments in mind. The .NET strategy is nothing but Microsoft’s vision of future’s web-centric environments where the focus shifts from the desktop to the Internet.

 

MS-DOS

Microsoft Windows Environment

Microsoft Data Access Technologies

(OLE, ODBC, ADO, ActiveX)

Microsoft COM

(Component Object Model)

Microsoft .NET strategy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 1.1 The Road to .NET strategy

.NET is the latest vision about how people will arrange and display data from different sources distributed over the Internet. In a way this makes sense because the emphasis is on a user-centric approach. Simply put, .NET is Microsoft’s strategy for delivering software as a service. The .NET will enable developers to create programs that transcend device boundaries and fully harness the connectivity of the Internet. The .NET strategy will bring fundamental changes in the way companies interact with their customers and partners over the Internet.

Microsoft .NET

Microsoft.NET (formerly known as Next Generation Windows Services, NGWS) is the umbrella term for the Microsoft’s strategy to move from a client-centric model to a network-centric model. It can be best described as the initiative that will allow the Internet to be the basis of a new operating system. It frees us from the constraints of hardware by making user data available from the Internet. The .NET is important to users as it makes their information accessible across all devices. It is also important to developers because it will change the way they develop applications by allowing them to hook onto Web Services. Microsoft held the Professional Developers Conference (PDC) in Orlando, Florida where they revealed details about their next generation platform for Windows and Internet software development - .NET, people all across the globe have considered .NET as a broad but ambitious initiative that revolves around the .NET Framework. The .NET framework is the actual language and execution platform besides providing an extensive set of class libraries. Though there is no doubt that it seems broad and ambitious but it is certainly a revolutionary idea that introduces a completely new model of programming and deployment of applications.

 

The vision of .NET is globally distributed systems that use XML as the universal glue to allow functions running on different computers across an organization or across the world to come together in a single application. In this vision, systems from servers to wireless palmtops, will share the same general platform, with versions of .NET available for all of them, and with each of them able to collaborate transparently with others. The .NET also aims to make traditional business applications easier to develop and deploy. Figure 1.2 shows how applications and services can be interlinked in an Internet-based environment.

Devices

Browsers

App Code

Internet

Vertical and Portal Services

Application Specific Web Services

Building Block Web Services

OS and Local Services

 

 

 

 

                    Access

                    Application

                        

             Call Services

               

 

 

 

 

 

Fig. 1.2 The .NET Vision

The .NET Experience

Microsoft .NET can be thought of as an experience, which provides the end user a means to interact with devices, based on anytime, anywhere fundamental that users have been wishing for sometime now. From the users perspective, the .NET experience is a whole new world of something that allows him anytime anywhere access of devices. The Microsoft .NET experience is a dramatically more personal, integrated computing experience using Web services delivered through smart devices. The .NET experience will have features like:

l         Personal and integrated experience. In contrast to the large amount of information provided by provider, .NET experiences are centered on the user, integrating their data and preferences into a single application.

l         Interactions delivered through smart devices. Users experience .NET through their interactions with smart devices. Smart devices are Web enabled appliances, such as personal computers, handheld computers, and smart phones. The software that makes the smart devices more intelligent in their interactions with users will enrich the .NET experience. Though the user may or may not get to know all this, but this will work for him behind the scenes and he will have experiences similar to the following situations:

 

Imagine you wanted to adjust the air conditioning in your house while you were away from home. You could use a .NET experience that controls your household utilities through a smart device. The device you use could be your desktop computer while you were at office, your smart phone while you were driving to the grocery store, or a kiosk while you were shopping for dinner ingredients.

 

As per the .NET vision, users will have the .NET experiences unique in the following aspects:

l         Each of these devices generates a different interface for the .NET experience. The desktop computer might present a graphical map and accept mouse input. The smart phone could give you verbal options and ask you to push a button to specify your choice. The kiosk may have a touch screen and a small set of temperature options. You are using the same .NET experience to perform the same task, but you see a distinct interface, which is appropriate to the device.

l         .NET experiences are location-independent. Taking advantage of the strengths of both locally installed and Web-based applications, .NET experiences can be accessed both online and offline.

l         .NET experiences are user-centric. .NET experiences read a user’s preferences and profile information, stored in building block services, and automatically incorporate the user’s information and preferences into what is being presented. Based on user login ID on the Website, the .NET experience already knows where you live. User need not enter an address.

 

The .NET Platform

The .NET platform is the developer’s perspective of .NET wherein he views .NET as an amalgam of a set of services, specifications, guidelines and tools for incorporating the .NET vision. It includes the .NET infrastructure and tools to build and operate a new generation of smart Internet devices. As of the developer, .NET platform is something that helps him put the .NET vision into a reality and hence help the developer in providing the user with the .NET experience. It can be further categorized as composition of the following constituents:

l         .NET Framework: The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts:

1.       Common Language Runtime – The execution is an environment for .NET applications. The Common Language Runtime is a requirement for any application developed with the framework.

2.       Framework classes – These APIs are provided as part of .NET. The .NET Framework includes classes, interfaces, and value types that help expedite and optimize the development process and give you access to system functionality.

3.       ASP.NET – The web technology for the generation of dynamic web content under the .NET. Web applications developed using ASP.NET can connect to databases, interact with users and provide asynchronous services.

The .NET Framework provides two mechanisms for protecting resources and code from unauthorized code and users:

1.       Code access security uses permission to control the access code that has to protect resources and operations. It helps protect computer systems from malicious mobile code and provides a way to allow mobile code to run safely.

2.       Role-based security provides information needed to make decisions about what a user is allowed to do. These decisions can be based on either the user’s identity or role membership or both.

l         .NET Products: The .NET products will include a whole range of tools and servers that rely on XML as a language to describe data and SOAP (Simple Object Access Protocol) as protocol for transmission of data between products. This includes Microsoft Windows.NET (with a core integrated set of building block services). MSN.NET, personal subscription services, Microsoft Office.NET, Microsoft Visual Studio.NET, and Microsoft bCentral for .NET.

l         .NET Services: The .NET services will include all the web services and other corporate services provided by the third party vendors. A vast range of partners and developers will have the opportunity to produce corporate and vertical services built on the .NET platform.

 

The development tools provided as part of .NET platform will utilize the .NET Framework to allow developers to quickly build and deploy robust applications that take advantage of the new .NET Common Language Runtime (CLR) environment. Using the tools with the .NET Framework SDK provides:

1.       A fully managed, protected, and feature rich application execution environment

2.       Application integration with Active Server Pages (ASP)

3.       Improved isolation of application components

4.       Simplified application deployment

 

Advantages of .NET

There is no doubt that the .NET strategy offers new ways as regards how the applications will behave in future. In fact not only how they behave but how they are built will also change and these changes are going to make a move from the desktop to web environments. The .NET will offer the following advantages:

l         .NET is multi-lingual – With the .NET platform we can use several languages, such as C++, Jscript.NET, VB.NET (alias VB 7) and C# (pronounced as Csharp), a new language that has emerged with .NET. ALL these languages are compiled via an intermediate binary code, which is independent of hardware and operating systems. This intermediate language called Microsoft Intermediate Language (MSIL) is then executed in the Common Language Runtime (CLR), the execution environment for .NET applications.

l         .NET Applications are portable – Applications compiled as intermediate code are presented as Portable Executable (PEs). These (PEs) can be implemented over a vast range of hardware and software architectures: Intel PCs with Windows 9x, Windows NT4, Windows 2000 or future 64 bit Windows versions, microcontroller-based PDAs with PocketPC (e.g. Windows CE), and other operating systems.

l         All languages must comply with a common agreement – For a language to be eligible for the range of languages supported by the .NET platform, it must provide a set of possibilities and constructions listed in an agreement called the Common Language Specification (CLS). To add a language to .NET, all that is required is for it to meet the requirements of the CLS, and a compiler to convert that language into MSIL.

l         Managed codes – All code in .NET is managed code because the runtime provides services that include automatic memory management, debugging support, enhanced security, and interoperability with unmanaged code, such as COM components. Earlier, the developers had to explicitly manage the memory in languages like C++.

l         Interoperability – All languages supported by the .NET framework support a common set of programming classes as their base class library. This means that the developers will not have trouble while interoperating between languages since all of them support the same set of APIs and also have same data types as specified by the Common Type Specification (CTS). Interoperability is being achieved because of the fact that an assembly manifest containing metadata information is being generated at compile time.

 

Note: Metadata is the information about data that describes your code. An assembly is the functional unit for sharing and reuse that contains metadata information of a .NET component.

 

The Working of .NET

With .NET, Microsoft is sending us a version of an Internet made up of an infinite number of interoperable Web applications, which together form a global service exchange network. These Web Services are based on the Simple Object Protocol (SOAP) and XML. Not only are these Web Services likely to develop on the Internet, but may also change the way we plan information systems in enterprises, by making SOAP systematically used as application integration middleware, playing the role of a simple but efficient standard. An enterprise information system could then also become a network of front and back-office applications, which interoperate through SOAP, and reciprocally, use the Web Services that they implement.

 

The .NET is a three-layered architecture. On the server side, it has operating systems such as Windows DataCenter. In the middle, it has XML, combined with the Simple Object Access Protocol (SOAP) to expose information in sources such as databases and spreadsheets so that developers can call them with XML. On the client side, it has operating systems that support XML parsing to display the information based on the tags assigned to it. Figure below shows the representation of how the .NET works and how SOAP and XML act as glue between different applications.

 

 

 

 

 

 

 

 

 

 

 

 

                                The Microsoft .NET

Windows

Data

Center

 

 

 

Server

XML

Based

.NET

services

on the

.NET

enterprise

Windows

With .NET

Support

 

 

 

Client

 

S

O

A

P

 

SOAP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                   Microsoft .NET – A working scenario

 

The .NET makes intensive use of XML, and places a lot of  emphasis on the SOAP protocol. Microsoft plans to introduce a new system of programming which will be based on the reuse of services. SOAP and Web Services are the cornerstones of the .NET platform.

 

According to .NET framework, all source code is first converted into an intermediate code ( known as IL Code) at compilation time. Before the IL Code is executed, it has to be converted to CPU-specific executable code. Once the CPU-specific exe is generated, it can be executed as a normal application. Figure below gives the details.

Source code in any .NET language

Machine independent IL code

Machine dependent executable code

 

 

 

 

 

 

 

 

 

                      .NET Executable flow

 

Summary:

l         Microsoft .NET is Microsoft’s strategy for delivering software as a service.

l         Microsoft’s .NET is an initiative that revolves around the .NET Framework, which encompasses the actual language and executable platform besides providing an extensive set of class libraries.

l         Microsoft’s .net strategy is an approach  towards making Internet a true distributed computing platform by providing a framework that enables computers, devices, and services to collaborate.

l         The .NET was earlier named as Next Generation Windows Services (NGWS).

l         The primary objective of .NET is to provide developers with a means to create interoperable applications.

l         The Common Language Runtime (CLR) is the execution environment for .NET Framework applications.

l         With the .NET platform, one can use several languages, such as C++, Jscript, Visual Basic.NET (VB.NET), and C#.

l         Applications designed using .NET are compiled into an intermediate code called IL code.

l         For a language to be eligible for the range of languages supported by the .NET platform, it must comply the Common Language Specification (CLS).

l         Applications compiled as intermediate code are presented as Portable Executables (PEs).

l         Web Services provided by the .NET platform are based on the Simple Object Access Protocol (SOAP) and XML.

时间: 2024-08-04 14:09:56

An Introduction to .NET(非原创---外教讲义)的相关文章

The .NET Framework(非原创---外教讲义)

      The .Net Framework   Topics Understanding .NET Framework                                          Common Language Runtime (CLR)                                     Unified Programming Classes                                           Active Ser

如何打造非原创但符合用户需求的内容

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 很多站长都误认为用户需要的内容就是网站的原创内容,其实这个观点是错误的,用户需要的内容应该是与网站呈高相关性并且符合社会现实的内容.前不久有站长在沟通中问道:为什么我天天更新原创类的文章,网站收录不增加呢?其实这与网站的原创和用户需求的内容息息相关,用户需求的内容并不一定是网站原创的内容,下面具体的谈一谈如何打造非原创但符合用户需求的网站内容

非原创内容的网站的冬天来了

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 10月中旬开始,石家庄工商局等部门联合对太和电子城.南三条批发市场.新华集贸市场(南三条和新华集贸是中国十大小商品批发市场)等知名市场进行清查,检查的内容主要是商户是否销售假冒伪劣产品,是否销售不符合卫生标准的食品和化妆品,是否销售不符合保障人身财产安全的电器.易燃易爆产品,以及盗版音像.图书等. 据我了解,这次清查规模和力度比较大,市场上很

SEOer如何降低非原创文章带来的影响?

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 有朋友向新辰抱怨:老板给的任务太多,每天都要写几篇原创,半个月还好说,可一个月下来都不知道写什么了.新辰说过,可以挖掘出很多长尾词,组建一个词库,然后就围绕这个词库写就行;但难倒了一波人,于是乎,便出现了大量的复制粘贴或伪原创相似的页面,当然,这是不友好的SEO行为,那SEOer应该如何降低影响呢? 虽然,百度已经说明了即使文章不是原创,只要

[非原创] 哈夫曼(Huffman )编码

  ==================================================== 前言: 本文是源于我在(上海交大)饮水思源BBS 的VC版解答其他网友提出的帮助请求.这是德国 DARMSTADT 工业大学C++作业题目之一,属于非计算机系的题目,题目本身要求完成的那几个辅助函数难度并不高.我在BBS上给出了这道题目的解答,但是同时我也想根据这个题目的说明文档,来仔细回顾一下 Huffman 编码.因此本文是以该题目的说明文档为基本框架的.我将对该文档中的主要部分转用

用户体验和原创:250多篇非原创轻松带来高质量稳定排名

网站内容原创肯定要比伪原创,直接复制过来的要好;但很多时候我们发现网站虽然原创多了,收录多了,但排名却并没有理想的那么好,甚至比不上哪些纯粹摘录文章而成的网站.在这里我就有两个差不多性质的网站,一个原创高,另一个网站文章几乎是全部复制粘贴过来的.对比下两个网站的发展历程和效果,相信会给大家带来意想不到的收获. 2010年3月份,毫无互联网行业经验的我,在朋友的帮助下,搭建了我的第一个网站:<就要爱美眉>.主题是研究如何追女孩. 当时搭建这个网站几乎是毫无目的的,就是练手,也不懂什么seo,以为

appledoc相关内容汇总(非原创)

appledoc appledoc是在stackoverflow上被大家推荐的一个注释工具.有几个原因造成我比较喜欢它: 它默认生成的文档风格和苹果的官方文档是一致的,而doxygen需要另外配置. appledoc就是用objective-c生成的,必要的时候调试和改动也比较方便. 可以生成docset,并且集成到xcode中.这一点是很赞的,相当于在源码中按住option再单击就可以调出相应方法的帮助. appledoc源码在github上,而doxygen在svn上.我个人比较偏激地认为比

[非原创]树和图的遍历

       备注:本文使用的范例代码来自<系统设计师教程>(王春森主编),本文性质属于我的对引用代码的注释和分析,因此并非原创.本文的部分先发表于中国编程论坛.   (一)用栈前序遍历树   对这篇文章的来源性说明:理论和代码来源,<系统设计师教程>(王春森主编),文章内容来自我对书中代码的分析和手工注释. ( 本文献给小师妹:littlehead(我是大好人)) 名词:栈,遍历,前序遍历,树. (1)准备:树的定义省略.但是由于数的定义属于递归型定义,即树的每个子节点又是一棵树

[非原创] 用于将真彩色图像降级为索引图像的八叉树算法

本文介绍的内容,是用八叉树法降级一个真彩色图像(BPP=16以上).这也是某公司在今年校园招聘中的笔试中的最后一道题目.我参考了 Jeff Prosise 所写的这篇文章(见参考资料),然后修改了他提供的范例的源码,使能够更好的演示该算法,同时我也添加了绘制八叉树的代码,可以直观的看到八叉树的形态. 索引图像的尺寸比真彩色图像可以大幅降低,保存为256色索引图像大约只有真彩色图像的1/3 (bpp = 24) 或 1/4 (bpp = 32),因为表示每个像素的数据从3或4个字节减少到1个字节.