intro dot net

21
Introduction to .Net Introduction to .Net

Upload: mihir-parekh

Post on 18-Apr-2015

47 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Intro Dot Net

Introduction to .NetIntroduction to .Net

Page 2: Intro Dot Net

AgendaAgenda

IntroductionsIntroductions

What is .Net?What is .Net?

.Net Framework.Net Framework

Advantages of .NetAdvantages of .Net

Advantages of CLRAdvantages of CLR

Visual Studio 2005Visual Studio 2005

.Net Languages.Net Languages

C# vs. VB.NetC# vs. VB.Net

ResourcesResources

Page 3: Intro Dot Net

What is .Net?What is .Net?

New programming methodologyNew programming methodology Multiple Languages (VB.Net, C#, J#, Cobol.Net, etc.)Multiple Languages (VB.Net, C#, J#, Cobol.Net, etc.) JIT CompilerJIT Compiler

Primary Parts:Primary Parts: .Net Framework.Net Framework Common Language Runtime (CLR)Common Language Runtime (CLR)

RTM:RTM: 2002 (v1.0)2002 (v1.0) 2003 (v1.1)2003 (v1.1) 2005 (v2.0)2005 (v2.0)

Page 4: Intro Dot Net

.Net Framework.Net Framework

A set of approximately 3500 classes. A set of approximately 3500 classes.

Classes are divided into namespaces grouping similar classes.Classes are divided into namespaces grouping similar classes.

For organization, each class belongs to only one namespace.For organization, each class belongs to only one namespace.

Most classes are lumped into a name space called Most classes are lumped into a name space called SystemSystem System.Data: DB accessSystem.Data: DB access System.XML: reading/writing XMLSystem.XML: reading/writing XML System.Windows.Forms: Forms manipulationSystem.Windows.Forms: Forms manipulation System.Net: network communication.System.Net: network communication.

Page 5: Intro Dot Net

.Net Framework.Net Framework

Supports Web StandardsSupports Web Standards HTMLHTML XMLXML XSLTXSLT SOAPSOAP WSDL (Web Services)WSDL (Web Services)

ADO.Net: ActiveX Data ObjectsADO.Net: ActiveX Data Objects

ASP.Net: Active Server PagesASP.Net: Active Server Pages

ILDASM: A tool used to properly display IL in a human ILDASM: A tool used to properly display IL in a human readable format. readable format.

.Net Compact Framework (mobile devices).Net Compact Framework (mobile devices)

Page 6: Intro Dot Net

Advantages of .NetAdvantages of .Net

Write once, run everywhereWrite once, run everywhere

Multiple programming languages (20+)Multiple programming languages (20+)

Coding ReductionCoding Reduction ControlsControls Template projectsTemplate projects IIS/Cassini supportIIS/Cassini support

Ease of DeploymentEase of Deployment

Security FeaturesSecurity Features Evidence-based security Evidence-based security Code access security Code access security The verification process The verification process Role-based security Role-based security Cryptography Cryptography Application domainsApplication domains

Page 7: Intro Dot Net

Advantages of CLRAdvantages of CLR

JIT allows code to run in a protected environment as JIT allows code to run in a protected environment as managed code. managed code.

JIT allows the IL code to be hardware independent. JIT allows the IL code to be hardware independent.

CLR also allows for enforcement of code access security.CLR also allows for enforcement of code access security.

Verification of type safety.Verification of type safety.

Access to Metadata (enhanced Type Information)Access to Metadata (enhanced Type Information)

Page 8: Intro Dot Net

Advantages of CLRAdvantages of CLR

Support for developer services (debugging)Support for developer services (debugging)

Interoperation between managed code and Interoperation between managed code and unmanaged code (COM, DLLs).unmanaged code (COM, DLLs).

Managed code environmentManaged code environment

Improved memory handlingImproved memory handling

Improved “garbage collection”Improved “garbage collection”

Page 9: Intro Dot Net

Web App BenchmarkWeb App Benchmark

Page 10: Intro Dot Net

Distributed TransactionsDistributed Transactions

Page 11: Intro Dot Net

Web Service ThroughputWeb Service Throughput

Page 12: Intro Dot Net

Visual Studio 2005Visual Studio 2005

IDE for .Net developmentIDE for .Net development

Dotfuscator encryption toolsDotfuscator encryption tools

Cassini (IIS)Cassini (IIS)

Application Testing CenterApplication Testing Center

Team Suite for project managementTeam Suite for project management

Express versions (free)Express versions (free)

VB6 to VB.Net conversion wizardVB6 to VB.Net conversion wizard

Page 13: Intro Dot Net

.Net Programming Languages.Net Programming Languages

1.1. Visual Basic.NetVisual Basic.Net2.2. C#C#3.3. APLAPL4.4. Fortran Fortran 5.5. Pascal Pascal 6.6. C++ C++ 7.7. Haskell Haskell 8.8. Perl Perl 9.9. Java Language Java Language 10.10.Python Python 11.11.COBOL COBOL 12.12.Microsoft JScriptMicrosoft JScript

13. RPG 14. Component Pascal 15. Mercury 16. Scheme 17. Curriculum 18. Mondrian 19. SmallTalk 20. Eiffel 21. Oberon 22. Standard ML 23. Forth 24. Oz

Page 14: Intro Dot Net

C# vs. VB.NetC# vs. VB.Net

Differences lie in:Differences lie in:

1.1. SyntaxSyntax

2.2. Object Oriented FeaturesObject Oriented Features

3.3. Visual Studio.Net IDEVisual Studio.Net IDE

Page 15: Intro Dot Net

C# vs. VB.NetC# vs. VB.Net

C#C#

No Auto Case adjustNo Auto Case adjust

Requires “{, }, ;”Requires “{, }, ;”

Enforces programming Enforces programming rules.rules.

Unsafe BlocksUnsafe Blocks

Documentation Documentation CommentsComments

Operator OverloadingOperator Overloading

VB.NetVB.Net

Auto case adjustAuto case adjust

No line No line terminatorsterminators

Requires “Begin, Requires “Begin, End”End”

Still intended as Still intended as RAD tool.RAD tool.

Allows late Allows late bindingbinding

Page 16: Intro Dot Net

C# vs. VB.NetC# vs. VB.Net

C#C#class Appclass App{{ static void Main(string [ ] args)static void Main(string [ ] args) { { int intCounter=0;int intCounter=0;

foreach (string arg in args)foreach (string arg in args) {{

System.Console.WriteLine(“CounterSystem.Console.WriteLine(“Counter:” + intCounter.ToString() + “=“ + :” + intCounter.ToString() + “=“ + arg);arg);

} //end of foreach} //end of foreach

} //end of Main()} //end of Main()

} //end of App{}} //end of App{}

