Introduction to “Software Design Sutra”
A Step-by-Step approach to Good Software Design
Architecture Actual Code
Which is better?
4
S o f t w a r e D e s i g n S u t r a
Z E R O
Good Design makes Future
Changes Easier
5
• B. Tech Mechanical Engineering [1985] from IIT Madras
• Shoper [2011] – Enterprise Retail – Product Owner in Tally (Prod. Mgr. + Engg.
Mgr. + Lead Architect + Test Mgr. + L3 Support Manager)
• Hamsa [2004] – Mail Management – Launched (acquired)
• Plasma [2003] – Enterprise Task Management – ditto
• GoGet [2001] – Customer Management – ditto
• Papyrus [1995] – A Document Manager – Launched
• Konan The Kontroller [1992] – An ERP before people were excited about
ERP’s – Never Launched
Who the heck is this balding guy talking to us?
Wait!
6
Let’s Look at Code
A simple assignment
• Create a system that records attendance of an employee.
• When employee enters the office, his face gets scanned automatically.
• When employee exits the office, his face gets scanned automatically.
• Time spent in office has to be more than 7 hours for an employee to
be considered present. If at least 4 hours it is considered half day
• For people who are above grade 3 there is no minimum requirement
of number of hours to be spent.
• For people who are above grade 5 there is no attendance tracking at
all.
• For people from sales department the first scan and the last scan has
to be more than 7 hours (no minimum time spent in office) and 4
hours for half day.
S o f t w a r e D e s i g n S u t r a
O N E
Create Abstractions by Writing
Sentences and Write Code that
reflects the sentences
Sentences
• Update attendance information for employees for working days
• Get Employee Information
• Get Working dates
• Update attendance Information
• Get Scan Information for the date and update Employee Attendance
• Get Scan Information
• Update Employee Attendance
• Calculate attendance based on employee type
• Update attendance information for employees for working days
• Get Employee Information
• Get Working dates
• Update attendance Information
Write Code that reflects the sentences
• Get Scan Information for the date and update Employee Attendance
• Get Scan Information
• Update Employee Attendance
• Calculate attendance based on employee type
Write Code that reflects the sentences
The sooner you start
to code, the longer the
program will take.
Roy Carlson
S o f t w a r e D e s i g n S u t r a
T W O
Gather control flow decisions
based on the requirements into
TRANSLATORS
S o f t w a r e D e s i g n S u t r a
T H R E E
Gather control flow decisions
based on the solution into
COORDINATORS
S o f t w a r e D e s i g n S u t r a
F O U R
Gather processing /
transormation / calculation into
SERVICE PROVIDERS
S o f t w a r e D e s i g n S u t r a
F I V E
Prefer
Referentially Transparent (RT)
over Referentially Opaque (RO)
S o f t w a r e D e s i g n S u t r a
S I X
Seperate RT and RO -
TRANSLATORS,
COORDINATORS, SERVICE
PROVIDERS
S o f t w a r e D e s i g n S u t r a
S E V E N
Use INPUT INTERFACERS to
retrieve information from
external systems
S o f t w a r e D e s i g n S u t r a
E I G H T
Use DATA HOLDERS to pass
information between parts of the
system
S o f t w a r e D e s i g n S u t r a
N I N E
Use STATE HOLDERS that only
interact with TRANSLATORS to
eliminate globals
S o f t w a r e D e s i g n S u t r a
T E N
Use ITERATORS to walk over
items in a collection
S o f t w a r e D e s i g n S u t r a
E L E V E N
All Units Do One and Only One
Thing OOOT
S o f t w a r e D e s i g n S u t r a
T W E L V E
Every Entity must be True To its
NAME
Recommended Reading
Object Design
by Rebecca Wirfs-Brock and Alan McKean
DesignPatterns Explained
by Alan Shalloway and James R. Trott
The Pragmatic Programmer
by Andrew Hunt and David Thomas
Did you find that interesting, may I
request for some assistance in return?
I need
help
with a
survey
36
Mail to: gk@sameeksha.biz
Subject: Survey
Thanks Prowareness and
Anand for this opportunity

