API in C#: The Best Practices of Design and Implementation

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

4.30 (955 reviews)
Udemy
platform
English
language
Software Engineering
category
instructor
API in C#: The Best Practices of Design and Implementation
7,164
students
3.5 hours
content
Jul 2020
last update
$79.99
regular price

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

Why take this course?

            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

Screenshots

API in C#: The Best Practices of Design and Implementation - Screenshot_01API in C#: The Best Practices of Design and Implementation - Screenshot_02API in C#: The Best Practices of Design and Implementation - Screenshot_03API in C#: The Best Practices of Design and Implementation - Screenshot_04

Reviews

Uma
January 1, 2024
some topics are good but it hard to connect the dots, does not lead API best practices rather covering few C# best practices.
Jacqueline
July 5, 2023
Presenter is too long winded. No programming howto's. It is all his experience vs training to a beginner. Material too advanced until developer has more experience. Changed to 1 star because information is too in-depth for someone with very little exposer to C#/.Net/API.
Johnathan
March 20, 2023
It went a lot deeper than I expected in some areas. It stretched me for sure. The content was very useful and well presented. I enjoyed the occasional light hearted humor.
LeAnn
March 9, 2023
it's the kind of things you wish were taught when you originally learned coding. - It is like learning the correct grammar for the the first time. And it is 100% Necessary if you want to be a pro-grammar programmer.
Federico
April 27, 2022
Sometimes the lessons are well-presented and clear. The summary is good also. But other times isn't clear the real point of the lesson and they are explained too briefly.
Zahir
March 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.
V.SivaRamaKrishnaRaju
August 23, 2021
audio or voice is not clear, bit difficult to understand these in depth concepts with this audio/ voice quality
Jose
August 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.
Petr
January 8, 2021
I am missing examples in this course. It is kind of heavy topic and more examples would be helpful. Also - it is really similar to your other course "Master the Art of Writing Clean Code in C#" I am a bit disappointed
Grigory
September 1, 2017
The course contains a lot of useful programming tips. The author is very knowledgeable. However, I expected to hear more on API design from system level prospective. For instance, I would like to see more examples on how to avoid dependencies, how to balance conding to interfaces vs concrete classes, how to make components independent, how to design interfaces between components and so on. Overall, it's a great course, definitely worth the money!
Nathan
May 29, 2017
I would recommend Elias courses for any level of C# development. I would highly recommend students leaving from a university setting pursue his expertise knowledge through any number of his courses. This is 5 Star based on content and delivery.
Costantino
March 18, 2017
This course is very useful to understand what types of problems you may encounter either "code level" or "architectural level"
Jennifer
February 11, 2017
This is great advice to live by that we all violate at some point, much to someone's pain later on (maybe even our own). Most of this is well known to anyone working in a studio with strict coding standards, but the more visibility on good practices, the better for all of us! Having so much good advice in such a concise format is very nice.
Pierre
December 8, 2016
Some very important topics are discussed, but after nearly completing the course I think it's missing opportunities to apply some concepts in the IDE. Displaying live examples instead of static slides would really benefit viewers. Especially in the exceptions section. It's still provides a good short summary on programming concepts.
Ed
November 24, 2016
I really liked the content of this course. It gives motivation and straight-forward examples of the monadic result pattern and the maybe monad. The presentation seems rushed throughout though, and doesn't offer any opportunities to "play along at home". I would like to so a deeper project-oriented version of this course...

Charts

Price

API in C#: The Best Practices of Design and Implementation - Price chart

Rating

API in C#: The Best Practices of Design and Implementation - Ratings chart

Enrollment distribution

API in C#: The Best Practices of Design and Implementation - Distribution chart

Related Topics

34897
udemy ID
1/7/2013
course created date
11/20/2019
course indexed date
Bot
course submited by