We may earn an affiliate commission when you visit our partners.
Course image
Engineer Spock

It means you are going to learn how to write code of the high quality: readable, understandable and reliable.

Improve your knowledge in object-oriented programming in the context of clean coding and building types of high quality.

Read more

It means you are going to learn how to write code of the high quality: readable, understandable and reliable.

Improve your knowledge in object-oriented programming in the context of clean coding and building types of high quality.

  • Understand the characteristics of a well-designed type

  • Grasp the principles of the convenient API development

  • Write clean code, get rid of unpleasant smells

  • Learn about what exceptions are intended for and how to throw and catch them properly

  • Protect your types from the incorrect usage making them properly encapsulated.

Foundations of building object-oriented infrastructures

Despite the fact that C# is a very rich on features language, it's very common to see poorly designed and implemented types in a real world. In fact, C# is one of the richest on features language among object-oriented languages in the world nowadays. But with great power comes great responsibility. It's challenging to use all those features in a right way.

Well, this course is all about how to produce code which doesn't suck.

Content and Overview

This course is aimed at all the C# developers, from beginners to seniors. Topics which are covered in the course are relevant for all kinds of C# developers since all developers design and implement APIs. The topics complexity is very different. There are plenty of very simple topics, and at the same time, there are topics which require from you a solid C# background. There are plenty of code examples throughout this course, so you will learn both theoretical and practical material.

Starting with characteristics and principles of a well-designed type you will go further, learning how to give names for different members, how many parameters a method should take, is it a good idea to take a Boolean as a parameter of a method and much more than that.

Then you will learn what encapsulation really means. How to encapsulate a type? There are some trade-offs we will deal with encapsulating our types. There are many experienced programmers who don't know what encapsulation is in essence. Investigating this topic together we will see how to build a consistent and reliable type.

After mastering the topic of types encapsulating you will face the great problem of exceptions handling. Yep, it's a hard nut to crack. We will start from discussing a question of why do we use exceptions as a mechanism of errors handling. And why C# team didn't invent any other mechanisms?

In the end, we will look at how to fight with null values. As you may know, Tony Hoar said that the invention of a null value was his billion-dollar mistake.

To sum up, the course covers the following topics:

  • API development principles

  • How to give better names for API members and what naming conventions exist in the .NET platform and suited for C#.

  • Common problems encountered by C# developers in the process of designing and implementing APIs: classes vs structures, abstract classes vs interfaces, creational patterns vs constructors, how to implement dispose pattern (are you sure you understand this allegedly simple case?)

  • Common implementation smells such as poor naming, excessively long methods, output parameters and so on.

  • Common Architectural Design Smells such as Primitive Obsession, Hidden Dependencies, Violation of Law of Demeter and other.

  • How to deal with errors. It is surprisingly hard to develop robust software where errors handling is based on exceptions. We will find out why this is so and how to struggle with problems of error handling.

  • How to deal with Nulls. Null Vales have always been a pain the ass. NullReferenceException is a well-known and popular guest in our software. We will look at the possible ways of diminishing the disrupting power of null-values.

Teaching Approach

No fluff, no ranting, no beating the air. I esteem your time. The course material is succinct, yet comprehensive. All important concepts are covered. Particularly important topics are covered in-depth. For absolute beginners I offer my help on Skype absolutely free, if requested. Don't forget that this course has English subtitles, so if you don't understand my accent, feel free to turn them on.

Take this course and you will be satisfied.

Keywords related to the course:

  • C# Clean Code

  • C# Best Practices

  • API in C#

  • Building API in C#

  • Clean Code in C# tutorial

  • Refactoring

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • Design and implement a type or an api taking care of it's users.
  • Encapsulate types so the other programmers would not hate you.
  • Code in a good style making the code clearer in its intent.
  • Refactor the code making it much better to read and understand.
  • Throw and handle exceptions properly.
  • Decide whether to comment a particular part of the code is a good idea or not. by the way, which comments are helpful and which are not?
  • Dealing with null values

Syllabus

The main characteristics of API, main development principles. The difference between private and public API.
How to Ask Questions
Download Source Code
Read more
Join .NET Community of Students

Outline of the course "API in C#: The Best Practices of Design and Implementation".

