Successfully reported this slideshow.
Make Software Soft-- Learn from A Refactoring Case赵喜鸿
Who am I?From Alcatel-LucentSoftware developerA fervent advocate of Agile methodologies11 years experience in software dev...
Why call it “Software”?
Soft• yielding readily to touch or pressure; easily  penetrated, divided, or changed in shape; not hard  or stiff• Easily ...
Is Software Soft?
Is Software Soft?http://www.codeproject.com/KB/books/SoftwareProjectSecrets1.aspx
Is Software Soft?http://gtwebmarque.com/wikis/gtwm/index.php/Project_Failure
“Reasons”and “Solutions”
Contract
Insufficient Upfront Design
More Upfront Design
Design   Reality
A Real Refactoring Case
Understand Problem Domain
Epon Management
Run On NT Board   On LT Board                  Is it soft?
Make It Softer
Update                op state                  Save to                  databaseConfiguration                  Config to ...
Observer Pattern
Listener                 “state”                     Listener                     “persist”Configuration                  ...
PonDataData-            State        Config           Fault   PM   HWWBase
PonDataData-               State          Config            Fault    PM     HWWBase        NtPonLine                   LtP...
xxxDataData-                     State        Config                    Fault           PM   HWWBase                      ...
Now
New Line Object                     Fault         State                  xxxData    PM         Config     Data-           ...
New Line Object                     Fault         State                  xxxData    PM         Config     Data-           ...
config a line                 Context                              Retrieve PM                   PM                  Confi...
Fault Handling                      Context                                    Retrieve PM                                ...
DCI ArchitectureData    What the system isContext    The Context is the class (or its instance) whose code         include...
EponMgr          Pon                 Ont                       Llid                              Uni   Is It Soft?        ...
What is the essence of the problem?
EponMgr                                  Managed Object            Pon                     Ont                           L...
ManagedObject     ManagedObject            Relation
Box   Board   Line   Service
Domain ModelBox     Board   Line    ServiceManagedObject    ManagedObject
SoftSoftware
What Missed           Domain Model              Soft  Bricks    Software Refactoring            Framework
道法自然Tao follows nature
Summary
The only thing constant is       change
Cope with Changes bymaking software soft
Heart of making software soft is Discovering the “Tao”
The way to discover “Tao” is      refactoring
“Tao” is the heart of making       software SOFTPeople are the brain to    find the heart
Thank YouContact:   xihong.zhao@gmail.com  Weibo: http://weibo.com/zhaoxihong
Questions?
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
打造真正的软件
Upcoming SlideShare
Loading in …5
×

打造真正的软件

735 views

Published on

Technical Track
From: 赵喜鸿

Published in: Business, Technology
  • Be the first to comment

打造真正的软件

  1. 1. Make Software Soft-- Learn from A Refactoring Case赵喜鸿
  2. 2. Who am I?From Alcatel-LucentSoftware developerA fervent advocate of Agile methodologies11 years experience in software development and team managementNow, refactoring a legacy telecom equipment system.
  3. 3. Why call it “Software”?
  4. 4. Soft• yielding readily to touch or pressure; easily penetrated, divided, or changed in shape; not hard or stiff• Easily molded, cut, or worked.• Easy to influence or impose upon Easy to change
  5. 5. Is Software Soft?
  6. 6. Is Software Soft?http://www.codeproject.com/KB/books/SoftwareProjectSecrets1.aspx
  7. 7. Is Software Soft?http://gtwebmarque.com/wikis/gtwm/index.php/Project_Failure
  8. 8. “Reasons”and “Solutions”
  9. 9. Contract
  10. 10. Insufficient Upfront Design
  11. 11. More Upfront Design
  12. 12. Design Reality
  13. 13. A Real Refactoring Case
  14. 14. Understand Problem Domain
  15. 15. Epon Management
  16. 16. Run On NT Board On LT Board Is it soft?
  17. 17. Make It Softer
  18. 18. Update op state Save to databaseConfiguration Config to hardware Changed
  19. 19. Observer Pattern
  20. 20. Listener “state” Listener “persist”Configuration Listener Listener “HWW” “HWW” New Listener
  21. 21. PonDataData- State Config Fault PM HWWBase
  22. 22. PonDataData- State Config Fault PM HWWBase NtPonLine LtPonLine
  23. 23. xxxDataData- State Config Fault PM HWWBase xxxLine Config State xxxData Data- Fault Base
  24. 24. Now
  25. 25. New Line Object Fault State xxxData PM Config Data- Base
  26. 26. New Line Object Fault State xxxData PM Config Data- Base Open to change?
  27. 27. config a line Context Retrieve PM PM Config Line Object Role
  28. 28. Fault Handling Context Retrieve PM ContextRetrieve State ContextRetrieveLine Context ConfigLine Context
  29. 29. DCI ArchitectureData What the system isContext The Context is the class (or its instance) whose code includes the roles for a given algorithm, scenario, or use case, as well as the code to map these roles into objects at run time and to enact the use case.Interaction The Interaction is "what the system does." The Interaction is implemented as Roles which are played by objects at run time http://www.artima.com/articles/dci_vision.html
  30. 30. EponMgr Pon Ont Llid Uni Is It Soft? Service
  31. 31. What is the essence of the problem?
  32. 32. EponMgr Managed Object Pon Ont Llid Uni Service Relation
  33. 33. ManagedObject ManagedObject Relation
  34. 34. Box Board Line Service
  35. 35. Domain ModelBox Board Line ServiceManagedObject ManagedObject
  36. 36. SoftSoftware
  37. 37. What Missed Domain Model Soft Bricks Software Refactoring Framework
  38. 38. 道法自然Tao follows nature
  39. 39. Summary
  40. 40. The only thing constant is change
  41. 41. Cope with Changes bymaking software soft
  42. 42. Heart of making software soft is Discovering the “Tao”
  43. 43. The way to discover “Tao” is refactoring
  44. 44. “Tao” is the heart of making software SOFTPeople are the brain to find the heart
  45. 45. Thank YouContact: xihong.zhao@gmail.com Weibo: http://weibo.com/zhaoxihong
  46. 46. Questions?

×