Tuesday, February 14, 2012

My CS3718 Programming in the Small Guest Lecture experience :)

Dept of Computer Science
I had the opportunity to talk to CS3718 Programming in the Small students at Memorial University earlier this morning. The topic of discussion was an Introduction to Modular Programming using Java OSGi.
To present the concepts of modular programming using OSGi I started with a brief outline of what we mean by "modular programming", then presented a simple three tier architecture application that we could convert into an OSGi design while learning about the OSGi Framework.
The sample system was designed using packages and interface based design principles, so it would be easy to translate into OSGi Framework concepts.
Bundle Wiring Diagram.
After describing the sample system I then discussed some of the pit falls that such designs experience: code visibility control, classpath errors, and limited deployment & management support. With these ills described I then introduced the OSGi framework.
The OSGi framework is composed of three layers; module, life cycle, and service. Introducing each layer we were able to modify the original sample application to make use of the OSGi framework features.
The re-designed application eventually emerged, looking quite similar to the original design, however the new implementation could take advantage of dynamic services, move away from brittle class paths, and enjoy easier administration tasks.
It was a lot of ground to cover in a one hour lecture, I believe that a full semester course could be designed around teaching modular programming techniques and practices (perhaps we could call the course "Programming in the Large"), which would compliment their current set of software development classes nicely.
I hope the students enjoyed my talk, perhaps I'll get an invite to lecture again next semester :)

No comments: