Learn Classes with Class {} - Part 1: The introduction

By van Gulick Stéphane

Elevator Pitch

In this talk, you will learn why adding classes in your PowerShell scripts is the next step for a sysadmin to embrace. Learn through my experience, and avoid the pitfalls I have encountered while learning it. You will go, from zero to hero in this fun and technnically rich 45min presentation.

Description

This talk is the first part of a two session talk on classes. I have struggled to learn classes my self. In this talk, I want to help the audience to bypass their fears, and help them to embrace PowerShell classes. We will cover in a first part the vocabulary that is used when using classes, talk about some fundamental concepts of OOP (The four pilars) and then go through the syntax of classes (Properties, Methods, Constructors) all the way up to concepts such as overloading, inheritence and Polymorphism. The talk closes on an opening on advanced OOP concepts (Design patterns) which will be the starting point for part 2 of this talk.

Notes

I have been learning and working with Classes since they showed up in Powershell version 5.0 I have read many (many many) OOP books, and (at least) tried to applied these concepts in each of my projects. I think I am a good candidate for this topic, as I come from a ‘non-developper’ background, and I feel that a lot of the sys admins out there, face the same difficulties I had, when I started to learn to use classes. I also think that, if I managed to learn it, everybody can do it. Through out the talk, I will highlight (with humour ;)) the mistakes I have made in the past, to highlight common pittfalls that people should be aware off. I will hook the audience up with the fact that everybody already knows about OOP, but, they are simply not aware of it. This will bring confidence to the audience, and will ensure that they stick to the talk, because they have something they can relate to. Content wise, this talk will cover the basics, so that beginners have the opportunity to start learn the fundamentals of OOP programming (appropriate vocabulary, properties, methods, constructors, overloading, inheritence, overiding, polymorhism, 4 pillars). It ends on an a open question, which will lead to part two of this talk.

Part two of this talk (other submission) will go deeper in the learning process, and will actually show how classes can become really awesome, with advanced OOP concepts, applied polymorphism, design patterns, SOLID principle etc..