Introduction to Software Design Sutra

  • 1.
    Introduction to “SoftwareDesign Sutra” A Step-by-Step approach to Good Software Design
  • 2.
  • 3.
  • 4.
    4 S o ft w a r e D e s i g n S u t r a Z E R O Good Design makes Future Changes Easier
  • 5.
    5 • B. TechMechanical Engineering [1985] from IIT Madras • Shoper [2011] – Enterprise Retail – Product Owner in Tally (Prod. Mgr. + Engg. Mgr. + Lead Architect + Test Mgr. + L3 Support Manager) • Hamsa [2004] – Mail Management – Launched (acquired) • Plasma [2003] – Enterprise Task Management – ditto • GoGet [2001] – Customer Management – ditto • Papyrus [1995] – A Document Manager – Launched • Konan The Kontroller [1992] – An ERP before people were excited about ERP’s – Never Launched Who the heck is this balding guy talking to us? Wait!
  • 6.
  • 7.
    A simple assignment •Create a system that records attendance of an employee. • When employee enters the office, his face gets scanned automatically. • When employee exits the office, his face gets scanned automatically. • Time spent in office has to be more than 7 hours for an employee to be considered present. If at least 4 hours it is considered half day • For people who are above grade 3 there is no minimum requirement of number of hours to be spent. • For people who are above grade 5 there is no attendance tracking at all. • For people from sales department the first scan and the last scan has to be more than 7 hours (no minimum time spent in office) and 4 hours for half day.
  • 14.
    S o ft w a r e D e s i g n S u t r a O N E Create Abstractions by Writing Sentences and Write Code that reflects the sentences
  • 15.
    Sentences • Update attendanceinformation for employees for working days • Get Employee Information • Get Working dates • Update attendance Information • Get Scan Information for the date and update Employee Attendance • Get Scan Information • Update Employee Attendance • Calculate attendance based on employee type
  • 16.
    • Update attendanceinformation for employees for working days • Get Employee Information • Get Working dates • Update attendance Information Write Code that reflects the sentences
  • 17.
    • Get ScanInformation for the date and update Employee Attendance • Get Scan Information • Update Employee Attendance • Calculate attendance based on employee type Write Code that reflects the sentences
  • 18.
    The sooner youstart to code, the longer the program will take. Roy Carlson
  • 19.
    S o ft w a r e D e s i g n S u t r a T W O Gather control flow decisions based on the requirements into TRANSLATORS
  • 21.
    S o ft w a r e D e s i g n S u t r a T H R E E Gather control flow decisions based on the solution into COORDINATORS
  • 23.
    S o ft w a r e D e s i g n S u t r a F O U R Gather processing / transormation / calculation into SERVICE PROVIDERS
  • 25.
    S o ft w a r e D e s i g n S u t r a F I V E Prefer Referentially Transparent (RT) over Referentially Opaque (RO)
  • 26.
    S o ft w a r e D e s i g n S u t r a S I X Seperate RT and RO - TRANSLATORS, COORDINATORS, SERVICE PROVIDERS
  • 27.
    S o ft w a r e D e s i g n S u t r a S E V E N Use INPUT INTERFACERS to retrieve information from external systems
  • 28.
    S o ft w a r e D e s i g n S u t r a E I G H T Use DATA HOLDERS to pass information between parts of the system
  • 29.
    S o ft w a r e D e s i g n S u t r a N I N E Use STATE HOLDERS that only interact with TRANSLATORS to eliminate globals
  • 30.
    S o ft w a r e D e s i g n S u t r a T E N Use ITERATORS to walk over items in a collection
  • 31.
    S o ft w a r e D e s i g n S u t r a E L E V E N All Units Do One and Only One Thing OOOT
  • 32.
    S o ft w a r e D e s i g n S u t r a T W E L V E Every Entity must be True To its NAME
  • 33.
    Recommended Reading Object Design byRebecca Wirfs-Brock and Alan McKean DesignPatterns Explained by Alan Shalloway and James R. Trott The Pragmatic Programmer by Andrew Hunt and David Thomas
  • 34.
    Did you findthat interesting, may I request for some assistance in return?
  • 35.
  • 36.
    36 Mail to: gk@sameeksha.biz Subject:Survey Thanks Prowareness and Anand for this opportunity