I’m probably not the worlds foremost expert in software architecture, but I’m the son of an engineer. A civil engineer. That is to say that he’s nice to most people, and it shows in his engineering, too. Software architecture is something that I understood the least when I was first learning about software development. At that stage in the game I needed to learn how to write code and didn’t grasp the critical nature of designing the code in such a way that I didnt’ have to rebuild the wheel every time I did something. “Hello, World!,” meet impulsive idea man.
As time went on and I stubbed my toes on various ideas (accidents can lead to learning) I learned more by learning how not to do things. I didn’t go to school to be a software developer, I majored in history. As the infamous quote goes, “Those who don’t learn from history are doomed to repeat it.” Boy, did I repeat myself. Eventually I learned more about how to do things the right way and more recently I learned more about Model/View/Controller (MVC) coding. Here are some architecture tips I’ve learned, hopefully you’ll find them helpful as you learn:
Consume Open Source Code
Open source code, such as WordPress, xinha and the YUI code are places I learned about software architecture – free, and usually commented. See how and why things are done. Don’t just learn a technique, learn why to use the technique by trying to see why the open source software used a technique. Check out Sourceforge.
Learn Existing Code Libraries
If you have the chance learn some coding libraries and their functions. Often you’ll find that a code library is useful in more than one place. Matt Mullenweg has said that he re-uses components from WordPress in other projects. If your software architecture doesn’t fit with these libraries then you’ve probably got more thinking to do about your architecture. Closed systems can be a headache. I’m currently learning the PHP Cake library, and that’s powerful!
Build Your Own Libraries
Build your own libraries. No, not huge open source libraries necessarily, but find snippets of code that you can re-use as needed. Know your coding style and know how it will work for you. When you’re designing the structure of your code, these libraries will play a role in this.
Go To Libraries
Libraries house books. Free for you to look at and often for you to check-out and take home to learn from. Don’t underestimate the power of a good paper, physical book 🙂 Software architecture is going to develop over time and you’re learning and reading is going to grow if you invest in it. it won’t happen by magic (usually).
Learn What Optimized Code Looks Like
I have studied optimized coding practices for every language I’ve learned. In PHP I learned about commas as concatenators, various loop type speeds, and of course MySQL optimization to help keep queries fast. Your code architecture will need to employ these things yourself.
Join a Community
Find an online forum or email list that you can participate in. You’ll quickly find out that you, too, can help others learn. This will most certainly help you develop better software architecture practices.