50211 : Creating Object-Oriented Solutions Using C#
|About this Course |
Working with an object-oriented language is a must have skill in today's business world. Most introductory language courses focus on the syntax, libraries, and tools of the language but fail to explain the most important aspect: How to effectively use the language to solve business problems.
This four-day instructor-led course provides students with the knowledge, principles and skills to design software solutions using Visual C# and Microsoft Visual Studio. Along the way, you will use the tools, learn the syntax, and gain experience with the core libraries that you will use every day in your development. The course is heavily hands-on, and provides the students ample opportunity to practice using the knowledge and skills in the context of creating an application. Students will be exposed to principles and best practices for creating maintainable, extensible software. Improving's instructors brings real-world experience and insight to the classroom, and students walk away with knowledge, experience, and references to enhance retention.
|Audience Profile |
This course is intended for developers with some prior programming experience who are interested in learning to program well using C# and Microsoft.NET.
|At Course Completion |
After completing this course, students will be able to:
Module 1: Using Visual Studio
Lab : Exploring Visual Studio
- Create a Solution.
- Create a Console Project.
- Create a Library Project.
- Create an Unit Test.
- Create a Class.
- Create a Main method.
- Debug an application.
- Set breakpoints in your code.
- Set exception breakpoints.
- Attach to a running project.
- Reference another project.
- Reference a third-party library.
- Write text to the console.
- Use an if statement.
Module 2: Control Structures
- Comparison Operators and Boolean Expressions
- If-Else Statements
- Switch-Case Statements
- Ternary Operator
- Is Operator
Lab : Control Structures
- Comparison Operators and Boolean Expressions.
- If-Else Statements.
- Switch-Case Statements.
- Ternary Operator.
- Is Operator.
Module 3: Object Orientation
This module introduces all the object-orientation concepts that will be used throughout the course.
Lab : Object-Oriented Concepts
Module 4: Test-Driven Development
- Automated Unit Testing
- Unit Testing Components
- Test-Driven Development
- TDD Mantra – Red, Green, Refactor
- Behavior-Driven Development
Lab : TDD Calculator
- Create a Solution
- Implement a failing test
- Make test pass
- Create Automated Unit Tests.
- Describe Test-Driven Development.
- Follow the TDD Mantra – Red, Green, Refactor.
- Describe Behavior-Driven Development.
Module 5: Defining Classes
- Class Definition
- Access Modifiers
- Main Method
- Static Members
- Instantiating Classes
- The ‘this’ Keyword
- Types and Variables
Lab : Blog – Post an Entry
- Implement a Test for ‘Post an Entry’
- Make Test Pass
- Create a class, the fundamental unit of compilation for .NET.
Module 6: Guard Clauses and Throwing Exceptions
- Throw statements
- Guard clauses
Lab : Blog – Guard Clauses
- Validate input by adding a guard clause
- Create Exceptions.
- Throw Exceptions.
- Validate Parameters through Guard Clauses.
Module 7: Arrays and Iteration
- Iteration Statements (for, while, do)
Lab : Blog – Arrays and Iteration
- Create a post with categories
- BONUS Step – Params Keyword
- Reading posts
- Create Arrays.
- Use the for, foreach, while, and do iteration statements.
Module 8: Lists
- The problem with Arrays
- Iteration Statements with Lists
Lab : Blog – Extending to a Blog Site
- Host multiple blogs
- Find posts by category of blog
- BONUS Step – Indexers
- Find site posts by category
- Comment on a post
- Describe the differences between Arrays and Lists.
- Use Generics.
- Loop through Lists.
Module 9: Interfaces
- Implementing an Interface
- Defining Interfaces
- Naming Convention
- Properties, Methods, and Events
Lab : Interfaces
- Demonstration of the “Extract Interface” Refactoring in Visual Studio
- Achieve polymorphism through the use of interfaces.
- Define custom interfaces.
- Implement multiple interfaces in a class.
Module 10: Delegates
- Defining Delegates
- Delegates as Parameters
- Static methods
Lab : Delegates
- Refactor to Delegates
- BONUS step – Lambda Expressions
- Refactoring to Visitor pattern
- Reference methods through Delegates.
- Anonymously declare Delegates.
- Reference local variables from Delegates.
Module 11: Events
- Declaring Events
- Registering interest in an Event
- Observer pattern
Lab : Events
- Subscribe to Blog
- Register for Events.
- Declare a custom Event.
- Describe how Events in C# provide looser coupling.
Module 12: Generalization, Specialization, and Inheritance using C#
- Generalization, Specialization
- 100% Rule, Is-A Rule, LSP
- Constructor Chaining
- Virtual, abstract, override, sealed, interface, base, this, protected
- UML representations
Lab : Blog – Inheritance
- Include Comments in search results
- Implement Feature
- Distinguish when inheritance should be used (or not used).
- Define virtual, abstract, override, sealed, interface, base, this, protected.
- Chain Constructors
Module 13: Assigning Resposibilities
- Law of Demeter
- Stability and Variability
- Tell between good and bad responsibility assignment.
- Apply principles for better responsibility assignment.
Module 14: Custom Iterators
- Custom Iterators
- The yield statement
Lab : IENUMERABLE
- Create EntryList for Blog
- Do selective iteration using custom iterators
Module 15: IDisposable
- .NET memory model
- The using statement
- IDisposable pattern
- Finalization Queue
- Better understand the .NET memory model.
- Use IDisposable and the using statement to manage streams and memory.
Module 16: Handling Exceptions
- Effectively handle exceptions using try, catch, finally, and throw.
- Identify some common mistakes that are made when handling exceptions.
Module 17: File I/O
Lab : Blog – Exporting the Blog
- Save Blog to file as CSV
- Read and write data to a file on the local file system.
Module 18: XML Serialization
- XML Serializer
- Serialization attributes
Lab : Blog – Exporting the Blog
- Export Blog as XML
- Use the XML Serializer to export and import their object to and from XML.
- Identify some different attributes and settings for XML Serialization.
Module 19: Modeling Domains using UML
- Attributes and Methods
- Access Modifiers
- Cardinality / Multiplicity
Lab : Improve Models
- Study existing models
- Improve models
- Use UML to communicate designs
Module 20: Modeling Smells and Refactorings
- Coupling and Cohesion
Lab : Refactoring
- Identify smells in the current implementation
- Apply refactorings
- Identify smells in a model.
- Match smells to refactorings.
Module 21: On Process
- Waterfall SDLC
- Iterative/Incremental Development
- Test-Drive Development
- Point out the benefits of iterative and incremental development.