C# NINJITSU
Blog: kodefuguru.com
   Email: kodefuguru@live.com
      Twitter: @kodefuguru
Facebook: facebook.com/kodefuguru
Readable
Maintainable
Most General Interface
Most General Interface




            Interface
           Inheritance
Most General Interface




         IEnumerable<T>
Most General Interface




         AsEnumerable()
Most General Interface




            DEMO
Favor Fluency
Favor Fluency




      Method
      Chaining
Favor Fluency




        Left
         To
        Right
Favor Fluency




       context
Favor Fluency




      Complex
       Types
Favor Fluency




          out
Favor Fluency




          ref
Favor Fluency




        LINQ
Favor Fluency




       DEMO
Avoid Side Effects
Avoid Side Effects




           State
Avoid Side Effects




          Purity
Avoid Side Effects




      Encapsulation
Avoid Side Effects




          DEMO
Favor Declarative Code
Favor Declarative Code




             What
             not
             How
Favor Declarative Code




         Initializers
Favor Declarative Code




                ?
Favor Declarative Code




               ??
Favor Declarative Code




             LINQ
Favor Declarative Code




            DEMO
Strive for Functional Cohesion
Strive for Functional Cohesion




                 Strive
                  for
             High Cohesion
Strive for Functional Cohesion




                 Single
              Responsibility
                Principle
Strive for Functional Cohesion




                 Helper
                 Classes
Strive for Functional Cohesion




               Extension
               Methods
Strive for Functional Cohesion




                 DEMO
Extension Over Inheritance
Extension Over Inheritance




            Extension
             Methods
Extension Over Inheritance




            Interfaces
Extension Over Inheritance




              Lego
             Classes
Extension Over Inheritance




              DEMO
Thank You
C# Ninjitsu
Upcoming SlideShare
Loading in …5
×

C# Ninjitsu

2,170 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,170
On SlideShare
0
From Embeds
0
Number of Embeds
802
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

C# Ninjitsu

  1. 1. C# NINJITSU
  2. 2. Blog: kodefuguru.com Email: kodefuguru@live.com Twitter: @kodefuguru Facebook: facebook.com/kodefuguru
  3. 3. Readable
  4. 4. Maintainable
  5. 5. Most General Interface
  6. 6. Most General Interface Interface Inheritance
  7. 7. Most General Interface IEnumerable<T>
  8. 8. Most General Interface AsEnumerable()
  9. 9. Most General Interface DEMO
  10. 10. Favor Fluency
  11. 11. Favor Fluency Method Chaining
  12. 12. Favor Fluency Left To Right
  13. 13. Favor Fluency context
  14. 14. Favor Fluency Complex Types
  15. 15. Favor Fluency out
  16. 16. Favor Fluency ref
  17. 17. Favor Fluency LINQ
  18. 18. Favor Fluency DEMO
  19. 19. Avoid Side Effects
  20. 20. Avoid Side Effects State
  21. 21. Avoid Side Effects Purity
  22. 22. Avoid Side Effects Encapsulation
  23. 23. Avoid Side Effects DEMO
  24. 24. Favor Declarative Code
  25. 25. Favor Declarative Code What not How
  26. 26. Favor Declarative Code Initializers
  27. 27. Favor Declarative Code ?
  28. 28. Favor Declarative Code ??
  29. 29. Favor Declarative Code LINQ
  30. 30. Favor Declarative Code DEMO
  31. 31. Strive for Functional Cohesion
  32. 32. Strive for Functional Cohesion Strive for High Cohesion
  33. 33. Strive for Functional Cohesion Single Responsibility Principle
  34. 34. Strive for Functional Cohesion Helper Classes
  35. 35. Strive for Functional Cohesion Extension Methods
  36. 36. Strive for Functional Cohesion DEMO
  37. 37. Extension Over Inheritance
  38. 38. Extension Over Inheritance Extension Methods
  39. 39. Extension Over Inheritance Interfaces
  40. 40. Extension Over Inheritance Lego Classes
  41. 41. Extension Over Inheritance DEMO
  42. 42. Thank You

×