"Web Service Programming - Use C # .NET Development Network Service" Beijing Hope Publishing House My Learning Notes (

xiaoxiao2021-03-06  38

"Web Service Programming - Use C # .NET Development Network Service" - Beijing Hope Publishing House I have learned (that is, copying something) Special explanation: Copyright is the original book! Personal feelings of this book, don't have to buy it! Web Service Programming - Use C # .NET Development Network Services - Beijing Hope Press

Chapter 1.NET and .NET Frame 1.1 .NET Introduction What is .NET? It is difficult to use the .NET clearly, Microsoft is said: "Net is a revolutionary new platform, and he is built on the development of Internet protocol and standard, using many new tools and services for calculation and communication. "Mircrosoft CEO Bauer said:" Microsoft.net represents a collection, an environment, a programmable structure that can support the next generation of Internet. "This sentence is basically simple and concurrent. Net Other features. 1.2. NET's product collection 1.2.1 .NET main components and their role 1.Windows.net (Windows incorporated .NET technology) 2.NET Framework .NET Framework is to facilitate developers to build more easily Network applications and Web services, its key role is to provide a environment that supports multiple programming language components development and execution from hierarchical .NET FarMework, including three main components: common language runtime (Common language runtime) ), Service framework, two types of application templates - WINDMS / Web Service and Windows Application Templates (WINFMS) 3.NET Enterprise Server in MS " In the third generation of Internet, NET Enterprise Server is the basis of enterprise integration and management of various Web-based applications. He provides high reliability, high performance, high scalability, and high management. . He includes the following 8 servers, .NET Enterprise Server Features Description: ● Application Center 2000: Deployment and Managing WIN2002 Web Applications ● BizTalk Server 2000: Used to exchange business information between enterprises (currently most attention) It is mainly to use XML documents to block the platform, the system is different.

Make integration of commercial systems! Main features: Reliable document switching system, ERP application integration, business process automation customization, management, and monitoring, etc. Server 2000: Convenient for Component Integration for Hosts ● Internet Security && Acceleration Server 2000: Mainly Solve Enterprise Application Security and Manageability ● Mobile Information 2001 Server: Provides reliable and telescopic platform for mobile solutions ● SQL Server 2000: Data Analysis Solutions Provides a full database 4 Module Build Services is a collection of core network services in the .NET platform, including the following components: ● Internet XML communication, make Web site transformation Flexible services to exchange and process data ● Internet XML data space: secure and programmable XML storage on the Web ● Internet Dynamic Update: Provide service for rapid development and dynamic configuration ● Internet schedule: Inherit work, Society and private calendars ● Internet identity authentication: Provide a means of password, wallet to physiological data, etc. Integrated and automated processing technology! 6 Visual Studio.NET 1.2.25 .NET technology features. Net consisting 4 important features ● Software change services ● XML-based common language ● Multiple devices and platforms ● New generation human-machine interface 1.3 .NET Framework Overview 1.3 .1 background .NET framework is a computing platform that simplifies highly distributed network development 1.3.2 General Language runtime feature: 1 Management 2 Security 3 error correction 4 Fast 1.3.3 .NET Framework class library Using .NET Framework Category Library You can develop the following applications and services ● Console application ● Script or host Application ● Windows GUI App (Windows Forms class is a collection of Windows GUI development, comprehensive reusable types. ● ASP.NET Application (using Web Forms) Class) ● XML Web Service ● Windows Services 1.3.4 Development of client applications Develop client applications based on Windows programming is the closest to traditional forms. 1.35 The development of server-side development server-side applications is through the controlled world The host is implemented. Non-controlled applications Call the universal language runtime to make the controlled code control the behavior of the server.

1.4 General Language Runtime (CLR) 1.4.1 Overview Overview of Running: Interface, overload, support multi-thread, support exception handling ● Cross-language reagent, especially cross-language inheritance ● Automatic memory management (garbage collection) ● Objects self-description ● Once write, execute ● Design of complete objects ● Strong type Safety ● Simple, C is as strong as VB ● Use the representative (delegate) instead of the policy guarantee security, using the / unsafe option can also use the pointer 1.4 Automatic Memory Management 1 Assign Memory 2 Release Memory 3 Release Non-controlled resources ASSEMBLIES 1.5.1 Overview The assembly is the basics of using the NET framework programming, providing the following functions: 1 Contains the code executed when the general language is running (one installation set only one entry) 2 Form a security boundary 3 Determine a reference range boundary 4 Determine a version boundary 5 to form a configuration unit 6 to perform parallel execution becoming an advantages of 1.5.2 assembly to simplify the configuration of the application and solve the content based on control-based applications. The content assembly set of the appearance 1.5.3 assembly can contain four elements ● The assembly set is light, including assembly set data ● Data type ● Intermediate language code for this shoe type ● One resource collection is only the assembly list is necessary However, the type and resource collection of a meaningful assembly set is also a must-have 1.6 application domain (none) 1.7 General Type System 1.7.1 Overview General Type System supports two general types: (Note: All Types are born from the System.Object class) 1 value type: containing their data, the instance of the value type is also allocated in the stack allocation! Value type and establishment, user-defined or enumerated. Value type variables have their own data copy, so the operation of a variable does not affect other variables 2 Reference Types: Reference Type Storage A reference to the value of the memory address, allocated in the stack! The reference type can be a type of self-description, a pointer type, an interface type.

The reference type may point to the same object, so the operation of a variable may change the value of other variables! Code 1-1 shows the difference between value type and reference type ----------------------------------- ----- USING SYSTEM; Class class1 {public int value = 0;} Class test {static void main () {int val1 = 0; int val2 = val1; val2 = 123; class1 ref1 = new class1 (); Class1 Ref2 = ref1; ref2.value = 123; console.writeLine ("Value: {0}, {1}", VAL1, VAL2); Console.Writeline ("Ref: {0}, {1}", ref1.value , ref2.value);}} ------------------------------------------ - 1-1 The output is: 0, 123 123, 123 1.7.2 Type definition type definitions include: ● Definition of properties in the type ● Type visibility ● Name of the type ● Type of base class ● Type of interface ● Definition of Types 1.7.3 Value Type 1 The value type. NET framework defines the embedded value type, such as: System.InT32, System.Boolean 2 User-defined value type value types can be dominated, attribute, event, It is also possible to use static and non-static methods, when the box is packaged, and the value type is closed, the value type is closed, and the other classes cannot be derived from him, and the virtual method can be defined on the value type. These virtual methods can call code 1-2 from the form of packages or folding boxes to display how uniquely set a plural constructor type --------------------- ------------------- USING SYSTEM; Public Struct Complex {Public Double R, I; Public Complex (Double R, Double I) {THIS.R = R; this. i = i;} public complex reciprocal {get {if (r == 0 && i == 0) throw new DivideByzeroException (); double div = r * r i * i; return new complex (r / div);}} public static expectout (complex a) {return ar;} public static implicit operator complex (double r) {return new complex (r , 0); PUBLIC Static Complence (Complex A) {Return A;} public static complex operator - (Complex a) {Return New Complex (-ar, -AI);} Public Static Complex Operator (Complex A, Complex b) {RETURN New Complex (A.R Br, A.i Bi);

PUBLIC Static Complex Operator - (Complex A, Complex B) {Return New Complex (Ar-Br, Ai-Bi); PUBLIC Static Complex Operator * (Complex A, Complex B) {Return New Complex (Ar * BR-AI * Bi, Ar * B.I ai * br);} public static complex Operator / (Complex A, Complex B) {Return A * B.Reciprocal;} public override string toString () {Return String.Format ("{ 0} {1} I ", R, I); //this.r, this.i how About? Yes}} public class valuepesample} {public static void main () {complex a = new complex (0,1) Complex b = new complex (1, -2); console.writeline (); console.writeline ("a =" a); console.writeline ("b =" b); console.writeline ("A B = " (a b)); console.writeline (" ab = " (ab)); console.writeline (" a * b = " (a * b)); console.writeLine (" A / B = " (a / b)); console.writeline (); console.writeline (" Double) a = " (double) a); console.writeLine (" Complex) 5 = " (Complex) 5);}} ---------------------------------------- Results Enumeration is a special type of value type, he is inherited from system.enum, one enumeration has a name, a basic type and a domain set! .

The basic type must be some restrictions of embedded or unsigned integer types (such as byte, int32, uint64) enumeration ● You cannot define your own method ● You cannot implement interface ● Can't define properties and event code 1-3 Show how to use a small field and normal enumeration type ----------------------------------- ------ Using System; Using System.Collections; // Defines Enumeration Public Enum Somerootvegetables {HorseraDish, Radish, Turnip,} [Flags] // What the mean? public enum seasons {none = 0, summer = 1 , Autumn = 2, Winter = 4, Spring = 8, All = Summer | Autumn | Winter | Spring, // why} public class EnumerationSample {public static void Main () {Hashtable AvailableIn = new Hashtable ();? AvailableIn [SomeRootVegetables .HorseRadish] = Seasons.All; AvailableIn [SomeRootVegetables.Radish] = Seasons.Spring; AvailableIn [SomeRootVegetables.Turnip] = Seasons.Spring | Seasons.Autumn; Seasons [] seasons = new Seasons [] {Seasons.Winter, Seasons. Spring, seasons.summer, seasons.autumn}; for (int i = 0; i 0) Console.WriteLine ("/T" (((((((( (Somerootvegetables )E.key) .tostring (" g "));}} } --------------------------------- Results -------------------------------------------- Class myapp {ENUM Color : Byte {Red, White, Bule} public static void main () {string buffer; color mycolor; console.writeline ("Enter a value for a color: 0 = red, 1 = white, 2 = bule"); mycolor = 1; Switch (MyColor) {case color.red: system.console.writeline ("/ n switched to red ..."); break; case color.white: system.console.writeline

/ n switched to d ... "; break; case color.bule: system.console.writeline (" / n switched to b ... "); break; default: system.console.writeline (" s ") Break;} system.console.writeline ("/ n {0}, {1}", mycolor, (int) mycolor);}} ------------------ -------------------------------- 1.7.4 Other representatives (DELEGATE) similar C function pointer interface can have static members Nested type, abstract virtual member, attribute, event. Each implementation of the class that implements the interface must define the abstract member interfaces in the interface have the following restrictions: ● Interface can declare any type, but the members in the interface must be public ● Interface and membership cannot have a secure limit ● The interface can define the configuration function of the class, but it is not possible to construct the instance pointer is a special type variable. The three types of pointers are supported: controlled pointers, non-controlled pointers, non-affected Control function pointer. 1.8 yuan data and self-description control code 1-4 code 1-5

转载请注明原文地址:https://www.9cbs.com/read-59918.html

New Post(0)