In this lecture you'll learn what characteristics of API are important.

In this lecture you'll learn the difference between public API and private API.

In this lecture you'll learn the main development principles of API.

The conclusion for the introduction into the course "API in C#: The Best Practices of Design and Implementation".

The rules of naming API members. The standard .NET naming conventions.

The outline of the module about naming of API members.

You'll learn abour intention-revealing names, disinformative names, easily readable names, encodings, domain names, scope and length rule and other.

Learn about standard .NET naming conventions.

Conclusion for the module about naming API members.

The problems and solutions concerning API design and implementation.

The outline of the module where you'll learn how to design and implement types and their members in C#.

You'll learn the difference between class and structure in C#.

You'll learn the difference between an abstract class and an interface in C#.

You'll learn the caveats of abstract classes implementation in C#.

You'll learn how to choose between property and method in C#.

You'll learn the caveats of constructors implementation in C#.

You'll learn when to prefer a creational pattern over a constructor in C#.

You'll learn about the "Tester-Doer" pattern in C#.

You'll learn how to choose between implementing either a conversion operator or casting operator in C#.

You'll learn about the caveats of implementing method's parameters in C#.

You'll learn about the caveats of implementing the "Dispose" pattern in C#.

The conclusion for the module where you learned how to design and implement types (API) and their members in C#.

The typical smells of API implementation in C#.

The outline of the module where you'll learn the typical implementation smells of API in C#.

You'll learn about mysterious, meaningless, shortened, ambiguous names and other naming smells.

You'll learn about the violation of naming conventions. How to impose the rules of naming by harnessing the power of modern tools.

You'll learn about the smell of declaring variable on top of methods.

You'll learn about the smell of magic numbers. You'll see how to refactor them.

You'll learn abou the technique "Extract Till You Drop" which was introduced by Robert Martin (aka Uncle Bob). You'll learn the pros and cons of that technique.

You'll learn about the right using of ternary operators and how to avoid abusing them.

You'll learn about the smell of out-parameters and how refactor them out.

You'll learn about the smell of silly comments.

You'll learn about the smell of double negative if-statements.

The conclusion for the module where you learned the common smells of API implementation in C#.

Learn about the primitive obsession, hidden dependencies, violation of law of Demeter and other.

The outline of the module where you'll learn about common architectural smells in C#.

You'll learn about the primitives obsession, when developers inappropriately use primitive types for representing higher-level concepts.

You'll learn about hidden dependencies by the example of inappropriate use of the Service Locator pattern.

You'll learn the Law of Demeter and you'll see the example of the violation of that law in C#.

You'll learn about the smell of temporal coupling and how to avoid it.

In this lecture, you'll learn the functional style of building functions, without side effects.

You'll learn about the pros and cons of using switch-statements. You'll see how to refactor them into an object-oriented form.

The conclusion for the module where you learned common architectural smells in C#.

Learn about approaches to handling exceptions and different errors in C#.

The outline of the module where you'll learn about the approaches to errors handling. How to handle exceptions in C# and how to avoid them.

Learn the meaning of the "error" term. What categories of errors exist in C#.

Learn deeply what the problems accompany exceptions in C#.

Look at the common misconceptions concerning exceptions handling in C#.

Learn what strategies of exceptions handling exist in C#.

Learn about the Command-Query Separation principle.

Learns about the interconnection between errors and functional programming.

Learn what is pipelining and how to implement it via methods chaining in C#.

A sub-conclusion about exceptions handling in C#.

Learn about the built-in exception types in C#. Use them properly!

Learn the rules of implementing custom exceptions types in C#.

The conclusion for the module where you learned all nitty-gritty abour errors and exceptions handling C#.

Learn about approaches to dealing with nulls in C#: Null Object pattern, Maybe monad, Automating Null Checking with Fody, Static Analysis.

The outline of the module where you'll learn the approaches to dealing with nulls in C#.

You'll learn what the problems accompany null values.

Learn the Null Object pattern in C#.

Learn what is the Maybe monad and how to implement it in C#.

Learn how to automate null checks using the NullGuard.Fody.

Learn how the static analysis can help to struggle with nulls.

Learn about the special case (regarding null values) of returning null values.

