Yet another software guy's blog

Communicating Architecture

I have been thinking about the role of an architect in any project. Most
architects are a very smart bunch. They have many concepts that they hold in
their head. They usually have several options for any problem they encounter. This does not
mean that they have to explain that to everyone. I believe that if you have to take more than
2 minutes to explain, conceptually, how the architecture is expected to work,
they have failed to do right by the stakeholders.

I imagine there are several stakeholders to what architects communicate.

  • Development team
  • Development managers
  • Product team
  • QA
  • Sales/Service
  • Marketing

Each of them are looking for assurences that the solution would a) solve and
b) within budget. They usually dont care about the gyrations we went through to come to that place.
The fact that we have explored many options and came up with
an optimal solution, while interesting to other architects, is more often than
not, confusing to pretty much every other constituency.

I also believe that if we are not able to communicate clearly, the onus is on us, as architects, to clean up communication rather than blaming the listener.

Of course, there are applications that might not fit this mold. But such applications likely have stakeholders of similar cadre.

This stream of consciousness is written with Vimpress

PlantUML

I am not sure how many people care about this anymore but UML still is a very effective way to communicate with other developers when the architecture is complex enough. Particularly when it comes to sequences of events that need to be described, one sequence diagram seems to make a big difference.

Recently, I was writing a document regarding a particular architecture that needed several class diagrams/sequence diagrams et al. I started out using “Enterprise architect”  which is okay but it is way too heavy weight and it comes with a lots of bells and whistles. To top it, at the end of it all, it generates crapload of stuff that dont contribute materially to my actual documentation of the architecture. And, It needed me to have windows box around to put that together. The next option was running visio or OmniGraffle but for both of them, it was way too much work to make the sequences to appear exactly the way I wanted it to show up.

So, I started looking for tools and I came across PlantUML. Between PlantUML and GraphViz, I can now do everything I want staying within vim. I  prefer using text based tools to generate images since it is easier to keep it up to date and archive and  edit with Vim. And PlantUML, is perfect for that.

It generates sequence diagrams without anything else and since it is a java application, it actually works on a mac like a charm. If you want to generate class diagrams and others, you need to install Graphviz. Note that on Mountain Lion, I had to install libtool before I could successfully run it but it was well worth it.

In PlantUML, it is extremely easy to create sequence diagram.

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml

generates this image.

And it has so many plugins, It is amazing.

Syntax is simple enough and the documentation on the site is very easy to follow. Now, I can do my documentation within Vim between markdown and PlantUML/GraphViz.

I am one happy architect..

Hedonic treadmill and software

After all the hoopla about iPhone 5 release, the bashing has started. I am finding a lot of complaints such as this which are essentially complaining that iOS looks the same. I think now I understand what “hedonic treadmill” means and all the techno journalists have climbed it.

Both as a software developer and as a consumer, we always seem to reach a plateau where we seem to be almost unhappy if we are not getting the next dose of our innovation fix. Be it by adding NoSQL DB when clearly a RDBMS would suffice (i know it is not directly related to innovation fix, but I am sure the developer surely thought that the newer is better and added to it the benefit of doing something new) or getting the latest iPhone.

What is my point? you ask. when evaluating a new technology, I think as developers we should always keep in mind if it is just another attempt to keep being on the treadmill.

Buy vs. Build

In any architectural discussion, there comes a point when we raise the inevitable question. Buy or Build? Lets say that we are thinking of  implementing a new feature to the application.  If we do it by the numbers, it would be

  • Research the list of frameworks
  • Go through the pros/cons of each of the tools
  • Meet with experts and work with them to understand their requirement and then see if we can use any of those tools

At the minimum, these are things we usually  see happening many enterprises because this is the ‘right’ thing to do.

But I wonder if does not give the opportunity to explore the requirements and the right behavior needed to solve the problem at hand. We end up framing our questions based on the frameworks that we would have looked at than the actual problem. This leads us down a path of lot of framework discussions that do not (or might not) fully support the actual need.

Wouldn’t it be better if we were to

  • Act as if you have to build the behavior you need
  • Put together the artifacts for that behavior
  • Then look around for 90% match with an open source project or an extensible closed source project to what you need.

I wonder if that will give us better fit in the end.

Too often, we start Buy v. Build discussion by looking around for a framework that kind of does what you think you need. And that leads the witness and makes you essentially infected with the framework of choice.

What is your experience?

Samsung v. Apple, what next?

