Skip to content
UdemyC#Paid courseAll LevelsCertificate

API in C#: The Best Practices of Design and Implementation (Udemy.com)

Learn how to write clean code in C#. Design and implement API based on the best practices developed by .NET community.

Created by: Engineer Spock

Last updated July 2020

icon
What you will learn

  • 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

How it compares

Against the other 194 rated Udemy courses in C# on CourseDuck:

  • Rating4.1 out of 5higher than 12% of them
  • Reviews1,108#68 of 195 by number of reviews
  • Length3.4 hoursshorter than 70% of them
  • Last updatedJuly 2020earlier than 61% of them

icon
Course Description

            Learn how to design and implement types in C# so that the other developers won't hate you when using one of the types developed by you. 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. 

        You probably have already heard the following well-known statement: most code sucks. Well, this course is all about how to produce code which doesn't suck. 

        Owning skills of producing a well-designed and well-implemented types is the prerequisite for the other developers to treat you as a real professional. 

  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

icon
Udemy Discount

The discount is applied through our link. Open the course from here and Udemy's current promotional price is applied at checkout on most courses, no code to type.

Some courses are excluded from Udemy's promotions. If the price does not drop, clear your browser cookies and use the button again.

icon
Instructor Details

Engineer Spock

I'm thankful enough for that I love what I do.

I began my career as a postgraduate student participating in Microsoft ImagineCup contest.

I've been working with .NET platform since 2003. I've been professionally architecting and implementing software for nearly 7 years, primarily based on .NET platform. I'm passionate about building rich and powerful applications using modern technologies. I'm a certified specialist in Windows Applications and Service Communication Applications by Microsoft. I'm one of the coordinators of the MSK.NET User Group in Moscow.

"If it's work, we try to do less. If it's art, we try to do more." - Seth Godin.

What I can say is that software is my art.

icon
More courses by Engineer Spock

$64.99

$74.99

$11.99

$11.99

$69.99

$79.99

icon
More C# courses

$84.99

$13.99

$64.99

$19.99

$12.99

$84.99

icon
Reviews

4.1

1,108 ratings on Udemy

Select a bar to show only those reviews.Select the bar again to show every rating.

By Zahir Jacobs on 3/4/2022

I counted a few uses of the as* and sh*t expletives used by the instructor - even though he literally gives the example of not using such words in the code we write. But this is otherwise gold content. It reminds me of the book Code Complete.

By Jose Zamorano on 8/3/2021

The course is solid and contains depth of knowledge when explaining all the theoretical concepts relating to "Best practices when designing an API". The code examples are from real production project and clear. I wish there is a second part of this course when the teacher puts all the theory together and explains how to make all go cohesively in one single and uniform project so we can see first hand how to actually implement all the principles and theory in a single project.

By Denise Griffin on 10/26/2020

The presentation is good. Very informative. Easy to understand. Demonstrations were excellent!

By Anurag Dixit on 6/19/2020

Short and very informative course

By Shailen Narainsamy on 5/26/2020

Not very helpful for someone starting out as the title suggest !

By Ramakant Pol on 5/21/2020

its good course

By Tibor Ébner on 5/20/2020

Certain parts of the course are not up-to-date. C# 8 as well as earlier versions introduced several language features that give developers new tools to tackle the problems outlined throughout the course. The most obvious of those is non-nullable references, but default interface implementation (affects versioning) and local functions (makes applying the “extract till you drop” principle more favorable and practical in many cases) are also significant enough to talk about them.

By Tibor bner on 5/7/2020

Certain parts of the course are not up-to-date. C# 8 as well as earlier versions introduced several language features that give developers new tools to tackle the problems outlined throughout the course. The most obvious of those is non-nullable references, but default interface implementation (affects versioning) and local functions (makes applying the extract till you drop principle more favorable and practical in many cases) are also significant enough to talk about them.

By Ismail Ozsaygi on 4/22/2020

I bought this course to improve myself as gameplay programmer and it is going great so far!

By GHH services Lda on 2/18/2020

Could have more exercises and more practical examples than mostly theory.

By Martin Noren on 10/21/2019

I'm new to C# and liked this course.
Pros:
- The pace is good
- In general, good topics and explanations
- Good examples
Cons
- Sometimes a bit uneven with regards to what level the course is held on. Found some lectures, such as 14. Class VS Structure, 23. Implementing "Dispose" Pattern or Dealing with nulls module were too complicated to understand (apply in practise). Probably due to my knowledge level ;)

By Martin Noren on 10/9/2019

I'm new to C# and liked this course. Pros: - The pace is good - In general, good topics and explanations - Good examples Cons - Sometimes a bit uneven with regards to what level the course is held on. Found some lectures, such as 14. Class VS Structure, 23. Implementing "Dispose" Pattern or Dealing with nulls module were too complicated to understand (apply in practise). Probably due to my knowledge level ;)

Showing 12 of 60 reviews

icon
Quality Score

No CourseDuck member has rated this course yet. Taken it? Give each part a thumbs up or down.

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 82 / 100