Index  

Pre-requisites
What You'll Learn
What is C# 2.0?
What is .NET 2.0?
Why .NET?
Overview
Course Outline

Mission Statement  

C# 2.0/.NET 2.0: Evolutionary, not Revolutionary...

The February 2002 release of .NET 1.0 signaled the planned obsolescence of every major developer technology that Microsoft had shipped since the advent of the Windows API in 1984: .NET supersedes the Windows API, ADO, OLEDB, ASP, COM, ATL and MFC -- not to mention native C++ and Visual Basic 6.0.

But unlike the disparate technologies that preceded it, .NET 1.0 was (and is) an integrated, interwoven set of technologies that offer a consistent, intuitive approach to software development -- one that flattens the learning curve while it steepens the productivity gains of developers who use it. Breathtaking in its scope and comprehensive in its depth, .NET altered a fundamental role-defining paradigm that had been a mainstay in workstation and server software development since the early '90s: that of component-developers and component users. Instead, .NET lets developers focus their skills on crafting solutions to domain-specific problems, rather than spend all their time on plumbing (as was required by the technologies that preceded it).

Enter .NET 2.0
The release of .NET 2.0 in November 2005 signals more of the same -- but in spades. The CLR has been re-written -- principally to support Generic types, but also to support new security features -- and the Framework libraries have been extensively updated and extended: by my own research, Microsoft has nearly doubled the number of public classes and methods in .NET 2.0 over 1.x. (They've also nearly tripled the number of public properties, but many of these are wrappers for public fields that are now private or internal.) The point of .NET 2.0 is to further the goal stated above: that of moving software developers away from writing plumbing, and more towards solving domain-specific problems but with re-usable solutions.

So where Framework 1.0 was revolutionary, Framework 2.0 is evolutionary: a further evolution of the same ideas that drove the release of Framework 1.0. Among the goals of .NET 2.0:

  • Specific defects in the design and implementation of .NET have been addressed in a number of ways.
  • Re-usable types, in the form of Generics, have been introduced.
  • New classes, that encapsulate a wide number of features, have been added.
  • Sub-frameworks, such as ASP.NET and Windows Forms have been extended.

My C# 2.0 / .NET 2.0 BootCamp comes from a single need: the need to help you become successful and productive with the 2.0 release of these fine software development tools. This doesn't mean you can't take software development seriously: you can't sacrifice serious intent, good design, or effective habits. But you can learn how to be productive with .NET and enjoy the work you do even more than you have in the past. So along the way, my course will delve into design issues and porting strategies, while staying focused on building re-usable components that are assembled into applications.

In our C# 2.0 / .NET 2.0 BootCamp, you'll find that .NET is a technology that will let you leverage your C++, Java, Delphi, COM or OO development experience to create powerful, scalable, flexible applications and components that can be deployed across enterprise-wide environments. Once you've completed .NET BootCamp, you'll be ready for the real fun: implementing .NET applications.

- Richard Hale Shaw


.NET 2.0 / C# 2.0 / Visual Studio 2005 Bootcamp  

Our C# 2.0 / .NET 2.0 BootCamp is our mainstream .NET training course for software developers moving to the .NET Framework 2.0. It replaces and supersedes the old .NET BootCamp / C#, which is based on C# 1.0, Framework 1.0/1.1 and VS.NET 2003.

This course is for developers now moving to C#/.NET (it assumes no previous experience).

(If you're looking for a class to follow this one, check out the Advanced C# 2.0 / .NET 2.0 Patterns and Practices course.)

The .NET 2.0 BootCamp is based on C# 2.0, .NET Framework 2.0 and Visual Studio 2005, and it:

  • Assumes you have experience with a contemporary OO development environment and language.
  • Is a fast-paced, hands-on intensive immersion in designing and implementing .NET components and applications.
  • Is presented as 5 very long, intense days with pre-class labs, extensive homework and detailed projects for learning .NET Framework 2.0 from every perspective.
  • Contains comprehensive coverage of .NET 2.0 and C# 2.0 for those who are not familiar with .NET (see detailed outline below).
  • Is based on over 600 pages of labs and 200 pages of slides.
  • Requires that you work over 100 pages of Pre-Class labs before arriving.

In this 5-day course, you'll learn the essentials of the .NET Framework, and how to write managed code that runs under the Common Language Runtime (CLR). You'll learn the fundamentals of C# programming, as well as how to port and re-factor code from C++ and access existing COM components. In generalal, you'll learn how to build .NET components, WinForms applications, Web Form apps, and Web Services in C#.

The course is a complete immersion into .NET 2.0 development with VS2005, and covers more in 1 week than a Microsoft Certification course could offer in 4.

This course is personally taught by Richard Hale Shaw

Here's what previous students of our .NET BootCamps have said.

Register for a Public presentation of this Class

Request an On-Site presentation of this Class

BACK TO TOP


Pre-requisites  

This is a course for those who have a background in Object-Oriented programming who are ready to move to the .NET Framework. Previous experience with Visual Studio or C# isn't required.

You should already be fluent with one of the following programming languages:

  • C++
  • Java
  • Smalltalk
  • Delphi
  • Some other OO programming language (VB6 is not one, sorry)

This means you should have -- at minimum -- some familiarity with:

  • Objects
  • Classes
  • Methods
  • Inheritance
  • Polymorphism
  • Type-safety

This course is NOT for software developers who don't already have a background in OOP. For on-site presentations of this course, we can add an Introduction to Object-Oriented Programming (OOP) to the course, but this will likely mean dropping another module or adding a day to the course. If you're interested in this option, just ask.


What You'll Learn  

In this course, you'll:

  • Utilize C# as a .NET implementation language
  • Learn the differences between Console, Windows Forms, and Web applications and components
  • Document, compile, and run C# applications
  • Debug .NET components and write effective exception-handling code
  • Effectively create, use -- and understand the difference between -- reference and value variables
  • Master C# control-flow, method design and definition
  • Implement .NET collections and learn how to use them
  • Utilize OO features of C#, such as encapsulation, inheritance, polymorphism and abstraction
  • Leverage unmanaged resources from managed classes
  • Write reusable classes and components in C#
  • Overload operators
  • Define delegates and events, and implement event-handlers
  • Implement properties and indexers
  • Use predefined attributes as well as define custom attributes
  • Find attributes, dynamically, at runtime
  • Organize, create and deploy .NET assemblies 
  • Leverage the Common Language Runtime's (CLR) a Managed Environment
  • Avoid using the Global Assembly Cache -- and learn when you must use it
  • Sidestep DLL-hell with Side-by-Side Execution
  • Learn to leverage legacy COM code and DLL and invoke it from C#
  • Learn when to use Managed C++ as an alternative for leveraging DLL-based code and native C++ code
  • Build and connect to Remoting objects across process and machine boundaries
  • Learn when to use Remoting and when to use a Web Service to implement distributed applications
  • Learn the difference between Marshal-By-Value (MBV) and Marshal-By-Reference (MBR) objects
  • Learn why MBVs are strictly a by-product of MBRs
  • Learn how Events are Marshaled in Remoting scenarios
  • Use WSDL contracts to generate both client-side and server-side code in Web Services
  • Learn to use Web Service Proxies as Best Practices
  • Use the built-in Cassinni server in VS2005 to host Web Services, rather than IIS
  • Leverage State Management in ASP.NET Web Forms

  • What is C# 2.0?  

    C# 2.0 is an evolution of the C# language, extended to add a number of new capabilities to C#1.x which shipped with .NET 1.x, in February 2002.

    Where C# was already a mature programming language which compete head-on with C++, Delphi and Java, C# 2.0 offers a number of new means of letting developers create more expressive -- but reusable -- programming constructs:

    • Generics - a CLR 2.0 feature that's supported directly by the C# language, and gives you the ability to define classes, interfaces, structs, delegates and methods that are in some respect typeless until consumed, at which point, specific typing is added, for the purpose of creating more reusable constructs.
    • Nullable types - a .NET 2.0 feature for creating nullable value types, letting you store .NET structs or value types or a null so you can map them directly to database columns and XML attributes.
    • Custom iterators - generate an object that implements IEnumerator or IEnumerator<T> (an iterator) by writing a single method, vastly reducing the plumbing required to do so in C# 1.x.
    • Partial types - classes, structs and interfaces that can be defined across multiple source files in the same project to be compiled into the same .NET assembly, allowing them to be better managed and edited than types defined in a single source file.
    • Static Classes - utility classes that only allow static members, and which cannot be instantiated or derived from.
    • Anonymous Methods - the ability to define new methods and event-handlers in the context of existing ones.
    • Global namespace qualifier - the ability to clearly show when a type name comes from the outer-most namespace
    • Reference Aliases - the ability to assign logical names to reference assemblies, and use that name as an additional namespace when referencing types in that assembly.
    • Property Accesors - the ability to set different access specifiers on property getters and setters, rather than a single access specifier.
    • Delegate CoVariance - use methods with delegates where the method return value derives from the return type of the delegate.
    • Delegate ContraVariance - use methods with delegates where the method parameters derive from the parameters defined in the delegate.
    • Fixed size buffers in unsafe code - largely for InterOp.
    • #pragma warning - enable/disable warnings.

    What is .NET 2.0?  

    An evolution of .NET 1.0/1.1, .NET 2.0 extends and broadens the reach of .NET, nearly doubling the services available in terms of public classes and APIs. Many of the sub-frameworks -- ASP.NET, Windows Forms and ADO.NET -- have been extended considerably to offer many more new services, or to offer better, simpler ways to do things that required considerably more code. In some cases, .NET 2.0 offers ways to accomplish with 30% of the code what .NET 1.x required.

    Announced by Microsoft and released in early 2002, .NET is simultaneously an evolution of Microsoft's existing component framework -- COM -- along with the deployment vastly improved programming frameworks -- ADO.NET and ASP.NET -- that replace existing Windows platform technologies. Reshaped, redesigned and repackaged as a set of components, objects and libraries, the .NET Framework supercedes older procedural-based APIs (such as the Windows API) and provides richer, more productive programming languages -- C# and VB.NET – which are revolutionary in their significant flattening of the learning curve required by C++ and COM. These new technologies are part of a fully-integrated environment that will be accessible from the next release of Visual Studio, and which will be supported on Windows platforms from Win9x to Windows XP in the short term, but extensible to non-Windows platforms over the long term.

    Features of .NET include:

    • All programs initially generated as Intermediate Language code which is portable to any .NET-supportive platform
    • All programs executing as native code executables on their target processor (after JIT-compilation at installation- or load-time)
    • A managed code environment that ensures safer, more secure and type-safe execution
    • Fully integrated type information that virtually guarantees type-safe,simpler development
    • A Common Language Runtime (CLR) environment which standardizes a core set of types for all languages and platforms
    • A suite of first-class, Object-Oriented programming languages:
      • C# (pronounced C-sharp), which features the elegance of Java, the power of C++, and the productivity of Delphi
      • VB.NET, a comprehensive, Object-Oriented upgrade of Visual Basic (VB), with full access to framework services without making procedural sacrifices
      • Managed C++, for creating .NET applications without having to learn a new language, and the ability to combine managed and unmanaged code in the same binary executable
      • JScript.NET, a full OO, compiled-language upgrade from JScript of old.
    • Windows Forms, an application framework for elegantly producing rich client UIs
    • ASP.NET Web Forms, an OO, compiled language replacement for ASP, that lets you create web pages for browser clients supporting HTML 3.2 and JavaScript, while only requiring that the developer write code in C# or VB.NET (HTML and JavaScript knowledge aren't required)
    • ADO.NET:finally, an understandable, OO data access method, which replaces ADO and OLEDB, but can work with SQL Server, Oracle or any OLEDB-accessible data source
    • A rich, fully integrated set of base object and component classes which replace the Windows API
    • Access to underlying platform-specific APIs (such as the Windows API) from .NET languages
    • Access to components written using older component frameworks (such as COM) for continuing to get mileage out of COM components and ActiveX controls
    • A repackaging and reintegration of powerful enterprise component services (such as COM+) for all .NET languages and tools to use
    • Web Services, an application framework for exposing functionality across the Internet and via an Intranet, with the ease of invoking a local component

    Why .NET?  

    .NET was created with some fundamental goals in mind:

  • Increase programmer productivity by offering an intuitive, comprehensive OO development environment
  • Make component development scale more naturally for N-tier application development
  • Treat the Internet and Intranets as an integral part of application architecture and deployment
  • Programmer Productivity
    Earlier component technologies (like COM) and front-end UI frameworks (MFC and Visual Basic -- both based on the Windows API) were simply more complicated than they should have been. In the case of COM, the complexity arose because too much of the underlying plumbing -- IUnknown, QI, GUIDs, proxy-stubs -- was exposed and required direct programmer interaction when used from high-performance languages or tools (and when used from high-level languages such as Visual Basic, too much was hidden!). The objective of .NET is to abstract away the plumbing details and instead let the software developer focus on the details of putting together his/her domain-specific application or component.

    Scalable Component Development
    In the case of the Windows API, the complexity grew because the original windowing functions -- designed in 1984! -- were extended to cover areas that had little or nothing to do with windowing and UIs! Coupled with the fact that Windows as we've known it -- was designed at a time when all applications were written to be monolithic EXEs where the only notion of component development was the (limited) use of DLLs. The objective of .NET is to make N-tier application development -- via component-based architectures -- simpler and easier.

    Integral Internet/Intranet Support
    Windows was not written with the Internet or even local Intranets in mind: instead, it was extended to accommodate these over time. .NET takes these into account from the first moment you use it, so that deploying applications over Intranets or the Internet, and making these an integral part of your application architecture becomes an ordinary, day-to-day operation. Part of the way .NET takes care of this is by creating a managed execution environment based on a Common Language Runtime (CLR), where every aspect of code execution is controlled, regardless of source development language. The CRL handles memory management, provides a secure runtime environment, ensures object location transparency and provides concurrency management -- while still giving you access to underlying operating system services. Because the CLR gives you a high degree of language interoperability and component re-use, you can even use one language to derive a new class from a class written in another language. But the differences in.NET from existing technologies are substantial: it's not just syntax that you'll have to learn, but you'll have to think in n-tiers like you never did before.


    Overview of Key Course Modules  

  • Introduction to .NET
  • Fundamentals of Assemblies
  • Understanding the Common Language Runtime (CLR)
  • Assemblies as Building Blocks
  • C#: Fundamentals
  • C# Type Design
  • Understanding MetaData and Reflection
  • Implementing Managed Collections
  • .NET Components and the DataBinding Pattern
  • C# 2.0 / Framework 2.0: Generics
  • C# 2.0 / Framework 2.0: Nullable Types
  • C# 2.0: Custom Iterators
  • Delegates and Events
  • C# 2.0 Additional Features
  • Writing Database-Independent Data Access Code: ADO.NET
  • Building Desktop UIs: Windows Forms Applications and Controls
  • Building Web-Based Front-Ends: ASP.NET WebForms and Controls
  • Building Platform-Independent IPC/RPC: XML-based Web Services
  • Implementing .NET-specific IPC/RPC: .NET Remoting
  • Leveraging Legacy Code: Com Interop, Platform Invoke, Managed C++

  • Course Outline*  

     1.  Introduction to .NET

    • What is .NET? How .NET evolved from Windows and COM.
    • Deficiencies in Windows, COM and other preceding technologies
    • Key Elements of the .NET Framework.
    • Binary Compatibility: Cross-language support, the Common Type System (CTS).
    • Managed Languages: the Common Language Specification (CLS)
    • Benefits of Managed Environments
    • An overview of:
      • .NET Framework 2.0
      •  ADO.NET 2.0
      • Windows Forms 2.0
      • ASP.NET 2.0: Web Forms and Web Services
      • .NET Remoting
      • Platform Interop

     2.  Fundamentals of Assemblies

    • Manifests, Metadata, MS Intermediate Language Code

     3. Understanding the Common Language Runtime (CLR)

    • JIT Compilation and Pre-JIT, JIT verification
    • Memory Management and Indeterministic Finalization
    • How the CLR is loaded; CLR Hosting, CLR assembly locating
    • AppDomains, using .config files to re-direct CLR look-ups

     4. Assemblies as Building Blocks

    • Building components, not objects, Packaging, Deploying, and Administering
    • Side-By-Side Execution, Shared vs. Private Assemblies
    • Deploying to the Global Assembly Cache – and why not to
    • .NET versioning: eliminating DLL Hell
    • Application/Assembly Deployment, Debugging and Tracing, Remote Debugging

     5. C# Fundamentals

    • Comparing C# to C++, Java, Delphi and IDL
    • C# as a means of scripting the generation of MetaData and IL constructs
    • Using the command-line compiler
    • Program structure and keywords, Namespaces and Control Flow
    • The .NET Exception Model and C#

     6. C# Type Design

    • C# Aliases for Core .NET Types, Using the Built-in Types
    • Type Accessibility, Type Visibility, Member Accessibility
    • Operator Overloading
    • Understanding System.Object, Value Types vs. Reference Types
    • Restricting your use of Value Types – and why, boxing & unboxing
    • Ref and Out parameters, Variable-parameter methods
    • Properties as Accessor Interfaces, choosing Properties vs. Methods
    • Indexers: a special Property, Virtual Functions and Member Hiding vs. C++
    • Microsoft’s Naming conventions; RHS Group Naming conventions

     7. Understanding Metadata and Reflection

    • Introduction to MetaData: System.Type
    • ConstructorInfo, MethodInfo, FieldInfo, EventInfo,  PropertyInfo, ParameterInfo
    • Extending MetaData: Attributes; What Attributes can do – and what they can’t do
    • Attribute usage: Serialization, Components, Interop, runtime discovery

     8. Implementing Managed Collections

    • Introduction to Collections
    • How Iterators work: IEnumerator and IEnumerable
    • Simple, read-only Collections: ICollection
    • Exposing collection-like features from classes: Indexers
    • Read-write Collections: IList
    • Why CollectionBase is Evil, Collection Classes and Interfaces in .NET 1.x
    • Implementing Type-Safe Collections in C# 1.0

     9.   .NET Components and the DataBindingPattern

    • The .NET Component Model
    • The Value of Components
    • Attributes for controlling Component Property Editing
    • The DataBinding Pattern: Combining Collections and Reflection

    10. C# 2.0 / Framework 2.0: Generics

    • What are Generics? Why bother with Generics?
    • Generic types (classes, structs, interfaces and delegates)
    • How the CLR specializes Generic types; Generics in .NET vs. Templates in C++
    • Performance improvements using Generics
    • Implementing Type-Safe Collections with Generics

    11. C# 2.0 / Framework 2.0: Nullable Types

    • Why create value types that can be null? Creating Nullable types
    • Using and consuming Nullable types
    • Extensions to C# 2.0 specifically for Nullable types

    12. C# 2.0: Custom Iterators

    • Iterators the hard way: C# 1.0; Iterators the easy way: C# 2.0
    • Iterators under-the-hood; When to use IEnumerable/<T> vs. IEnumerator/<T>
    • Applying Iterators to real-world problems

    13. Delegates and Events

    • Introduction to Delegates
    • How Delegates are defined: System.Delegate and System.MulticastDelegate
    • Delegates are NOT Function Pointers; Delegates as out-going interfaces
    • Asynchronous Delegates: Begin/EndInvoke, IAsyncResult and AsyncCallBack
    • The Asynchronous Delegates Patterns
    • How Events differ from Delegates: Events are Delegates used as Properties!
    • The compiler-generated add/remove methods, and overriding them

    14. C# 2.0 Additional Features

    • Partial Types; Static Classes; Delegate CoVariance/ContraVariance/Inference
    • Variable-parameter Generic Methods
    • Anonymous methods: methods inside of methods and method-reference passing
    • Global namespace qualifier; Reference aliases
    • Property accessors with differing access specifiers
    • Creating fixed size buffers in unsafe code
    • #pragma warning

    15. Writing Database-Independent Data Access Code: ADO.NET

    • Introduction to ADO.NET
    • Database-specific Types and Interfaces: Providers
    • Using DataReaders and the DataTableReader for fast, read-only data access
    • Using, creating and querying DataSets: an in-memory table cache
    • Creating and managing 1-many and many-1 relations
    • Reading/writing XML documents into/out-of ADO.NET databases
    • Async database operations
    • Multiple Active Results Sets and Batching
    • Working with User-defined data types
    • Server Enumeration and Schema Discovery
    • .NET 2.0 Transactions

    16. Building Desktop UIs: Windows Forms Applications and Controls

    • Creating MDI-based Windows Forms apps
    • Adding event-handlers, toolbars, icons, menus and tray icons
    • Creating child dialogs and form-only applications
    • Creating Explorer-style UIs
    • WinForms 2.0 Controls
    • Building and Using Custom controls
    • Multi-language and localization support
    • ClickOnce and Manifest-based Activation
    • Application Settings

    17. Building Web-Based Front-Ends: ASP.NET Web Forms and Controls

    • ASP.NET Architecture, ASPNET_WP and the Code-Behind Page
    • VS.NET – IIS Coupling in Previous Versions; VS 2005 – IIS de-coupling
    • Understanding Postbacks: the Page class lifecycle
    • Adding Event-handling, Debugging Web Forms
    • Web Forms Controls vs. Html Controls
    • 2.0 Master Pages and Themes, Web Parts
    • 1.0 Controls, 2.0 Controls, Custom Controls
    • State Management: ViewState, SessionState and ApplicationState
    • Adding client-side validation code
    • Site Navigation and User-customization
    • ViewState, SessionState and ApplicationState
    • DataBinding and the 2.0 Provider Model, DataGrid and DataList
    • 2.0 Membership, Roles, Personalization
    • Authentication and Authorization
    • Peformance: Pre-compiling and caching
    • Web Site Administration

    18. Building Platform-Independent IPC/RPC: XML-based Web Services

    • How .NET Web Services work
    • Understanding WSDL contracts
    • Creating a .NET-based Web Service
    • Creating a Web Service Proxy via a Web Reference
    • Creating a Web Service Client
    • Testing and Debugging Web Services
    • Consuming Web Services implemented on other platforms
    • Creating proxies directly from WSDL contracts
    • Creating a Subscription Service

    19. Implementing .NET-specific IPC/RPC: .NET Remoting

    • Introduction to .NET Remoting, Remoting vs. Web Services
    • The Remoting Architecture
    • Marshal-By-Reference (MBR) objects vs. Marshal-By-Value (MBV) objects
    • Hosting and SCM replacement strategies
    • Client-Activated Objects (CAO), Single-Call Objects, Singleton Objects
    • Distributing MetaData and Assemblies
    • Working with Lease-based Lifetime
    • Remoting Events: how to do it – and how not to!
    • Using .config files for Remoting
    • Authentication/ Encryption in Remoting 2.0

    20. Leveraging Legacy Code: COM Interop, Platform Invoke, Managed C++

    • Introduction to Interop
    • Utilizing unsafe code
    • C# 2.0: Fixed-size buffers in unsafe code
    • COM Interop: building COM clients and servers in Managed Code
    • Platform Invoke: using DLLImport vs. Managed C++

    *Outline subject to change without notice.

     

     

     

     

     


    Coming Soon  


    Commentary  

    Regarding Advanced .NET 3.5-C# 3.0 Patterns and Practices BootCamp

    "Richard Hale Shaw is an inspiring teacher. I have taken two classes with him, and am now looking forward to the third..."

    --Anders Svedberg, CC-Systems AB