miércoles, 16 de marzo de 2016

The 4+1 View Model

After two weeks since my last entry today I'm going to talk about the 4+1 view model.

This blog's song will be "I'm Comin Back" (That's the actual title) by Balance and the Traveling Sounds, great mix of funk, hip-hop, enjoy.



Software can be seen from different perspectives, each of this perspectives usually specifies on one aspect of software, a programmer may see a software project as a bunch of components built together, another programmer may see the same software project as many process working together and calling other processes, a more hardcore programmer may see the same software project as a bunch of bits being carried around between secondary storage and the processor, those bits being manipulated on each step of the process (I'm talking about some hardcore assembly programmer). A Lisp programmer may see the same program as data being processed in lists. Then a Lua programmer would not see anything, as he'll be eating glue and crayons (that would be me).

The elephant and the blind men story relates one of the main problems in software development, there is many ways to see the same thing, and all of them are right in some way, but everyone is wrong when used alone. Software programs are complex systems, made up of many components, working together to acomplish something, a software architect may need to have the skills to define the combination of representations of the same thing to get the best idea of it.

The 4+1 view model is one way to approach that problem. It defines 4 main perspectives and 1 that summarizes every one of them, focusing on the easiest way to explain software to a non programming human (yes, I've come up a term for that), in fact, I'm a strong believer that humanity can be expressed as 10 types of humans, those who understand why 10, and those who actually think of the number 10. Those who binary, and those who don''t.

Putting bad jokes aside, let me discuss the 4+1 view models below.

Logical view: The blueprint for project managers, a view that explains from a high level the components of the system for someone who has to understand from high ground what the slaves are doing below. In Egyptian sphynx this blueprint would have something like definitions for (Arm, leg, hip, sphynx head, etc.).

Development view: The blueprint for programmers, the working hands of software development, the slaves putting together the bricks for each sphinx's leg. (Not being serious).
It is a lower level diagram for the people that work in specific subcomponents of the system.

Process view: The blueprint for explaining when two components will communicate. In software, this view explains mostly concurrency, server-client interactions. In my egyptian sphinx example, it will explain how the sphinx communicates with other pyramids on Egypt that are aligned with the mayan pyramids to communicate with the aliens that humanity has already invented seedless watermelons and the end is near.

Physical view: This blueprint explains how software will deploy on a physical device. In software it mosly explains the system on which the software will be installed, on my now weirder egyptian sphinx example it explains how the telepathic module was installed on the top of the pyramids and the sphinx's head.

The +1 view, use cases: I actually love to use use cases, they are a simple, effective way to explain someone who doesn't have to know implementation details how the system will work (usually that is the client).
A pretty good thing is that use cases don't deal with implementation details or the subcomponents, they just define the behaviour and the actors of the system.
Use cases are much like approaching to a girl in a bar and telling her "I have a 3-step life plan, the first step is approaching to you, the third step is being married and throwing crazy parties on our house in Dubai." and when she asks "What is the second step?" you smile and answer  "that's the part where you make a choice, would you like a drink?" (As odd as it may sound, it actually works).
In this analogy you hide all the implementation details of your plan (even the fact that you don't really have a plan). You just refer to the expected behaviour and actors of the system.
Perks of studying software architecture.

That is all for now my fellow reader(s).
Wololo.

No hay comentarios:

Publicar un comentario