VB.NetVB.NetClass AppClass App

Shared Sub Main(ByVal args as Shared Sub Main(ByVal args as String( ) )String( ) )

Dim arg as StringDim arg as String

Dim intCounter as IntegerDim intCounter as Integer

For Each arg in argsFor Each arg in args

System.Console.Writeline(“CouSystem.Console.Writeline(“Counter: ” & intCounter & “=“ & arg)nter: ” & intCounter & “=“ & arg)

Next ‘For Each loopNext ‘For Each loop

End Sub ‘end of Main()End Sub ‘end of Main()

End Class ‘end of App{}End Class ‘end of App{}

Page 17: Intro Dot Net

Documentation Comments (C#)Documentation Comments (C#)

///<summary>///<summary>///A Sample Function to demonstrate C#///A Sample Function to demonstrate C#///</summary>///</summary>///<param name=“void”>This function does not receive a ///<param name=“void”>This function does not receive a

parameter. </param>parameter. </param>///<returns>Void Type</returns>///<returns>Void Type</returns>

Void SampleProc()Void SampleProc() {{ int intCounter1, intCounter2;int intCounter1, intCounter2; MessageBox.show(“Counter1=” & intCounter1);MessageBox.show(“Counter1=” & intCounter1);} //end of SampleProc} //end of SampleProc

Page 18: Intro Dot Net

C#/VB.Net MythsC#/VB.Net Myths

VB.Net is intended for use with Microsoft Office.VB.Net is intended for use with Microsoft Office.

C# is the latest release of C++.C# is the latest release of C++.

C# is easier to learn than VB.Net.C# is easier to learn than VB.Net.

To learn C#, one should first learn C++.To learn C#, one should first learn C++.

C# is more advanced than VB.NetC# is more advanced than VB.Net

C# runs faster than VB.NetC# runs faster than VB.Net

Page 19: Intro Dot Net

C#/VB.Net ConvertersC#/VB.Net Converters

C# to VB.NETC# to VB.NEThttp://www.aspalliance.com/aldotnet/examples/translate.aspx

http://www.kamalpatel.net/ConvertCSharp2VB.aspx

VB.Net to C#VB.Net to C#http://www.e-iceblue.com

http://www.vbconversions.com

Page 20: Intro Dot Net

Developer ResourcesDeveloper Resources

Microsoft Developers Network: Microsoft Developers Network: http://msdn.microsoft.com

.Net Training and Events: .Net Training and Events: http://msdn.microsoft.com/netframework/support/training/default.aspx

Deploying .Net Applications: Deploying .Net Applications: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondeployingnetframeworkapplications.asp

MSDN Events (VS.Net): MSDN Events (VS.Net): http://www.msdnevents.com

TechNet Events (SQL Server): TechNet Events (SQL Server): http://www.technetevents.com

C#/VB.Net Special Interest Group: C#/VB.Net Special Interest Group: http://www.ClevelandDotNet.info/

Page 21: Intro Dot Net

Informational ResourcesInformational Resources

.Net Overview .Net Overview http://msdn.microsoft.com/netframework/technologyinfo/overview/

What .Net means to IT ProfessionalsWhat .Net means to IT Professionalshttp://www.microsoft.com/net/business/it_pros.asp

Case Studies:Case Studies: Continental Airlines Dollar Rent A Car SystemsDollar Rent A Car Systems U.S. Army Intelligence and Security CommandU.S. Army Intelligence and Security Command Scandinavian AirlinesScandinavian Airlines

TS2 SeminarsTS2 Seminarshttp://www.ts2seminars.com/ http://www.ts2seminars.com/