SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise...

45
SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne

Transcript of SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise...

Page 1: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

SOLID is SolidEnterprise principles in OOP architectural design-phase

pattern-level constructs

Hillel Wayne

Page 2: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

SOLID

I Single responsibility

I Open–closed principle

I Liskov substitution principle

I Interface segregation principle

I Dependency inversion principle

@hillelogram

Page 3: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Why SOLID?

@hillelogram

Page 4: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Why SOLID?

@hillelogram

Page 5: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Why SOLID?

@hillelogram

Page 6: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Why SOLID?

@hillelogram

Page 7: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Why SOLID?

@hillelogram

Page 8: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Why SOLID?

@hillelogram

Page 9: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

What We Can Learn From Software History

Hillel Waynehillelwayne.com@hillelogram

Page 10: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

www.hillelwayne.com/talks/software-history

@hillelogram

Page 11: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

When you create the new classes, make sure you properlytest them and create them using SOLID principles so theywill be easier to change in the future.

If it’s too complex, it’s violating a ton of SOLID principles.

Don’t be STUPID: GRASP SOLID!

@hillelogram hillelwayne.com/talks/software-history

Page 12: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

The Process

@hillelogram hillelwayne.com/talks/software-history

Page 13: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 14: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Do you know CS?

Can you think quickly?

@hillelogram hillelwayne.com/talks/software-history

Page 15: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Do you know CS?

Can you think quickly?

@hillelogram hillelwayne.com/talks/software-history

Page 16: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

1. When did it happen?

@hillelogram hillelwayne.com/talks/software-history

Page 17: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 18: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

2. What was the context?

@hillelogram hillelwayne.com/talks/software-history

Page 19: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Primary Source

Artifacts and information from that time

Secondary Source

Information produced after the fact

@hillelogram hillelwayne.com/talks/software-history

Page 20: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 21: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 22: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Do you know CS?

Can you think quickly?

@hillelogram hillelwayne.com/talks/software-history

Page 23: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

3. What were the reasons?

@hillelogram hillelwayne.com/talks/software-history

Page 24: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Dynamic allocation

Fortran Nope

Lisps just cons it

Smalltalk copyWith: newElement

C Manual memory manipulation

@hillelogram hillelwayne.com/talks/software-history

Page 25: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Dynamic allocation

Fortran Nope

Lisps just cons it

Smalltalk copyWith: newElement

C Manual memory manipulation

@hillelogram hillelwayne.com/talks/software-history

Page 26: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Dynamic allocation

Fortran Nope

Lisps just cons it

Smalltalk copyWith: newElement

C Manual memory manipulation

@hillelogram hillelwayne.com/talks/software-history

Page 27: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Dynamic allocation

Fortran Nope

Lisps just cons it

Smalltalk copyWith: newElement

C Manual memory manipulation

@hillelogram hillelwayne.com/talks/software-history

Page 28: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Do you know CS?

Can you think quickly?

Have you used C?

@hillelogram hillelwayne.com/talks/software-history

Page 29: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Do you know CS?

Can you think quickly?

Have you used C?

@hillelogram hillelwayne.com/talks/software-history

Page 30: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Do you know CS?

Can you think quickly?

Have you used C?

@hillelogram hillelwayne.com/talks/software-history

Page 31: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

4. What does this predict?

@hillelogram hillelwayne.com/talks/software-history

Page 32: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 33: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Does anyone know of a version of Smalltalk that runs onApollo workstations? [...] i’ve heard rumors that such aprogram exists at Utah or Brown but have no firm pointers.only full Smalltalk-80 please – not little Smalltalk.

@hillelogram hillelwayne.com/talks/software-history

Page 34: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Does anyone know of a version of Smalltalk that runs onApollo workstations? [...] i’ve heard rumors that such aprogram exists at Utah or Brown but have no firm pointers.only full Smalltalk-80 please – not little Smalltalk.

@hillelogram hillelwayne.com/talks/software-history

Page 35: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 36: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 37: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 38: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 39: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

5. What are the loose ends?

@hillelogram hillelwayne.com/talks/software-history

Page 40: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 41: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Pointers require a complex form of doubly-indirectedthinking that some people just can’t do, and it’s pretty cru-cial to good programming. A lot of the “script jocks” whostarted programming by copying JavaScript snippets intotheir web pages and went on to learn Perl never learnedabout pointers, and they can never quite produce code ofthe quality you need.

That’s the source of all these famous interview ques-tions you hear about, like “reversing a linked list” or “de-tect loops in a tree structure.”

@hillelogram hillelwayne.com/talks/software-history

Page 42: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Pointers require a complex form of doubly-indirectedthinking that some people just can’t do, and it’s pretty cru-cial to good programming. A lot of the “script jocks” whostarted programming by copying JavaScript snippets intotheir web pages and went on to learn Perl never learnedabout pointers, and they can never quite produce code ofthe quality you need.

That’s the source of all these famous interview ques-tions you hear about, like “reversing a linked list” or “de-tect loops in a tree structure.”

@hillelogram hillelwayne.com/talks/software-history

Page 43: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

@hillelogram hillelwayne.com/talks/software-history

Page 44: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

Conclusion

@hillelogram hillelwayne.com/talks/software-history

Page 45: SOLID is Solid - Enterprise principles in OOP architectural design ... · SOLID is Solid Enterprise principles in OOP architectural design-phase pattern-level constructs Hillel Wayne.

www.hillelwayne.com/talks/software-history

@hillelogram hillelwayne.com/talks/software-history