Unless you have  been living under a rock for the past couple of days, you have been inundated with the news about the verdict regarding Samsung infringing on Apple patents. Obviously, everyone has opinions about whether it was right or wrong. I have some of my own. But, more interestingly, I have been thinking about what will happen next.

Android based phone makers are likely be focusing on aspects that might infringe patents more carefully. But, a bigger question is who benefits.

Fine, Apple obviously gained short term success. But, since they dont license OS out to other vendors, they basically made sure that there will be space for another competitor who is open.

Microsoft definitely gained more viability with phone makers since they will likely be less ‘controversial’.  If you follow that as the trend, I can imagine a place where, Android primarily on Motorola and Google phones, Windows on Nokia and HTC, and iOS on Apple. I wonder if Samsung would start using windows in which case Microsoft might endup becoming the ultimate winner in a fight. Interesting thing is that it would have won even if Samsung had won since Android pays royalties to Microsoft anyway.

Interesting times ahead for phone makers..

Cut/Paste code and Modularity

I have been wondering about copying classes (or cut/paste inheritance)  vs.Modularity frameworks such as OSGI.

To state the problem succinctly: If you have many modules in OSGI which provide independent services, what kind of reuse do you expect with utility classes? or specific functions that might be within some classes?

  • Do you export the package from whichever bundle that has it to be usable anyone?
  • Do you build a grab-all utility bundle with unrelated classes just so you can export them?
  • Do you copy the classes that need to be reused so that modularity of the bundle is maintained with a “Shared nothing” approach?
  • Do you build application specific utility bundles?

I get the concerns with editor inheritance.

(For those who want to know) Cut and Paste:

  • Breaks DRY principle violently
  • Potentially provides subtle but different behaviors within making it hard to maintain the code
  • Goes against the grain for any self respecting software engineers

Instead you should

  • Build a class hierarchy to share functionality
  • Or better still, rethink why you need this look at the design patterns to provide you an optimization that would allow your to make sure that you are using the behavior you want.

Ok, I get that. This provides a ‘reuse’ of the behavior coded within a class or a function.

Creating a catchall utility bundle becomes a unwieldy mess all by itself with its own problems of dependency management and version management et al.

Exporting the packages directly to allow direct access to utility bundles seems to suffer the same issues of dependency and version management. Worse still, now we have arbitrary  module dependencies created and maintained just for utility classes.

The more I think about it, The question I am struggling with is: When do reuse concerns  outweigh modularity concerns? Should they ever? 

I think Reuse in the large, at the level of services provided by modules, should trump any reuse in the small, which occur by breaking the modularity concerns. But, I am not able to substantiate it with any good examples that would confirm or refute it. So, it is still an opinion that i am trying to figure out if anyone else shares the same views.

What do you think? Drop a comment.

BTW: I recently started blogging earnestly so comment on the style if you like. It is a bit of stream of consciousness and hopefully I improve over time.

Is Agile architect an oxymoron?

I have been thinking about this quite a bit for the past few days. When you consider what an architect does in any established software company (look up Software architect), they seem to have the following characteristics.

  1. They are able to work with stakeholders to generate the correct requirement definitions
  2. They are able to generate design documents that will be fit in the overall architecture of the system.
  3. They are able to (maybe) prototype their design.

This seems to make the architect part of a bygone era when the flow was clearly defined with no proper feedback.

Now there is a second school of thought which seems to re-map the architect to be a stand-in for the product owner (An Architect’s Place in Agile (randomactsofarchitecture.com).

This seems to indicate that architects are more or less trail blazers for the team which forages the forest ahead to come up with an incremental design approach that would address the next sprint’s stories.

I still think that there is a middle ground between those schools where they can be the change agents who instigate good patterns/tools/processes based on their experience and provide guidance of the same to other arms of the enterprise. But, they should still be able to dive into the local domain specific issues with code to show the same in action.

Now, that makes me wonder, Is an agile architect oxymoron? I think not. I think it depends on the viewpoint of the team that is observing the architect’s behavior. Within the team, s/he is an developer with deeper technical /domain expertise with non functional interests being considered and without, a technical product owner who can represent those non functional interests.

Well, I am still unconvinced though. Is there any need for an architect if you have really good developer with soft skills to represent the other interests or a truly technical product manager who can balance business requirements with non functional ones…

Still wondering..

That said, I am a senior software architect and I do play these roles (hopefully well) …

20120821-162929.jpg

Follow

Get every new post delivered to your Inbox.

Join 86 other followers