When I received a review copy of Pattern-Oriented Software Architecture For Dummies, by Bob Hanmer, one of the leaders in the Patterns community, I was intrigued. Patterns are more complicated to understand than they appear, and I wondered how a book like this could do justice to the topic. I was not disappointed.
This book is one of the few books that is a good tour through the fullness of the patterns universe. It's an easier read than many other books on Patterns, and it covers the basic concepts of what a pattern is, and gives examples of how to use patterns correctly.
The book focuses on the Patterns from the Pattern Oriented Software Architecture series and the classic Design Patterns: Elements of Reusable Object-Oriented Software book. The book wraps up with a tour through the larger pattern world, with examples from patterns in areas such as configuration management, software process, and user interaction.
Patterns are one of the most misunderstood concepts in software. Patterns are more than just what the English language definition of the word implies, and by their nature, Patterns are not novel ideas; you’ve seen them before because they work.
Because of the superficial simplicity of Patterns, using software patterns effectively can be tricky. Patterns are more than just the structure of the software. Patterns also involve the context in you apply them, and the problem that you are trying to solve. Newcomers to the concept of patterns also sometimes mistake the number of patterns in a solution with a good solution. This book does a good job of addressing these essential aspect of working with and understanding patterns.
A better title of the book might have been “Using and Understanding Patterns (for Dummies)” since I feel that most readers will walk away from the book with a better understudying of what patterns are, than about how to build architectures, but it’s a good starting point never the less. The first section of the book spends a bit more time than needed on tools and approaches for describing architecture, but the rest of the book is worth a read if you feel that you don’t understand what patterns are.
There are few books that cover that such a broad sweep of the patterns landscape so concisely. When you’re done you’ll want to read more, guided by the resource section at the end of the book. This is a good resource for a software developer who wants to learn more about patterns. Those familiar with patterns, but not patterns beyond the building block Design Patterns will find this book a good reminder that there is more to the patterns universe. This is not as thorough as a guide to architecture patterns as books like Pattern-Oriented Software Architecture Volume 1: A System of Patterns are. And it's not meant to be. But if you are looking to understand why you might care about patterns that describe working at a system level, and have not found a good resource to do this yet, this book is worth a read.
Thoughts about agile software development, software configuration management, and the intersection between them.
Showing posts with label refactoring. Show all posts
Showing posts with label refactoring. Show all posts
Monday, February 17, 2014
Sunday, November 20, 2011
Refactoring
Frank Buschmann wrote a 2-part article in the July/August and September/October issues of IEEE Software that covered an important aspect of software development: refactoring.
Yes, you'll hear the word "refactoring" spoken often in any development team, but most developers rarely discuss what refactoring is, and whether they are refactoring or doing something else, like "reengineering" or even re-writing.
I won't repeat what Frank said, as he said it quite well, but as I read the article I realized that there are some points that get lost in many teams and are worth emphasizing:
Yes, you'll hear the word "refactoring" spoken often in any development team, but most developers rarely discuss what refactoring is, and whether they are refactoring or doing something else, like "reengineering" or even re-writing.
I won't repeat what Frank said, as he said it quite well, but as I read the article I realized that there are some points that get lost in many teams and are worth emphasizing:
- Refactoring does not mean "any kind of changing." It means changing the structure of existing code to preserve functionality. In principle you are making the code "better."
- To refactor you need a way to validate that you have preserved functionality. Automated tests are probably the best way to do this. I suggest that you can't refactor without having a test plan in place. And from a practical perspective, this means automated tests.
- Refactoring is a way to improve code quality, but like other things a development teams spends time on, you you should refactor when it provides business value.
Being precise about when a change is refactoring and when it's reengineering, a rewrite, or simply changing code to add a feature helps set expectations with stakeholders and helps you as a developer better understand when you'll be done. And by thinking in terms of refactoring continuously you can deliver code more quickly, and avoid the need for reengineering or re-writing, and better be able to evaluate functionality with incremental delivery.
Refactoring is good. Not all good coding is refactoring.
Subscribe to:
Posts (Atom)
Lessons in Change from the Classroom
This is adapted from a story I shared at the Fearless Change Campfire on 22 Sep 2023 I’ve always been someone to ask questions about id...
-
My main development language is Java, but I also some work in Python for deployment and related tools. Being a big fan of unit testing I wr...
-
This is a bit off of the usual “Software Development/Agile/SCM” theme that I usually follow, but it does fit into the theme of accidental si...
-
Being a fan of Continuous Delivery , identifiable builds, and Continuous Integration: I like to deploy web apps with a visible build number...