The conclusion for the module where you learned the approaches to dealing with null values in C#.

Final Test
BONUS LECTURE

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Explores the fundamental principles of clean coding, object-oriented programming, and API development in C#, which are industry standards
Taught by Engineer Spock, an experienced C# developer with a deep understanding of clean code practices
Provides practical examples and exercises throughout the course, which helps learners apply their knowledge
Covers a wide range of topics, from design principles to exception handling, providing a comprehensive overview of C# API development best practices
Emphasizes refactoring techniques to improve code quality and maintainability
Requires some prior knowledge of C# programming, which may not be suitable for complete beginners

Save this course

Save API in C#: The Best Practices of Design and Implementation to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in API in C#: The Best Practices of Design and Implementation with these activities:
Join a study group or online community for C# developers
Provides opportunities to connect with other learners, ask questions, and share insights.
Browse courses on C#
Show steps
  • Find or join a study group or online community.
  • Actively participate in discussions and engage with other members.
  • Share your knowledge and experiences.
Review 'Clean Code' by Robert C. Martin
Provides a solid foundation in clean coding principles and best practices.
View CLEAN CODE on Amazon
Show steps
  • Read the book thoroughly, taking notes on key concepts.
  • Apply the principles to your own code or projects.
  • Discuss the book's ideas with other developers or in online forums.
Review 'Head First Design Patterns' by Eric Freeman and Elisabeth Robson
Provides an accessible and engaging introduction to design patterns.
Show steps
  • Read the book thoroughly, taking notes on key concepts.
  • Discuss the book's ideas with other developers or in online forums.
  • Apply the patterns to your own code or projects.
Five other activities
Expand to see all activities and additional details
Show all eight activities
Follow tutorials on design patterns in C#
Improves understanding of object-oriented design principles and how to apply them in C# code.
Browse courses on Design Patterns
Show steps
  • Identify specific design patterns relevant to the course.
  • Find high-quality tutorials or documentation on those patterns.
  • Follow the tutorials, implementing and experimenting with the patterns.
  • Apply the patterns in your own coding projects.
Follow tutorials on unit testing in C#
Enhances understanding of unit testing and how to implement it effectively in C#.
Browse courses on Unit Testing
Show steps
  • Identify specific unit testing concepts or frameworks relevant to the course.
  • Find high-quality tutorials or documentation on those concepts.
  • Follow the tutorials, implementing and experimenting with unit testing.
  • Apply unit testing to your own coding projects.
Practice writing clean and efficient C# code
Reinforces coding skills and solidifies understanding of clean code principles.
Browse courses on Clean Code
Show steps
  • Identify areas where you need to improve your coding skills.
  • Find coding challenges or exercises online or in books.
  • Practice writing code that adheres to clean coding principles.
  • Get feedback on your code from peers or experienced developers.
Practice implementing design patterns in C# projects
Improves proficiency in implementing and applying design patterns in C# code.
Browse courses on Design Patterns
Show steps
  • Identify specific design patterns relevant to your projects.
  • Practice implementing those patterns in your own C# projects.
  • Get feedback on your implementation from peers or experienced developers.
  • Experiment with different variations and applications of the patterns.
Create a blog post or article on a C# API design best practice
Encourages critical thinking and a deeper understanding of API design principles.
Browse courses on API Design
Show steps
  • Choose a specific API design best practice.
  • Research and gather information on the topic.
  • Write a blog post or article explaining the best practice, its benefits, and its implementation.
  • Share your content online and engage with readers.

Career center

Learners who complete API in C#: The Best Practices of Design and Implementation will develop knowledge and skills that may be useful to these careers:
Software Architect
A Software Architect is responsible for the design and development of software systems. This course teaches you the principles of API design and implementation, which could be useful for someone in this role as they would be able to design and develop software systems that are efficient and reliable.
Back-End Developer
A Back-End Developer is responsible for the coding and maintenance of a website's or application's server-side logic, APIs, and databases. Key components of the back-end include the server, application, and database. This role builds, deploys, and maintains web services and APIs, focusing on the efficiency, reliability, and reusability of code. This course goes in-depth on building types and their members in C#, which would be useful to a Back-End Developer since this type of developer builds and designs the back-end structure for websites and applications.
Web Services Architect
A Web Services Architect is responsible for the design and development of web services. This course teaches you the principles of API design and implementation, which could be useful for someone in this role as they would be able to design and develop web services that are efficient and reliable.
Full-Stack Developer
A Full Stack Developer is responsible for the development and maintenance of both the front-end and back-end of a website or application. This course teaches the principles of API development and the different types of errors that can occur, which could be useful for someone in this role.
Web Developer
A Web Developer is responsible for the design and development of websites and web applications. Key components of web development include web design, web publishing, web programming, and database management. This course discusses the design and implementation of APIs, which is useful for designing and developing web applications that can communicate with other systems.
Web Architect
A Web Architect is responsible for the design and development of websites and web applications. This course teaches the principles of API development and the different types of errors that can occur, which could be useful for someone in this role.
Mobile Architect
A Mobile Architect is responsible for the design and development of mobile applications. This course may be useful to someone in this role as it teaches how to design and build APIs, which would be useful for developing mobile applications that can communicate with other systems.
Technical Architect
A Technical Architect is responsible for the design and development of technical solutions for an organization. This course teaches the principles of API development and the different types of errors that can occur, which could be useful for someone in this role.
Cloud Architect
A Cloud Architect creates and manages cloud computing systems and services. Cloud Architects are typically responsible for designing, building, and maintaining an organization's cloud computing infrastructure, which may include public, private, or hybrid clouds. This course teaches you the principles of API development and the different types of errors that can occur, which could be useful for someone in this role.
Information Architect
An Information Architect is responsible for the design and organization of websites, intranets, online communities, and software applications. This course may be useful to someone in this role as it teaches how to design and organize APIs, which could be useful for organizing information on websites, applications, etc.
Enterprise Architect
An Enterprise Architect designs, builds, and maintains an organization's IT infrastructure. This course discusses the principles of API development and the different types of errors that can occur, which could be useful for someone in this role.
Database Administrator
A Database Administrator (DBA) is responsible for the installation, configuration, maintenance, and optimization of database systems. Responsibilities may include designing and implementing backup and recovery procedures, monitoring database performance, and ensuring data integrity and security. This course discusses the design and implementation of APIs, which may be useful for someone in this role as they would be able to implement APIs into the database systems that they manage.
Data Architect
A Data Architect is responsible for designing, building, and maintaining an organization's data architecture. This role typically requires a deep understanding of data modeling, data integration, and data governance. This course may be useful to someone in this field as it teaches how API works and how to build a consistent and reliable API.
Systems Administrator
A Systems Administrator is responsible for the installation, configuration, maintenance, and repair of computer systems and networks. This course may be useful to someone in this role as it teaches how to design and implement APIs, which could be useful for managing and maintaining computer systems and networks.
Application Architect
An Application Architect creates the frameworks and standards that software developers will use to create and maintain software systems. Some of the roles and responsibilities of this role are to design and build an application's overall architecture, create guidelines regarding user interface, data management, security, and other factors, and develop specifications and standards that must be met by software developers and programmers. The course __API in C#: The Best Practices of Design and Implementation__ may be useful for someone in this role as it delves into the complexities of API Design and Implementation, providing you with the knowledge and skills to create well-designed and efficient software systems.

Reading list

We've selected 12 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in API in C#: The Best Practices of Design and Implementation.
Is an excellent resource for learning the principles of clean coding, which are essential for designing and implementing high-quality APIs. It provides practical advice on how to write code that is readable, maintainable, and extensible.
Classic work on domain-driven design, which software design approach that focuses on creating software that is aligned with the business domain.
Collection of best practices for Java programming. It provides practical advice on how to write code that is efficient, reliable, and secure.
Practical guide to refactoring, which is the process of improving the design of existing code. It provides a step-by-step approach to refactoring, and it shows how to avoid common pitfalls.
More accessible introduction to design patterns than the previous one. It uses a visual approach to explain the concepts, and it provides plenty of examples.
Is an introduction to software testing, which is an essential part of software development. It covers a wide range of topics, including test planning, test design, and test execution.

Share

Help others find this course page by sharing it with your friends and followers:
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser