Top Banner
MODULAR PROGRAMMING
11
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Gram Games | Modular Programming

MODULAR PROGRAMMING

Page 2: Gram Games | Modular Programming

PROBLEMS

• Developing Facebook Implementation again and again… … and again

• Hard to read, easy to breakdown

• Bugs, bugs, bugsssss

Page 3: Gram Games | Modular Programming

BASIC PHILOSOPHY

break down your application into as small a code fragments as possible arranged neatly across a

multitude of easily understandable layout

Page 4: Gram Games | Modular Programming

MISSIONRun the BIKE!

Page 5: Gram Games | Modular Programming

TOPICS• General Knowledge

• Abstraction

• Managers

• Events

Page 6: Gram Games | Modular Programming

INTERFACE

ABSTRACT

Page 7: Gram Games | Modular Programming

LOOSE COUPLING

Page 8: Gram Games | Modular Programming

MANAGERS

GearManager BrakeManager

LightsManagerStockManager

SafetyManager

Page 9: Gram Games | Modular Programming

EVENTS

Page 10: Gram Games | Modular Programming

BENEFITS

• Delegated decisions

• Easy logic extension

• Simply scalability

Page 11: Gram Games | Modular Programming

BE CAREFUL!• SRP = Single Responsibility Principle (One Manager = One Task)

• DRY = Don’t Repeat Yourself (User Interfaces/Abstracts anywhere)

• No direct reference to other Managers! Keep it Modular!

• Build an understandable directory layout

• Always keep your listeners clean. Remove your references on destroy