Presentation is loading. Please wait.

Presentation is loading. Please wait.

Süsteemprogrammeerimine C# keeles (Microsoft.NET,.NET Framework 2.0) Vladimir Kjahrenov.

Similar presentations


Presentation on theme: "Süsteemprogrammeerimine C# keeles (Microsoft.NET,.NET Framework 2.0) Vladimir Kjahrenov."— Presentation transcript:

1 Süsteemprogrammeerimine C# keeles (Microsoft.NET,.NET Framework 2.0) Vladimir Kjahrenov

2 What Is.NET? (1) Unified development, regardless of language  Common functionality available via a class library – language independent  Integrated Development Environment that behaves similarly for all languages Unified development, regardless of platform  Class library, templates, etc. allow development on many platforms  Web development, desktop development, mobile development are all programmed in the same type of fashion

3 What Is.NET? (2) Unified development, regardless of…operating system?  In theory, quite possible -.NET applications could be run on other operating systems! Just need the key.NET elements ported to the platform  Such efforts already exist – Mono (.NET apps on *nix), Rotor (open source.NET CLI)  Microsoft is supporting and even sponsoring many of these initiatives

4 Microsoft. NET.NET is NOT a new operating system.NET is a new infrastructure (Windows, Web based).NET delivers software as Web Services.NET is a framework for universal services.NET is a server centric computing model.NET will run in any browser on any platform.NET is based on the newest Web standards.NET Framework is FREE (including the compilers!).NET development is made MUCH easier by using Visual Studio.NET

5 .NET Internet Standards HTTP, the communication protocol between Internet Applications XML, the format for exchanging data between Internet Applications SOAP, the standard format for requesting Web Services UDDI, the standard to search and discover Web Services

6 .NET Benefits Productivity Increases  Reduced development time (class library, more efficient coding constructs) - example  Keep existing language skills intact  Allows more interoperation between developers Better Code  Means less support and help desk calls!  Again, accomplished in large part by the class library  Also due to better coding constructs and patterns Faster Code  Fewer lines of code  Better memory management  JIT compiling

7 Technical Advancements (1) The Class Library! (FCL)  No longer need languages like C++ to get difficult tasks accomplished  Don’t have to rely on the Win32 API (though you still can)  Continuing evolution New Languages  C# (C-Sharp) The power of C++, the ease of Java Ideal candidate for new development  Visual Basic.NET Not just a new version of Visual Basic Brings new functionality to the platform – has almost all the power of any other.NET language, including C++ Very easy to pickup by current VB developers

8 Technical Advancements (2) Interoperability  You don’t need to get rid of existing code! Upgrade it Connect to it  You can use.NET from legacy applications Expose.NET components as COM (ActiveX) objects Transparent calling  Interoperate with other platforms Connect with Java Connect with objects on other platforms: Unix/Linux, mainframes

9 Interoperability - Databases Data is all-important to the.NET strategy Built in “managed providers” for SQL Server, and now for Oracle  Managed providers are much faster than their ODBC counterparts  Can be easier to use as well Other databases are not left out – Access, DB2, MySQL, etc. can be handled through the OLEDB provider Non-traditional “databases” like Excel can also be accessed easily

10 Advancements in Web Applications Web Services  A very big selling point for.NET -.NET was built with web services in mind!  Very easy to build web services – usually involves adding one line of code to an object  Even easier to consume web services, including those running on Java platforms ASP.NET  Forget everything you knew about ASP  ASP.NET applications can be built in any.NET language  They are compiled – very high performance  Useful tools built into Visual Studio WYSIWYG interface for design Drag and drop components on to forms Validation, authentication and other objects are easily leveraged

11

12 New.NET Software Windows.NET  Windows Vista Office.NET  Microsoft Office 2007 ASP.NET Visual Studio.NET

13 .NET’s Future Windows VISTA  A whole new set of programming interfaces – bye- bye Win32!  New advancements in technology Avalon, a whole new graphics interface WinFS, a new file system architecture Indigo, unified messaging

14 Visual Studio (.NET) 2005 “Design” and “Code” views Help IntelliSense Keyboard Mapping

15 C# Overview Object oriented Everything belongs to a class  no global scope Complete C# program: using System; namespace ConsoleTest { class Class1 { static void Main(string[] args) { … } }

16 C# Overview (2) C# is the first “component oriented” language in the C/C++ family Component concepts are first class:  Properties, methods, events  Design-time and run-time attributes  Integrated documentation using XML Enables one-stop programming  No header files, IDL, etc.  Can be embedded in web pages

17 C# Overview (3) Garbage collection  No memory leaks and stray pointers Exceptions  Error handling is not an afterthought Versioning  Pervasive versioning considerations in all aspects of language design

18 Hello World using System; class Hello { static void Main() { static void Main() { Console.WriteLine("Hello world"); Console.WriteLine("Hello world"); }}

19 C# Program Structure Namespaces  Contain types and other namespaces Type declarations  Classes, interfaces, delegates Members  Constants, fields, methods, properties, indexers, events, operators, constructors, destructors Organization  No header files, code written “in-line”  No declaration order dependence

20 Statements and Comments Case sensitive (myVar != MyVar) Statement delimiter is semicolon ; Block delimiter is curly brackets { } Single line comment is // Block comment is /* */  Save block comments for debugging!


Download ppt "Süsteemprogrammeerimine C# keeles (Microsoft.NET,.NET Framework 2.0) Vladimir Kjahrenov."

Similar presentations


Ads by Google