SOLID Followup
Today one of our readers, David, who contributes regularly to our editorial, submits three points we should consider when using SOLID principles.
David Writes:
It’s always good to take a “refresher course” on basic principles and practices now and then. And discussing basic principles often takes a back seat to the mechanics of basic skills or how to deal with the current emergency.
Three points worth making on the SOLID principles.
- These are based on a service orientation; separating the service provided to the client (from their perspective) from the back-room implementations. The term “information hiding” refers to (being able to) keep the client in the dark about the providers operations and resources, and this is true encapsulation. This isolates the client from changes that affect the provider, and gives the provider freedom to change and adapt.
For example, the Open Closed principle typically refers to freezing the service provided, not necessarily the implementation. In fact, sometimes you’re expected to change the implementation to hide breaking changes from the client, such as adding new lines of business.
- The second point is that you often need to balance between these principles. A lot of times they work together, but at times they provide conflicting advice. But knowing the five SOLID’s gives you the awareness to understand the issues and make these decisions in an intelligent manner.
- The third point is that DBAs have an advantage with relational databases. The query optimizers can remove some of the execution overhead caused by “wrapping” data with nesting views. In most object oriented languages, each call level introduces execution time overhead that can impact performance, and JIT compilers just can’t optimize it away. Unfortunately the SQL query optimizers can’t optimize every type of nesting (yet), but it still helps.
I look forward to more articles on this subject.
Thanks for all the feedback on the SOLID series. You can always contribute to the conversation by writing to btaylor@sswug.org.
Cheers,
Ben
SSWUGtv
With Stephen Wynkoop
Did you miss Steve’s interview with Laura Rose surrounding the question, "What is the place of socializing (texting, IM, etc) in the workplace?" Click Here to hear some answers from Laura Rose.
$$SWYNK$$
Featured White Paper(s)
All-At-Once Operations
Written by Itzik Ben-Gan with SolidQ
SQL supports a concept called all-at-onc… (read more)
Featured Script
email check constraint
An example of a check constraint for valid email adresses … (read more)