What is Software Architecture? - Jobzinpak.com : Latest Jobs In Pakistan 2022

Thursday 22 July 2021

What is Software Architecture?

 Hey what's up guys in this article we're gonna see a concept that is commonly misunderstood and frequently used in the wrong place especially among beginners and those who are in an intermediate level in the domain which is software architecture it's been always my goal to simplify and sometimes even oversimplify concepts that sounds very confusing and intricate at the first time. So, in this article  I'm gonna introduce software architecture and try to give you enough information and detail about it to either continue and dive in or maybe you just want to include the area of the concepts in the big picture and kind of see where it fits also. I'm going to talk about architectural patterns and how they relate to software architecture itself.  

I mean are they the same are they different does it even matter we will find out in a few after that I'm gonna briefly list and give a simple explanation with some graphs about each pattern and of course.  I'm going to answer the common question that confuses many many many developers especially those who are in the phase of transitioning from beginners to the intermediate level in software development.  Which is what is the difference between architecture and design pattern? We are going to see that this is not the right question to ask actually because what developers mean in this question.

When they say architecture is not actually architecture finally we're going to conclude with some insights and additional resources if you want to get deeper in the matter so what are we waiting for let's dive in first off let me set the context here so that it would be easier for you to understand.  What I will be talking about building software is not just coding right and there is nothing new in this statement ironically most developers fail to keep this in their minds when it comes to building software and this will eventually translate to a drawback in creating the software system.  So building software is a complex activity that comprises many aspects of which coding is only a small portion and as the title of the video implies.  

We're going to talk about a very important aspect in software engineering and development which is software architecture but before that let me show you what the big picture of software engineering and development looks like in my big head I'm kidding I don't have a big head and no.  I'm sure about making jobs anyway let's discuss what is happening here so creation software involves a lot of activities which are all important and in seseri here the green box represents the whole process of software creation each yellow box represents a very important phase arose shows.  

How these phases build up on each other and each arrow represents an output from the previous phase and at the same time it is the input to the next phase so requirements engineering deals with business requirements and gathering information from stockholders that's what we'll use to build the software next.  We have analysis the process of taking all the information gathered and converting it to a meaningful form that will help software engineers start working on the real stuff after that we have the design phase this is the phase in which the architecture of the software is defined and documented and next comes the fun part the phase most developers love building and developing the software and just to note here always remember that each phase requires some sort of inputs in order to do its job ok following.  

We have testing acceptance testing and if the system is good to go we are ready to deploy and of course maintenance and keeping the system up-to-date and aligned with business requirements is essential. So this is just an overview you know a 20,000 foot view of the process of software creation now let's zoom in the part that includes the design and development phases to see what happens there so here.  We have the design phase in which we define the architecture of the software on this level we find architectural patterns quality attributes messaging etc all these stuff should be determined and in some cases.  We even define how they are going to manifest in code along with constraints all this stuff represents the input to the development phase in which we find coding paradigms design patterns - only in programming languages and all the related stuff so far so good.

Now let's get to the essence of this video because the design output is the input of the development phase the first thing that developers should care about and actually focus on is the output of the design phase.  Which is the architecture of the software before we talk about what is involved in software architecture and the important parts of it let me give you a definition of software architecture that you need to keep in mind for the rest of the video and if it doesn't make sense just reread it again and keep it in mind.  It will help a lot to easily understand software architecture and the things I will be talking about so here it is software architecture is how the defining components of a software system are organized and assembled how they communicate with each other and the constraints the whole system is ruled by let me repeat software architecture is how the defining components of a software system are organized and assembled and note here.  

That I said organized and assembled not how they are built ok how they communicate with each other and the constraints the whole system is ruled by. So if you think about it software architecture involves three major parts the first part is how the defining components of a software system are organized and some and by defining.  I mean the big major significance components and by organized and the son world I mean the overall structure of the components and this is actually. What most folks in the field mean when they say architecture they mean the overall structure of the system but it's not software architecture is more than that this first part is referred to as the architectural pattern of the system the second thing in the definition is how they communicate with each other which are the interfaces through.  

Which the components interact in other words the api's of the individual components as well as the whole system if that is needed this is what I meant by the messaging mechanism in the previous presentation lastly.  We have the constraints the whole system is ruled by these constraints are the non-functional attributes of the system or the quality attributes some developers call them the elytis of the system for example scalability resolve ability resilience adaptability etc.  I mean does the system need to have high performance does it need to be secure scalable adaptable and it's really important to respect these qualities because this part. I mean quality attributes affects the architectural pattern choice and eventually impacts the development phase in many aspects. 

So now I think you have started to see that software architecture is more than just the overall structure of the system or the architectural pattern right. However because the architectural pattern is probably the most important part in software architecture most developers just use the two terms interchangeably.  So what is this architectural pattern I'm talking about as I said before the architectural pattern is the overall structure the scaffolding upon which your code will be built and developed some examples of architectural patterns are the layered architecture. Which is common in web applications also another common one is micro-services architectural panel. 

These patterns dictate what the system will be composed of and kind of define the granularity of the components and by that I mean will be their few major components that will in turn consist of smaller components like the layered architecture or will the system be composed of relatively small independent components from the very beginning like micro-services pattern. So now you see why this is important for the development phase we can't just start coding without knowing the architectural pattern just like the Mason cannot start piling up bricks without knowing what shape. They will form what is the ultimate height the thickness and the rules they should follow but if he knows this information he may want to choose different building material according to the architect's specifications and needs. 

