What is architecture
When something becomes too popular, there is very high probability that it will become the victim of Chinese Whispers. There will be derivatives of the original notion. At one point, it becomes so generic that it is taken for granted and used without any perceived thought. In computer world, one such victim is this word – Architecture. For example, client needs the server, what should be the architecture? Client wants to build certain software application, what should be the architecture? Developer needs to standardize software design, what should be the architecture? Client needs the website, what should be the information architecture? So many context, so many usage. In this article, we try to understand the hidden meaning of this magic word.
Architecture in computer hardware
If you try to search for books on computer hardware, you will find three major categories of books with titles as Computer Architecture, Computer Organization and Computer Architecture & Organization. Most of the content in these books revolves around few similar central ideas. Even different universities offer courses with different titles but almost same course content. So, where is the catch?
In very simple words, Computer Architecture (CA) is collective term for Computer Organization (CO) and Instruction-Set-Architecture (ISA). There is also one more component of computer architecture usually referred to as Hardware/System design that deals with all the components of modern computer system like RAM, hard disk, motherboard, etc. but excluding processor. The study of processor is usually the central topic of CO and ISA.
Instruction-Set-Architecture defines set of instructions that processor can execute. The examples of such instructions are x86, ARM, etc. ISA is just a theoretical concept. In practical, it is the Computer Organization that physically realizes this ISA. Computer organization will decide how processor will execute those instructions, how big the instruction pipeline processor will have and how it will interact with memory, bus and interrupts. Computer organization is also known by another name as microarchitecture. Intel Core architecture, Pentium 4, AMD dual core can be considered as different examples of CO. However, it should be noted that all these different microarchitectures or computer organizations mentioned above implement the same instruction set i.e. x86.
The following diagram should summarize the distinction:
Next time be careful when you wish to opt for certain course. If you wish to learn about just processor and its internal then, Computer Organization is the best course. Obviously, course in computer organization will go beyond processor but if you wish to learn not just processors but focus on other aspects of computer hardware technology, then course in Computer Architecture or System design makes more sense.
Architecture in computer software
When architecture word is used in software domain, similar confusion can arise. How can we distinguish between Architectural Style, Architectural Patterns and Design Patterns?
Just like ISA, Software Architecture Style is simply a theory or concept on paper. It is up to developer or system engineer who has to decide how he wants to implement that architectural style. So when one says that system should be implemented in service oriented architectural way, he can use 3-tier or 2-tier architecture for implementing the SOA. Somebody can even go for n-tier architecture. So these all are examples of architectural styles. Similar to SOA, REST is an architectural style.
When it comes to Architectural Pattern, it describes the solution at module or component level. It defines how various components should be connected and interacted with. MVVM (Model-View-View Model), for example, is a pattern popular in .NET community that defines how database, business logic and UI should connect with each other for certain subsystem or component. In Java, it would be MVC (Model-View-Controller). For pure front-end-designer, Un-obstructive-JS pattern where HTML serves as a structure, CSS as a presentation and JS as a controller. All three MVVM, MVC and Un-obstructive-JS are three examples of architectural patterns.
In case of Design Patterns, it is solution at code level. It defines classes, functions and interfaces between them. It is not really a readymade source code rather a description or template for how to solve a problem that can be used in many different situations. Now design patterns are again applied at different levels like algorithms, OOP patterns, functional patterns, etc. The simple example would be Factory pattern or Singleton pattern.
To summarize, we can roughly sketch up as shown in below diagram:
Architecture in business domain
The meaning of word architecture has been extended beyond the boundaries of hardware and software. The word is refined in terms like information architecture, enterprise architecture, segment architecture, solution architecture, data architecture, process architecture, etc. Some of these words have genuine meaning while others are mostly technology or marketing buzz words. Terms like information architecture have roots in user experience domain while others have roots in web 2.0 and enterprise 2.0. Understanding context of each term is beyond the context of this article and hence we will explore them in another article.