I'll be speaking at So Cal Code Camp (Los Angeles) on October 13 & 14. If you're not signed up yet, head over to the website to let them know you're coming: http://www.socalcodecamp.com.
Back again: IEnumerable, ISaveable, IDontGetIt: Understanding .NET Interfaces.
Abstraction Through Interfaces
When people talk about interfaces, they often refer to the User Interface -- the screens and controls that allow the user to interact with the application. But "interface" also refers to a very powerful abstraction that lets us add extensibility and loose coupling to our code.
My first encounter with interfaces was in Delphi (Object Pascal) as a junior developer. I understood what they were from a technical standpoint, but I didn't understand why I would want to use them. We went to the Borland conference every year; and as a new developer, I took the opportunity to absorb as much information as I could, even if I didn't understand most of it (this is also a great way to use Code Camp -- to experience technologies you haven't taken the time to look into yet). I was very excited because there was a session in Interfaces at the conference.
"Great," I thought, "I'll go and get some practical examples of how to use interfaces and find out why I would want to use them." So, I get to the session, sit down, and grab my notepad -- ready to spend the next hour getting a practical introduction.
The speaker gets up and starts the presentation. "So, let's say that we have an Foo class. And we also have an IBar interface."
"Noooooooooooooooo!" I screamed (well, screamed inwardly anyway). "I need practical examples. You can't use Foo / Bar / Baz examples." But that's the way it was, and I didn't get anything new out of the session. (I also talked to some of my senior developer coworkers who attended, and they didn't get anything out of it either.)
It was several more years before I had a good grounding in object oriented design and the hows and whys of abstraction. The goal of "IEnumerable, ISaveable, IDontGetIt" is to give you a jump-start to understanding interfaces. We use real examples from the .NET framework and from actual application abstractions that I have coded in my professional career.
In addition to the So Cal Code Camp on Oct 13/14, I'll also be presenting this session at the Desert Code Camp (Phoenix) on Nov 17. And if you're quick, you can also see me present this information this week at a couple of user groups.
Hope to see you at an upcoming event.
Happy Coding!
No comments:
Post a Comment