intro dotnet

17
Introduction to .Net Introduction to .Net May 5, 2012 May 5, 2012

Upload: opensource-technologies-pvt-ltd

Post on 28-Jan-2015

131 views

Category:

Technology


7 download

DESCRIPTION

Dot Net Introduction Presentation

TRANSCRIPT

Page 1: Intro dotnet

Introduction to .NetIntroduction to .Net

May 5, 2012May 5, 2012

Page 2: Intro dotnet

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 dotnet

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) 2007 (v3.0)2007 (v3.0) 2009 (v3.5)2009 (v3.5) 2010 (v4.0)2010 (v4.0)

Page 4: Intro dotnet

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 5: Intro dotnet

.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 6: Intro dotnet

.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 7: Intro dotnet

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 8: Intro dotnet

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 9: Intro dotnet

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 10: Intro dotnet

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 11: Intro dotnet

.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 12: Intro dotnet

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 13: Intro dotnet

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 14: Intro dotnet

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(“Counter:System.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 Shared Sub Main(ByVal args as String( ) )as 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(“System.Console.Writeline(“Counter: ” & intCounter & Counter: ” & intCounter & “=“ & arg)“=“ & 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 15: Intro dotnet

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 16: Intro dotnet

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 17: Intro dotnet

End of The .NetEnd of The .Net