Code is written once and read many, many times. Code is written and modified by people.The industry is different in many ways now, but there are some things that haven’t changed and likely won’t. Taken as a whole, many of the things that SOLID really cared about-such as classes and interfaces, data hiding, and polymorphism-are no longer things that programmers deal with every day. Rather than deploying an application as a big executable that links all its dependencies together, it’s much more common to deploy a small service that talks to other services, either your own or powered by a third party. Microservices and software as a service exploded onto the scene.Because of this, the kind of logic and data hiding that used to be imperative when writing a library is no longer as important. Whereas earlier, the most common practice would be to write closed-source compiled software to be used by customers, nowadays it’s much more common for your dependencies to be open-source. Open-source software has proliferated.All this means that classes and inheritance are less important in modern software than in the past. There are also “softer” OO flavors such as Go, which has static typing but not inheritance. Even Java itself introduced lambdas! Techniques such as metaprogramming (adding and changing methods and features of objects) have gained popularity as well. Non-object-oriented paradigms, most notably functional programming (FP), are also more common in these new languages.Dynamically-typed languages such as Python, Ruby, and especially JavaScript have become just as popular as Java-overtaking it in some industries and types of companies.Since then, the changes in the software industry have been profound. The popularity of Java spawned a cottage industry of books, conferences, courses, and other material to get people from writing code to writing good code. Certainly in my university classes, Java was our language of choice and most of our exercises and lessons used it. In the early 2000’s, Java and C++ were king. I’ll dive into each letter below and explain its original meaning, as well as an expanded meaning that can apply outside of OO programming. As a whole, the SOLID principles make arguments for how code should be split up, which parts should be internal or exposed, and how code should use other code. It was proposed as a way to think specifically about the quality of object-oriented (OO) programming. SOLID is a set of principles distilled from the writings of Robert C. But in a world of multi-paradigm programming and cloud computing, do they still stack up? I’m going to explore what SOLID stands for (literally and figuratively), explain why it still makes sense, and share some examples of how it can be adapted for modern computing. The SOLID principles are a time-tested rubric for creating quality software.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |