110 likes | 241 Views
Object Oriented Design. Programming Concepts. Introduction . OO-Design is not Magic Important concepts that OO-Programming simplifies: Code Reusability Abstraction Layered Design Scalability. Code Reusability. OO-Design simplifies Code Reusability.
E N D
Object Oriented Design Programming Concepts
Introduction • OO-Design is not Magic • Important concepts that OO-Programming simplifies: • Code Reusability • Abstraction • Layered Design • Scalability
Code Reusability • OO-Design simplifies Code Reusability. • We can create a closed object and use it for other applications. • Saving time and money for future applications in design and debugging.
Code Reusability (Example) • Class with specific values • Quick and easy to program. • Code not Reusable. • Build a generic class instead (configurable) • Adds overhead Bounds Checking, Parsing etc. • Takes more time to program. • Code is Reusable.
Abstraction • A very useful tool, OO languages make this possible. • Different classes can be given a common interface. • The objects created look the same to the outside world. • Calling applications need not know the details.
Abstraction (Example) • Connecting two Clients together • LAN, WAN, serial, parallel etc. • A communication class for each of the methods could be created. • The application using these objects would not have to know the difference. • The appropriate class is chosen.
Layered Design • OO-Programming makes Layering very easy. • Objects become the building blocks. • Objects are broken down into closely related functions. • Each layer only accesses the layers directly below it. • This simplifies the application and enables multiple persons to program it.
Layered Design (Example) • A simple communications program. • It is broken down into layers. • If I want to change a lower layer I can without effecting higher layers.
Scalability • An important concept is Scalability and OO-Programming helps simplify this. • Scalability leads to lower costs since changes are easy to implement. • By breaking functions/data into objects, they can be reused to form a scalable solution to a problem. • When you think about an application you need to look at how well we can make it scale or expand.
Scalability (Example) • Basic View, lacks Scalability. • If we need to upgrade, the changes are large. • Big Picture = Scalable • We now have all the hooks to do any size network.
Conclusion • In OO-Design it is important to think about • Reusability • Abstraction • Layered Design • Scalability • These Design practices in the long run will save time and money.