I think you got the point knowing the architectural pattern will help us make good decisions in the development phase and some of the important decisions are the design patterns for the components and subcomponents and this leads us to clarify the difference between architecture or better yet the architectural pattern versus the design pattern.

What is the difference well I'm kind of getting this feeling that by now you have probably inferred. What is the difference between them based on what we have seen and talked about but let's finalize that architectural parents deal with the higher level universal overall structure of the system okay more specifically as.  We've seen in the definition they deal with how components are organized and assemble design patterns however which exist in a different scope by the way the development scope they deal with how components are built this parents deal with a much lower level. 

They go deeper into components and dictate how specific components should be built okay. Now I know I said architectural patterns and design patterns exist in different skulls that's true but it doesn't mean they have nothing to do with each other developers have some sort of freedom into choosing. What kind of design pattern they want to implement but most of the times the architectural pattern chosen affects the choice of the design pattern sometimes certain design patterns are impossible to implement for some architectural patterns. So there you have it the difference has been clarified and no more confusion all right so before I conclude let me list for you the various architectural patterns that are out there. 

When it comes to architectural patterns there are two levels of classification the first is more of a high level classification. Which categorizes architectural patterns into monolithic architectures service based architectures and distributed architectures these classes comprising turn types of architectural patterns that you might have heard of before like the layered architecture pattern micro-services architectural patterns and the event-driven pattern. Let's talk about them briefly and in next videos I will address each pattern in much more detail by explaining. 

How the pattern works its advantages and limitations the common pitfalls as well as resources to learn more about each pattern in case you want to go deeper into it let me start with the most common architectural pattern the layered architectural pattern or which is commonly known as the interior pattern this pattern lend itself towards a monolithic architecture at the core. So the layered architectural pattern is the most used one in software systems and you've most likely seen it before but simply laid software systems advocate the separation of concerns in this pattern.  You'll find the software divided into the presentation layer business persistence and infrastructure layers in this pattern related functionalities are grouped together in closed modular layers the system achieves its going through the communication of these layers.  

We are well defined interfaces next we have the micro-services architectural pattern this is a service based architecture and it is not the same as they come architectural patterns service-oriented architecture both of them deal with services. But they are quite different anyway microservices pattern is characterized by independently evolvable and deployable units and the system doesn't break by adding or removing these units and these units form the whole system by some sort of coordination another well-known architectural pattern is the event-driven pattern.  

Which is a distributed architectural pattern and it consists of multiple distributed computing or event processing units that are coordinated and coupled using one of the two topologies the mediator topology or the broker topology. This pattern has an assign cuneus nature and it is used for applications that need to be highly scalable and dynamic and as you noticed. I didn't put a graph because event-driven systems could have many structures depending on the topology used the next architectural pattern is the microkernel pattern.  Which is also referred to as the plugin pattern this architectural style has two major components the core system. Which is meant to have the minimal functionalities and the plugins that are used to customize the software and add features to it.  

And as you've probably inferred this pattern has a monolithic nature but it's really flexible. Some applications of this pattern are web browsers text editors and of course operating systems from which.This pattern took its name all right two more to go here is a common one the service-oriented architecture. This pattern is used for large enterprise very complex software systems and like microservices services in this pattern are coarse-grained that means they are bigger in scope more abstract. And they are built upon each other service-oriented architecture or as a way for short is used for integrating heterogeneous software components. And it has a much wider scope than other patterns and because of that you'll find many implementations of this pattern okay the last one is the space based architecture.  

Which is sort of hybrid pattern that takes advantage of microservices event-driven and some computer science concepts and actually it is inspired by the top of space implementation which is used in concurrent distributed systems.  Basically it works through distributed caching which is an in datagrid that is shared among multiple processing units which are independent from each other these processing units are managed by a middleware that has four core components messaging grid a data grid a processing grid and a deployment manager this is a very interesting pattern that is known for its elasticity in high scalability attributes and actually.  The cloud is one implementation of it so these are the various architectural patterns in a nutshell and of course there are other ones okay. 

We have seen a lot in this article and I think it's time to conclude so let me suggest some resources you can check to understand software architecture and architectural patterns if you want to go deeper in this area all right I'm not gonna overwhelm you here so I'm gonna recommend two really great books first is software architecture in practice the third edition this book lends itself towards a more abstract guide.  It explains software architecture concepts in a very clear and easy to follow and understand way it also talks about best practices in software architecture and it deals with concepts from a pragmatic standpoint.  

Second which is the best of the best in my opinion of course if you want to be a software architect this is a must-read it's a series of books actually. It consists of four volumes and it's sort of the Bible for software architecture.  If you will pattern oriented software architecture I know it's an exhaustive guide but make sure to have it there available to you whenever you feel confused I'm sure it will save the day all right last thing.  I want to say is that there is no best architectural pattern there are only best architectural patterns for specific cases or types of software systems also its architectural pattern is characterized by certain attributes that we find in this set of quality attributes so part of choosing the quote unquote best architectural pattern is looking for architectural patterns that match the quality attributes you're looking for well that's it a brief intro to software architecture. 

No comments:

Post a Comment