Friday, May 26, 2006

Agility and the Borgs

I have been a trekkie for a long time. Maybe, because software engineers are more open minded for this kind of SciFi movies and series. In the EXPO-C conference in Karlskrona, Sweden, Jimmy Nilson and me were participating in some Open Space events after the conference day. If you wonder what an open space is about: the goal of an open space is to meet people and discuss interesting topics. For this purpose, everyone can add her/his topic to a poster hanging on a wall. Then for each of these topics people are asked to participate in meetings that take place for a fixed amount of time. It is allowed to leave a group and move to another one (if you weren't the one who came up with the topic). Works very fine to get input and feedback from smart people. In Karlskrona we discussed topics such as "when is simple too simple", "agility", "what does it need to edutacte architects", just to give you an impression. After one of those "agile" topics I was wondering how these agile processes apply to Star Trek. Strange combination of topics, you might think now. One of the points discussed at the conference was whether hierarchical structures are suitable for agile processes. Thus, I asked myself what kind of process paradigm the Borgs are using. As you know, the Borgs are known to be very rude, assimilating other creatures to integrate their knowledge and making them robots without any own will. The Borgs are controlled by a central instance - the queen - but are tightly integrated to a community of heavily communicating and interacting creatures. It seems as if the queen is in charge of providing central goals but Borgs are able to achieve these goals by any means they consider appropriate. For now, we recognize that Borgs use communication and interaction, share their knowledge with each other, can interoperate independently as groups but not as individuals, continuously share their knowledge and abilities, strive for common code ownership. It is not obvious from the series if the Borgs follow a BDUP approach or are able to refactor and refine their work in the typical case of evolving and changing requirement. However, their behavior suggests that they are capable of fastly adapting to changing contexts. Take their ability to modify the frequency of their protection shield as a prominent example. So, does the society of Borgs constitute an agile organization or do they follow a waterfall model or a kind of hybrid approach? From my guts feeling, I always thought that agility requires smart and autonomous developers who organize themselves in a P2P fashion within a project. Do hierarchies, central organization and agility denote concepts that can be combined or do they contradict themselves. Is there a dependency between organization and process paradigm? Are there any contexts in which agile processes are inappropriate. If agility means the ability to constantly adapt to changing environments and requirements, then the Borgs obviously denote an agile organization. Even in an agile process someone needs to set the goals, coordinate all activities, and control the process. Why are the Borgs so successful, anyway?

Saturday, May 06, 2006

The Problem with Metrics

From time to time I am asked what I think about evaluating software systems using metrics. The issue with most metrics is their close association to implementation artifacts. One of the wide-spread benchmarks is LOC. Measuring a software systems by lines of code does not make much sense in many cases. What does it mean that a subsystem contains a specific number lines of code? What about lines generated by model-driven software development tools, middleware generators, GUI builders, or IDEs? That does not mean, however, that LOCs are completely worthless. At least, they can give you hints where quality problems might lurk. For example, if a method contains several hundreds lines of code, then you definitely got a problem with inappropriate modularization. Another example is Cyclomatic Complexity (CC) introduced by McCabe. The CC of your system's runtime graph can be calculated by CC = E - N + P (see wikipedia link to CC). Here, E denotes the number of edges in the graph, N is the number of nodes, and P the number of connected components. According to McCabe a value of CC greater than 50 means your (part of the) system has too much complexity and reveals high risk. When applied to the Observer pattern with 50 observers, the CC will be larger than 50! Unfortunately, we all know that the Observer pattern is everything but complex and risky even when used with high numbers of observers. The problem here is that CC simply recounts all connections even if they are all of the same type. What does all that mean? My point here is that metrics are of limited value for a software architect. For each metrics used, a software architect should be aware of the strengths and limitations. Architecture quality and their lack can be evaluated better using other means. I will write about these qualities in a further posting. Of course, in the meantime I am very interested in what you think about metrics?

Wednesday, May 03, 2006

What is Software Architecture

Anyone involved in software development projects is used to the term "Software Architecture". If asked what software architecture really means, most people will throw some of the well-known definitions at you. Just give yourself a try and search for it in Google, Wikipedia, or whatever information source you prefer. You definitely will be overwhelmed by the number of hits. In http://www.sei.cmu.edu/architecture/definitions.html some definitions are available. It's definitely entertaining to read all these definitions which are all valid but only show a part of the whole picture. To be honest, all of these definitions are mostly useless. It is much more important to ask what software architecture is going to provide for a project. In other words: if software architecture is the answer, what exactly is the question? Basically, every software system has a software architecture. However, a software architecture might be worthless when it is built by accident. Let me give you an example. If I just put together some spaghetti code using a trial-and-error approach without ever thinking about software architecture, I'll get an implementation that propably will work. Unfortunately, I'll have no clue why the system is working and I will definitely have a very bad time when being asked to maintain, evolve, change, integrate or otherwise modify or understand the system. As a consequence, software architecture in a more narrow sense should be the result of systematic analysis and design. But even systematic analysis and design might lead to problems when just considering implementation aspects. I've seen a lot of systems that were realized with a specific middleware, operating system, or database system in mind. As soon as some of these system details changed, development teams were doomed to fail. Thus, software architecture should focus on more implementation independent aspects, but also stay in harmony with the underlying system infrastructure (a.k.a. system architecture). In a further step, we should ask ourselves what drives the software architecture design? Basically, all kinds of forces respectively requirements such as desired properties, constraints, commonalities, variabilities have an impact on the architecture. But you may ask, what if there are conflicting requirements, and how to deal with requirements when there are so many of them? All requirements should be prioritized. If there are conflicting requirements with the same priority, then you got a problem! In this case the problem must be resolved with all stakeholders. That brings me to a further perspective on software architecture: First of all, software architecture is about communication of explicit and documented design decisions. This is the reason why I consider domain modeling so important. In addition, software architecture is not only about structures, relationships, dynamics but also about the process used to define all these structures and relationships as well as their interactions. In this context, it proves to be particularly important to differentiate between the strategic baseline architecture and tactical design. The core of the architecture should implement all important strategic requirements. Tactical refinements must not modify strategic decisions. Thus, designing software architecture is mainly a top-down approach, but may also use bottom-up integration of legacy systems or components. As already mentioned, requirements are the drivers for software architecture design. In the process, requirements depending on their priority need to be realized in the software architecture in such a way that requirement traceability is easily possible. Without traceability design erosion will destabilize the whole system, requiring additional efforts for refactoring or architecture recovery. Thus, software architecture mainly deals how to map requirements to appropriate structures. Here, granularity aspects are important. Have you ever tried to build a house by assembling atoms? That does not make sense as complexity cannot be mastered using a fine-grained approach. Therefore, software architecture is about mastering complexity by introducing appropriate abstractions. Patterns are a good example for such "abstract" architecture entities. As some requirements denote cross-cutting concerns, the right structuring of a software system under development is not easy. Consequently, software architects must introduce different perspectives. These different perspectives must be combined and converged to a unified and consistent software architecture. Therefore, software architecture is also about perspectives and the combination of these perspectives, which, however, turns out to be one of the most complex tasks in any software development project, because of emergent behavior. Of couse, this posting could only show the tip of the iceberg. I think, it is obvious why no single definition of "software architecture" can ever satisfy anyone. Nor is it really important to have such a definition. It is much more important to have a common understanding of the benefits of systematic software architecture design.

Thursday, April 27, 2006

Events

Every year a lot of interesting conferences and events on software engineering take place world-wide, especially on Object-Oriented Programming and related topics. Unfortunately, there are too many events. It is impossible to attend even the most exciting ones. The big ones like JAX, OOP, OOPSLA or JAOO are cool because they offer conference programmes where everyone should be able to find her or his favourite topics covered by some superb experts. And, you can meet so many people there. Definitely, a good opportunity to strengthen your social network. On the other hand, big conferences tend to be more formalized, organized, and commercialized. In the last few years, I increasingly enjoy attending that small events which offer excellent topics and speakers, somewhere in small places. That's one of the reasons why I am really sorry that the TOOLS conferences have been cancelled a few years ago. These events organized by Bertrand Meyer were absolute highlights. Fortunately, there are other small events that I would recommend. One of them is coming really soon and I will be personally involved as a speaker. It is the EXPO-C conference in Karlskrona, Sweden, to be more concrete. I will give a full day tutorial on Software Architecture and also speak on SOA. But that's not the reason why I am blogging about this event. They really got exciting speakers, talking about things such as Ruby, C#, Haskell, Software Architecture. This is more an event on languages in a broad sense, as the organizers explain. And of course, it is an event in Sweden. I have never been there, but I guess you'll meet the same friendly and smart people there as in Denmark, Norway, or Finland. If you got curious, here is your chance. You should definitely take a look at:

http://www.expo-c.se

Wednesday, April 26, 2006

Send all Market Analysts to a lonely Island!

This time, I like to discuss something absolutely different. A few weeks ago one of those famous market research companies - I won't tell you the name - announced that they have investigated interesting facts on the relevance of Podcasts. The result was amazing: only some weird techies are listening to Podcasts, while the vast majority of people is not interested in this Podcast thing. As a consequence, there is no business opportunity in this area according to the infinite wisdom of market analysts. A few days later, a more serious analysis found out that the the irrelevance of Podcasts was absolutely untrue. In the US alone millions of people are frequently enjoying Podcasting. I would have surely guessed that, as Podcasts are a kind offline radio and cover as many topics as one could propably think of. This reminds me of an Ovum report several years ago where they compared all these cool Remoting Middleware technologies (RMI, DCOM, CORBA). They forecasted that DCOM will be the dominant technology in the future, which is ... now. BTW, can you remember this DCOM technology ? DCOM propably stands for Dead COM. Can you remember the prediction that .NET and Java will both share 50% of the market. And all these predictions that SOA will make everything else obsolete? All of this could be quite entertaining. Unfortunately, in software development projects I constantly get pointers from managers that refer to these market analysis reports. Even software developers and architects believe in this crap. I understand that people are searching for help when faced with uncertainty. In market and technology reports you can find all these technology evaluations, product comparisons, and market forecasts. And, even worse, for almost all predictions in these reports you are able to discover additional reports, that tell exactly the opposite, at least, if you are digging long enough. Reminds me of Winston Churchill who once mentioned that he only believes his own wrong statistics. Sometimes I ask myself, if someone in this universe has ever tried to investigate the value of market reports. How many predictions turned out to be true or at least almost true? The problem of all future forecasts is that you can only base your statements on a small amount of facts and a large amount of opinions. Opinions are just that. They contain personal preferences, try to project past developments to the future, and use linear models. The reality, unfortunately, is often disruptive and non-linear. New technology developments appear, some of these developments become hypes, while others disappear and may re-appear some years later. What can be done in a stage of uncertainty? Base all your architecture and technology decisions on two things, the facts you know and the risks you must address. If necessary, hide technologies which might be subject to change, using adapters or other means. Everything is better than gambling. And, even if it sounds over critical, using marekt and technology reports is like gambling. Why do you think, these guys have become market analysts and not software engineers?

Thursday, April 06, 2006

SOA is NOT about Web Services

Recently, I have been involved in a couple of discussions where people complained about the SOA Hype and all those enthusiastic XML Web services celebrations. I wrote an article on SOA for the IEEE Software Issue on Future Trends of Software Architecture which you might read on my web site. Here are my two cents.
  • XML Web services define a kind of meta middleware dedicated to integration problems. If you need to communicate between a Java EE application and a .NET application then XML Web services represent one possible option. There are other alternatives in this scenario such as CORBA or RMI adapters. However, in most situations when you have to cope with heterogeneous systems without control which applications will have to be integrated, then XML Web services are the clear choice.
  • Service-Oriented Architecture as the name implies is not dependent on a specific implementation technology such as XML Web services. Likewise, Object-Oriented Programming is not dependent on Java. Instead, I consider SOA as a set of architectural principles that emphasize loose coupling. I will explain this point in the remainder of this posting.

A typical example for a SOA-compliant technology is regular e-mail. I'd like to present some of the properties of SOA systems using this simple show case.

SOA requires explicit, role-based interfaces for services. Clients do only see interfaces and never implementations. As the bridge pattern is applied, client and server interfaces are implementation-agnostic with respect to each other. Communication between client and interface is provided by standardized protocols.

Applied to e-mail: Mail clients communicate with mail servers using POP3, IMAP or SMTP. As there are no implementation dependencies, a mail client does not need to care about the implementation of the mail server, and vice versa. Thus, you are completely free to use any mail client and mail server if your communication peers abide to the standard protocols and standard interfaces. e-mail is a little bit special in that the services and their semantics are predefined.

SOA communication relies on asynchronous message exchange albeit there might be transparency layers on top providing remote method invocation based communication. Messages are in general dynamically routed, possibly passing through indirection layers.

Applied to e-mail: mails are passed as messages from their origin (client's outbox) to their destination (recipient's inbox) passing different intermediate layers. That means for example that you are not blocked even if your communication peer hasn't yet received your mail.

SOA messages denote standardized documents with different sections such as body or headers. Multiple messages may be used to transmit data in chunks, if necessary. The header usually contains data related to cross-cutting concerns such as routing, attachments, security. The body content may be predefined between the communicating peers or be totally applications-specific.

Applied to e-mail: mails are sent using mail header and mail body. All content must comply with MIME types. That is the only constraint but is not really a constraint in fact.

SOA message exchange patterns relate different messages with each other to introduce additional communication styles such as request/response or oneway. Another example is the return of fault messages upon error situations.

Applied to e-mail: requiring a receiver to send an acknowledgement is the typical example. And what about failure scenarios? When a receiver is not recognized an error message is returned to the sender.

In SOA systems business processes are first class entities. Business processes introduce domain specific languages to combine distributed services to whole workflows. Note that business processes are not just sequential invocations of services. Instead, properties might be applied to complete workflows such as transaction contexts or other kinds of coordination.

Applied to e-mail: this is not directly supported. Instead, such workflows are implemented by applications or human interaction.

This concludes my discussion on e-mail as a SOA implementation example. Another example for a SOA based implementation technology is Messaging middleware such as MSMQ or MQSeries.

Loose coupling is the central mantra of all SOA architecture principles. Don't let vendors or press media fool you. SOA is NOT about XML Web services. Instead, it denotes an architectural paradigm for distributed computing that can be implemented using different technology options. Does it solve all problems? Ideally, it is applicable to all problem domains with inherent loose coupling of distributed entities. But it is counterproductive to apply the SOA paradigm in problem contexts where tight coupling is mandatory such as in several embedded or realtime systems. One could argue that in the end every distribution middleware relies in its bottom layers on SOA based communication such as TCP/IP. But that argument resembles the argumentation that we could implement all our software systems using machine code.

Bottom line: Always use the abstraction layer that helps building your system effectively and efficiently. Don't accept software development projects to be influenced by inadequate personal technology preferences or political decisions.

Saturday, April 01, 2006

Architect's Book Corner

A software architect as mentioned in one of my previous posts should keep herself/himself knowledgeable about all important topics in this area. One way is to attend courses, conferences, and trainings. But often can we afford to spend a couple of days for attending such an event? Another way is to read relevant books. The problem with the latter approach is that there are so many books on software architecture. So, which ones should we read? Here are some recommendations, a list of my favorites. Please, keep in mind that this list is subjective and incomplete. And, I have constrained myself on english literature. So, you might definitely ask some other architects for their book recommendations.

General books on software architecture:

  • Software Architecture in Practice ( http://tinyurl.com/qm2dl ) by Bass, Clements, Kazman introduces software architecture and also reveals in-depth perspectives. A must-read if you ask me.
  • Beyond Software Architecture: Creating and Sustaining Winning Solutions (http://tinyurl.com/r3ls5 ) by Luke Hohmann does not focus on software architecture technology but also on related issues that influence software architecture.
  • Product-Line Engineering has become an important topic for software engineers: Jan Bosch is my personal guru on this subject: Design and Use of Software Architectures (http://tinyurl.com/mffo8 ).

Patterns

  • Design Patterns: Elements of Reusable Object-Oriented Software (http://tinyurl.com/nq8yq ) is the seminal book on design patterns by Gamma, Helm, Johnson, Vlissides. For me the content of the book comprised mandatory knowledge for every software architect.
  • Our own POSA series extended the GoF book by architecture patterns, added a new documentation form, and also covered software architecture in more detail. Volume 1 (http://tinyurl.com/qk87n ) focuses on general patterns. One comment: I don't like when people call volume 1 the Buschmann book as all authors were contributing equally. The order of author names is structured lexicographically. For instance, I wrote more patterns than anyone else. Thus, call it the POSA 1 book to respect the "et al" in "Buschmann et al" :-). Volume 2 (http://tinyurl.com/rge3o ) concentrates on patterns for concurrent and networked systems. Volume 3 (http://tinyurl.com/qcvgv ) covers resource management. Expect more to come in the near future.
  • In Remoting patterns (http://tinyurl.com/prnnz ) and Server Component Patterns (http://tinyurl.com/q9a52 ) you'll find some basic ingredients for remoting middleware and application servers.
  • For messaging middleware the book you should read is Enterprise Integration Patterns : Designing, Building, and Deploying Messaging Solutions. By Gregor Hohpe and Bobby Woolfe. (http://tinyurl.com/q2xea ).
  • Analysis patterns are more on the domain-level. Another excellent book by Martin Fowler (http://tinyurl.com/m2nfm ).
  • For Java EE developers the Core J2EE Patterns book provides essential best ptactices for daily work (http://tinyurl.com/mvtbn ).
  • .NET programmers can obtain similar books through http://tinyurl.com/rfyw9 .
Model-Based and Aspect-Oriented Software Development:

  • As soon as Markus' book on MDSD is available in english I can wholeheartedly recommend to read it (as I've read the german edition): http://tinyurl.com/q9a52 .
  • Software factories extend MDSD by mapping industrial production paradigms to software engineering. Written by some prominent people such as Jack Greenfield the book on software factories is excellent: http://tinyurl.com/ntec6 .
  • Generative Programming: Methods, Tools, and Applications was written by Uli Eisenecker and Krzysztof Czarnecki, two friends of mine. Excellent book on generative programming but contains very complex C++-based stuff (http://tinyurl.com/obxqn ).
  • In Aspect-Oriented Analysis and Design AOP is considered from a more architectural approach (http://tinyurl.com/o3o2v ).

Process-related issues are important for a software architect. Here are some books on my list:

  • Martin Fowler wrote THE book on refactoring which was entitled Refactoring: Improving the Design of Existing Code (http://tinyurl.com/r6s5z )
  • An new one is Joshua Kerievsky's Refactoring to Patterns which introduces pattern-based refactoring (http://tinyurl.com/qam9h ).
  • Test-Driven Development was introduced by Kent Beck whom all of you might know as the "father" of eXtreme Programming (http://tinyurl.com/ot8k3 ).

Modelling and Engineering Process:

  • UML 2.0 in a Nutshell is compact and nonetheless offers a complete overview.(http://tinyurl.com/pasyk ).
  • You need a lightweight overview of the Unified Process. Here is the way to go (http://tinyurl.com/q7xul ).
  • Extreme Programming Explained : Embrace Change (2nd Edition) by Kent Beck is the source for learning eXtreme Programming (http://tinyurl.com/rwcmn ).
  • Ken Schwaber and Mike Beedle in Agile Software Development with SCRUM tell you all to know about SCRUM (http://tinyurl.com/o7cer ).
  • Agile development in general was perfectly described by Alistair Cockburn in Agile Software Development (http://tinyurl.com/raghe ).
  • Requirements Engineering is often treated with unsufficient care. Thus, read the book Requirements Engineering (http://tinyurl.com/qeald ).
  • The bible of writing good use cases? No question. This is definitely Alistair Cockburn's Writing Effective Use Cases (http://tinyurl.com/m5tq2 ).
  • CMMI is widely desribed and explained in CMMI : Guidelines for Process Integration and Product Improvement (http://tinyurl.com/p9xsm ).

Domain Driven Design could also be placed into the category of pattern books. I think, it should stand alone as it introduces the new idea of domain languages in an outstanding way

OO and more

  • The magic of components. Clemens wrote the seminal book on this topic. Some years old but still worth reading: Component Software: Beyond Object-Oriented Programming (http://tinyurl.com/pyo4u ).
  • Effective Java by Joshua Bloch is also a good lecture for C# gurus: http://tinyurl.com/pyo4u .
  • One of my favorites on Concurrent Programming: Doug Lea's Concurrent Programming in Java(TM): Design Principles and Patterns (http://tinyurl.com/ok4nd ) .
  • On Service-Oriebted Software Architecture there are no really ubiquitous books. Read my articles on this subject (http://www.stal.de). As an intro I recommend Thomas Erl: Service-Oriented Architecture : A Field Guide to Integrating XML and Web Services (http://tinyurl.com/n5oxw ).
  • Interested in all these lightweight containers? Read the book by the fathers of Spring, Expert One-on-One J2EE Development without EJB (http://tinyurl.com/lrvne ).
  • They have published widely accepted books on Ruby and Programming. But all their other books are also worth reading. The Pragmatic Programmers is a source for excellent and pragmatic books: http://www.pragmaticprogrammer.com/.

Miscellaneous

  • Last but not least. It should be mandatory for computer science students to read authors like: Scott Adams (Dilbert), Douglas Adams (Hitchhiker's Guide to the Galaxy), Tom Demarco, and Terry Pratchett (Discworld). Not to forget Stanislaw Lem who recently died. I also consider Star Trek as a foundation which implies you should also read the literature on physics (such as Feynman). But let me stop here :-)

All these books are books I've read in the last years. I recommend them personally. No, I won't get any fees from the publishers or authors. If you like to add some of your personal favorites, please, do so using the possibility to write comments.

Friday, March 31, 2006

What should be in an Architecture Document?

Recently, I was asked by a colleague how an architecture document should look like? What are the basic rules each document should follow and how should all documents be related to each other? Obviously, there is no standard template applicable to each project context. However, there are some attributes a really good architecture document should reveal:


  • Introduce special documents on the domain model (if applicable), on central issues such as patterns used, and on different kinds of guidelines. Make sure all architecture documents comply with these guidelines.
  • Don't extend 50 pages per document. A large document with more pages will not be read by anyone, at least not all its content.
  • This is a no-brainer. But nonetheless, I am going to mention it: Use a standard document template.
  • Structure all documents exactly the same way. Otherwise, readers won't feel comfortable, especially when they have to read more than one architecture document.
  • Describe the software architecture top-down. Start with the basic abstractions and then step by step move to more concrete details and implementation issues. This way, different readers can read the document according to the detail level they need. For instance, a manager might only be interested in the coarse grained architecture while engineers are also interested in deployment issues. A good way is to use the 4+1 view of the IBM Rational Unified Process. In the beginning, explain what part of the architecture you are actually describing in the document including its motivation and scope. Then address all requirements that have influenced your architecture (decisions) as well as the relevant use cases that drive the architecture design. A context diagram helps to show boundaries of your architecture as well as its integration into the rest of the system. Introduce the logical view with CRC cards, class diagrams, sequence diagrams. Don't come up with technology-centric issues too early. Even if you are using .NET Remoting and C# and SQL Server in your project, to name an example, your architecture baseline should not depend on these technologies, at least not its logical structure. Complete documentation using step-by-step refinement up to the deployment view.
  • To ensure symmetry, always use the same diagrams for the same purpose such as UML diagrams, ER diagrams, or domain-specific languages (DSLs). Also make sure, that these diagrams use the same meta-model. For example, introduce project- or domain-specific stereotypes in a separate document (see first bullet).
  • Add a glossary that explains all relevant terms and abbreviations. And make sure, all documents use the same terms with the same meanings.
  • Add references to other documents that are relevant for reader understanding.
  • Motivate all important design decisions that are not obvious. I've read so many documents that introduce architecture without presenting the rationale. Another software architect that reads your document must be able to understand the rationale (the "why" not just the "what"). Understanding the rationale also means understanding the architecture.
  • For the same reason, always explain in your document how your architecture addresses the requirements. Thus, requirement traceability will be possible.
  • Use patterns and explain the patterns used in the architecture document without providing full pattern descriptions. Rather refer to existing pattern descriptions in literature or special pattern documents.
  • Structure the architecture documents in a tree-like hierarchy. The root is defined by the overall strategic architecture document that introduces the whole system. In the root document introduce all relevant subsystems as well as cross-cutting concerns such as security, scalability.
  • The nodes right under the root then denote subsystem documents and further documents that address the most important cross-cutting concerns. If your subsystems consist of large entities themselves you may add additional leafs to the document hierarchy.
  • Also specify testability (such as unit tests) in your document. This defines the specification of your architecture as well as how its implementation can be tested.
  • Check-in all your documents in a configuration management system. Use versioning for your documents.
  • Write the lead author or all co-authors onto the document cover page, so that a reader might track down the authors. Also specify date and version.
  • Let other people review your document (and design). Feedback should be related to comprehensibility and technical soundness. Don't rely on the colleagues that are in the same subteam but also ask other people (managers, architects, testers) to read and review your documentation.
  • A more process-related issue: make sure your architecture document always reflects the current state of the implementation (if already available). Otherwise, reading your document might be a complete waste of time and even cause other teams to draw wrong conclusions.
  • Add diagrams and figures to explain your design, especially for complex architectural issues. No one will be capable of understanding hundreds of lines without any visualization. Drawing diagrams requires additional efforts but is always worth the time being spent.

These are some recommendations I have derived from my work as software architect. I am sure there is even more. If you find this helpful or if you have additional suggestions or feedback don't hesitate to add your comment.

Thursday, March 30, 2006

Middleware - what Middleware?

In many solution architectures communication middleware serves as the central backbone which helps to glue all core parts together. It is obvious that the selection of the appropriate middleware is a critical issue in any development project. Unfortunately, in many projects this decision is driven by political forces or personal preferences. Managers often do not recognize that the selection of inappropriate infrastructure technologies or tools can be disastrous. Even if architects are ready to base this decision solely on use cases and requirements, it can be incredibly difficult to move to the right direction. As Andrew Tanenbaum once said with respect to standards "there are so many that it is difficult to choose from". So, the first question is: what kind of middleware is appropriate for what kind of problem? To answer that question it is important to get an overview of middleware types and paradigms.

Basically, the following kinds of middleware exist:

  • Messaging Middleware: applications send messages to each other. Message contents are application-specific while the structure and header information is specified by the MOM (Message-Oriented Middleware). Messages might be sent from one peer to exactly one other peer (end-to-end or queue-based messaging) or (anonymously) from multiple publishers to multiple subscribers (publisher subscriber or topic-based messaging). Examples: MSMQ, MQSeries, JMS, SonicMQ, JBossMQ.
  • Remoting Middleware: hides all communication details from developers by extending conventional operation calls over the network. Clients and servers can almost be implemented as if they were residing in the same address space. All communication issues are handled behind the scenes by glue components that are typically generated using tools. Examples: RMI, WCF aka Indigo, CORBA, ICE, DCOM.
  • Eventing Middleware: focuses on distributing fine grained events. Very similar to messaging middleware and thus I won't cover it here in detail.
  • Distributed Transaction Monitors: provide transactions management across different components. Examples: Tuxedo, CICS, MTS. Will not be covered in this posting as transaction monitors today are rather integrated into the other types of middleware.
  • Service-oriented Middleware is a kind of meta-middleware used to integrate other middleware. Most prominent implementation are XML Web services. Web services are mostly useful in business-level integration scenarios.
  • Peer-to-Peer Middleware: a combination of Messaging middleware and Eventing middleware where the locating of remote peers happens through discovery algorithms instead of relying on centralized repositories.
  • I won't explain Multi-Agent-Systems here as they are only used rarely.
  • Neither I will explain EAI systems here as they are basically built on top of the aforementioned middleware types.

Therefore, the first distinction should be whether your problem domain requires a more method-invocation based or more message-based approach. Asynchronous operation is one of the important issues here. Despite of the fact that some remoting middleware technologies have also introduced asynchronous method invocations (e.g., CORBA), messaging is more appropriate for asynchronous communication. Asynchronous communication basically means, that the sender for its subsequent processing does either not expect a result from its communication peer or does not need the result now. Hence, senders and receivers should be decoupled. Example: sending a purchase order to the order processing subsystem. Another issue for the preferred usage of messaging is when you don't want tight coupling between communication partners. For example, a server that is sending notifications to different receivers which are interested to subscribe for obtaining different messages from different senders. A further example is the provisioning of advanced communication styles such as broadcasting or single request - multiple replies. These styles do not map to existing programming languages, anyway. Thus, it makes no sense to provide them through remoting middleware. Last but not least, scenarios where communication links are not reliable are more appropriate for messaging. Take a mobile phone as an example that lost connection with the network.


If, however, the sender needs an "immediate" result from a specific communication partner, remoting is much more suitable. Example: asking a credit card company for validation of a specific card in a Point-of-Sale system. The advantage of remoting middleware is the transparency they provide. Basically, developers can ignore all communication details. But that is exactly the problem. Developers often tend to leverage remoting middleware as if they were developing non-distributed systems without taking issues such as latency into account. You can easily imagine the performance of such systems. Another problem with transparency is hiding of details can be a disadvantage in terms of tracking errors. Because everything is hidden, error causes also are hidden. In summary, usage of remoting middleware and transparency are totally overestimated in practice.


Messaging middleware can be extended to provide remoting. There is a simple reason for this. Every remote invocation can be separated into two message transfers. A request message is transferred to a receiver which then sends back a result message to the originator. Actually, all remoting middleware is built upon some kind of messaging infrastructure. In contrast to some claims, the opposite is not true as asynchrony can not be guaranteed when remoting middleware is used as the underlying base for a messaging layer.


Peer-to-Peer middleware simply combines messaging and eventing with discovery strategies. Instead of looking up a receiver's location from a known repository, it is much more reliable to discover a resource, especially when the same resource is available more than once in the network. In a Peer-to-Peer system a consumer or sender does not care about which concrete provider or receiver it is using. Thus, Peer-to-Peer approaches are particularly helpful for coping with decentralization. In theory, a similar approach is possible for remoting middleware. Instead of asking a repository where the server object is located, it is possible to use a trading service, ask for a specific service type with specific properties, and get possibly multiple object references returned that meet the specified type and property constraints. This is the right way if you need a remoting based approach combined with decentralized lookup strategies.

SOA basically means loose coupling. For example, peers are implementation-agnostic. The only thing an application sees is the service interface of the application it need to communicate with. The communication itself uses a commonly agreed messaging protocol. This approach can be best implemented using XML Web services and Messaging middleware. SOA is particularly useful to integrate different middleware and application islands with each other.

This posting could only scratch on the surface. There are a lot of issues that could have been discussed such as error handling, fault-tolerance, scalability, security. My intention was to illustrate that no middleware paradigm can be a general solution for all problems. Thus, it turns out to be essential to first specify the problem space and then identify which middleware solution is the appropriate one. For the same reason, it is sometimes not possible to rely on one single middleware technology because there are multiple problems requiring multiple middleware solutions. Remember: select your middleware carefully and base this selection only on the problem domain, not on political or personal preferences.

Making Noise

Yesterday, I addressed the issue of meeting overkill in this blog. This was a first example how productivity can decrease in any software engineering project. Another point of trouble from my viewpoint is e-mail. Do you remember those days when an incoming e-mail was a seldom and happy event? Neither regular spam nor internal spam? Sure, that time the number of e-mail accounts was significantly lower. On the other site, I remember that more people followed the netiquette. Today, in a regular project, especially when it happens to be multi-site, there are tons of e-mails daily (many of them related to unnecessary meetings :-). Add to this company-internal mails and all those spam mails and marketing mails and mail distribution list mails, you name it. How would you ever be able to handle this amount of mail? Sure, you can use spam filters and organize incoming mails in folders, as well as prioritize the mails. All these things are really helpful. Nonetheless, the number of high-prioritized mails is still much too high if you ask me. One of the worst things are those mails that ask you to decide for one of several options and send back your decision until a specific date. If you don't reply the sender will just assume that you have decided for one specific option. Tom DeMarco calls this kind of mail "Corporate SPAM". I consider corporate spam extremely offending.

What does that mean for our life as software engineers? How can we survive our daily professional work without being flooded by information overkill? Getting completely rid of e-mail? Sounds nice to some people but is completely infeasible. The only way is to organize e-mail, filter them, prioritize them, and come up with netiquettes in project teams to use e-mail efficiently in order to reduce noise and make everyone feel comfortable and productive.


to be continued ...

Wednesday, March 29, 2006

Meeting Syndrome

Now for something completely different. In most of the projects where I am involved I tend to spend a significant time in meetings. While face to face meetings are extremely important for decision making and team building, most of them are a waste of time. Tom DeMarco gave a talk last autumn in Cologne where he pointed out exactly that issue. He was consulting the two largest printer companies in the US. One of them proved to only achieve half of the productivity of their competitor. Thus, Tom was wondering whether the engineers in both companies had different levels of productivity. It turned out that the skill and experience levels were almost the same. Guess, the actual reason for the productivity loss? The less productive company was exactly the one with the most meetings. That does not imply, as Tom illustrated, that meetings are useless. It shows, however, that less but more efficient meetings are a better strategy. Tom also mentioned that the most successful meetings are the ones where people are expected to find a solution or decision. Meeting is over when goal is achieved, not sooner! The less successful meetings are those where people are just sharing information with each other without any particular objective or sometimes even without any agenda or time schedule. What I really dislike are all those meetings for which I don't know upfront what will be the agenda topics or goals in the meeting. Note, that general items such as status reports, action item reporting or planning of the next meeting don't count in this context! Tom DeMarco expressed the opinion that many meetings are only intended to let people communicate with their superior. Thus, the meeting is not a team-like approach but more a one-to-many experience. According to Tom it is much more productive when the boss is spending five minutes with each of the team members than spending two hours with the whole team. Another point which makes me crazy about meetings is when these meetings are either unmoderated or when there is a moderator who does not care whether people abide to the time span they got for their agenda topic. First of all, it is my time that gets wasted when the meeting exceeds its original deadline. Second, in many of those meetings I am really afraid to die or at least get severly injured by information overload.
Why is this relevant for software engineers? We as software architects spend most of the time communicating. It is essential that most of this time is dedicated to personal communication than with meetings.

To sum up: Meetings are important, but in order to stay productive meeting culture should focus on quality and efficiency instead of quantity. Meetings by themselves have no particular value. It is the human interaction that counts.

Tuesday, March 28, 2006

Gödel and Computer Science

For today, I have only one question where I'd like to get some feedback from all you out there in the infinite void of the Web universe. As you might know, there was an austrian mathematician Kurt Gödel who lived in the last century. He proved that for simple mathematical logic calculi everything that is true also can be computed (i.e., automatically derived from some basic axioms). For higher level quantification theories (i.e., where logic statements can reflect on predicates) this does not hold anymore. Thus, there must be truths which can not be computed by any processor. In the software world processors can be CPUs, Model Generators, Interpreters, Inference Engines. I am wondering whether there are any practical implications of this constraint? Or is this theoretically interesting but without any practical consequence whatsoever? So, what's your guess?

Monday, March 27, 2006

Software Architect Part II

I got some feedback from people asking me whether there ever can be a software architect with all the qualities and experiences I have introduced in a previous posting. Nonetheless, my opinion still remains the same :-) In some of my last projects we came up with interviews that checked for exactly the experiences and expertise described. And there were several software architects that passed the test. The problem these days is that no world-wide accepted qualification for software architects is available. Nor is there any role description. When and how will you know whether you can call yourself a software architect? I've provided all these little clues to help you here. All those experiences and expertise are particularly important to be recognized as a good software architect.
I'd like to introduce another perspective to shed more light on my points. What exactly are the typical activities of a software architect? Note: no guarantee for completeness given here.

From my viewpoint being an architect implies a really big workload. Architects need to:
  • help clarifying the business case and support SWOT analysis if required
  • help estimating required costs, resources, persons
  • help providing a domain language and a DSL (optional)
  • clarify all use cases and requirements as well as other open issues
  • build an interface between developers, testers, and other stakeholders
  • estimate iterations and increments
  • assess at least the most critical technology options
  • make sure the right tooling and technology portfolio is used within the project
  • communicate with system architects to gurantee proper interaction between infrastructure and software architecture
  • commit Commonality/Variability analysis when a Product Line Engineering approach is taken
  • develop and document an architecture vision that already contains strategic decisions. Note: this also implies that architects must decide whenever there are different options! Software architecture is not an automated, deterministic process without any degrees of freedom
  • help defining architectural guidelines for central issues such as error management
  • empower other developers and architects with respect to all architecture aspects and architecture concepts
  • take responsibility for all decisions and support partitioning and distributing tasks
  • design all structures and behaviors so that they meet requirements
  • supervise refinement and implementation of the architecture
  • support quality assurance for all parts implemented by distributed teams and integrated into the product. Note: outsourcing and offshoring can be considered just special cases here. I am not considering any cultural, or legal issues in this context
  • prove the feasability of a whole software architecture, of its parts, or aspects being leveraged by prototyping
  • review software architectures and re-engineer them if necessary
  • take test results and feedback as input for refactoring activities
  • communicate with key developers to make sure the tactical design does not violate the strategic architecture
  • simplify and refactor for injecting properties such as readability, extensibility
  • implement (but not on critical paths)
  • make sure re-usable assets are integrated
  • meet with customers to obtain feedback also during the project

All these points may be uncritical for small projects that use proven technology. This might imply that architects don't need that kind of high profile. Take a one-person project as the most extreme example. As soon as large projects and high risks are involved it is inevitable to make sure, architects can really handle all the aforementioned issues and cope with them. Hope, you can now see from this activity list, how all these required experiences and expertise were derived in my former posting.

And I definitely appreciate additional feedback and comments

Sunday, March 26, 2006

Patterns and the Real Life

In the last courses I gave on software architecture Í was using real life examples for some of the more complex patterns. Attendees told me that this approach had helped them significantly. Especially, patterns for concurrent and distributed systems are difficult to understand when introducing them in a pure software engineering context. Using real life examples for introducing patterns is not new. Several years ago Linda Rising initiated some OOPSLA workshops where participants had to provide real life examples for the patterns in the GoF and POSA books. I remember an asian guy whose wife was researching biochemistry and who came up with the example of a self healing organism in order to explain the Reflection pattern (POSA 1). Have you ever tried to understand the Reflection pattern without using a real life example? This is comparable to understanding quantum physics. Thus, the real life example approach should never be underestimated. I considered those real life example just a sort of entertainment for a long time but used them to explain to my wife and other people what the hell we were talking about in our books. In recent years, however, I recognized these real life pattern examples as a real value-add for pattern descriptions. I guess, the human brain requires some analogies to real world examples when processing abstract information (by the way, that is exactly the reason why quantum physics is almost impossible to understand, even after reading the Feynman lectures on physics).
Let me give an example. The Half-Sync/Half-Async pattern in POSA 2 deals with systems where asynchronous events are expected to trigger synchronous event processing in distributed systems. To separate both a queue is introduced by the pattern. This is exactly what will happen in a Burger restaurant. New customers will arrive and place their orders to an employee at the counter. This employee won't wait until all food items are ready but will tell some workers in the background to prepare the order, while taking the next order. This way, parallelism and thus efficiency is increasing. If these orders are processed in parallel, then their completion time is non-deterministic. How will the personal know which order is associated with which customer? This is where the ACT pattern is the only viable solution. ACT stands for Asynchronous Completion Token. Its solution structure is very simple: whenever an asynchronous operation is started, the operation is associated with a unique token either created by the requester or by the request processor. When the operation completes, the result is returned back together with the token. This way, the request and result can be easily associated with each other. In a Burger restaurant you'll get a number. As soon as your order is ready, someone will shout your number and you'll be able to pick up your food.
Needless to say that the same strategy works for Starbucks or beer gardens in Munich.
Hope, you'll see that these examples are particularly helpful to understand the patterns. Thus, my suggestion is to add real life examples to every pattern description, at least to those that are hard to understand. I am wondering whether we could also apply this idea in the opposite direction, i.e. taking real life examples for finding new software patterns.

Thursday, March 23, 2006

Architecture Qualities

When can we consider a given software architecture to be of high quality? Is there a unique, formalized answer that allows to build some kind of tool in the future that would just analyze an architecture description and measure its quality. One possible approach is to judge software architecture quality in terms of the requirements it meets with respect to the original goals and constraints of the software system under construction. If, for example, security was one of the original goals then a software architecture without any security-related entities would definitely not be called a good software architecture. With other words, quality of a software architecture is always relative to the problem going to be solved. But what about a problem specification that introduces contradicting, missing or vaguely specified requirements? Have you ever heard about the Garbage-In-Garbage-Out rule. A software architecture can only be as good as the problem specification it is based upon. Thus, software architecture quality can be considered as the fulfillment of a consistent and complete problem specification. One conclusion that can be drawn from this is that using metrics to measure software architecture quality does not make any sense. In addition, the precondition of a complete and consistent problem specification does not necessarily mean that you'll have to have such a specification when your project starts. Rather it implies that you should apply an agile method where the problem specification can possibly be refined anytime and the architecture must then be refined accordingly. Is that all that's important with respect to software architecture quality? What about readability and maintainability? Even if your software architecture can currently balance all existing forces, it might not be capable of addressing future requirements. Take remoting middleware as an example. Although .NET Remoting or Java RMI are excellent solutions for building business applications, they are quite unusable for the construction of embedded, real-time systems. How would you change RMI to support that kind of systems. You propably would have to completely re-engineer RMI. So, what? We are still on the right track, if we consider developmental qualities such as extensibility and maintainability as required parts of the problem specification. Unfortunately, the problem domain itself can be so complex that it is almost impossible to come up with a complete and consistent specification.
But there is even more. From my viewpoint, there some meta-qualities exist that are often ignored in requirements engineering. For example, symmetry and orthogonality. If the same problem occurs in different parts of your system your architecture should reveal the same solution in all of these parts. If different solutions are used for the same problem, understanding the architecture will be significantly more complex as you have to deal with more solution concepts. If the solutions are patterns that basically means: don't use different patterns to solve the same recurring problem except if there are very good reasons. Should we now try to increase pattern intensity for all of software systems we are going to build? I remember a guy talking to Erich Gamma and me on a conference in Vienna a few years ago. He told us that in his software system he has applied ALL patterns of the GoF book. Suppose, what our reaction was. Pattern density is not necessarily a sign for good software architectures.
Two of the most difficult issues in software architecture design are still unresolved:
  • What is the right structuring of a system. What granularity should one use? How many layers of abstraction or indirection are good or bad?
  • How could we systematically inject operational and developmental qualities in a software architecture?

Unfortunately, there are myriads of ways to solve the same problem. And among them are still myriads of good solutions. One reason for this is that many cross-cutting concerns appear in software design, Thus, it turns out to be impossible to decide exactly and determistically what entities we should interweave, which ones to separate, and what kind of relationships to introduce between them.

Nonetheless, there are good and bad smells. For example: Experienced programmers will recognize whether a software architecture reveals specific properties such as symmetry. They will understand whether a given structuring is good or bad.

Maybe, this illustrates that software design represents a combination of different areas: engineering, science, and art. It reveals some mathematical aspects but in the end intuition and experience are equally important. As a consequence, outsouring software architecture design is always a bad idea.

In other words, being a good software architect is what you should strive for.

Tuesday, March 21, 2006

Why Patterns have failed

Publishers and conference managers are interested to sell huge numbers of books and conference tickets. Software patterns are still a perfect means for attracting people. Thus, no one is interested to shed some light on the truth. Hence, I guess, most of you did not even suspect that Software Patterns have turned out to be a complete failure. Don't let these people fool you.

Here I have listed some clues and reasons for you:
  • Patterns as Brian Foote ones said are an "aggressive disregard of originality". They are discovered and not invented. As a consequence, there is not much space for innovative research in this area. Want to cover patterns in your Master thesis or Ph.D? It becomes obvious that researchers should forget about patterns.
  • Your boss told you to document your domain expertise using patterns? Good luck! Why do you think you were told to document your knowledge explicitely? Is it because your boss wants to enjoy your impressing capabilites? No, some people from foreign countries are supposed to take your position very soon. When your pattern documentation is completed, you will lose your job.
  • Do you know that IPR issues are essential for today's businesses? Guess, where someone will look to get information about your innovations. The architecture document and the code are potential places! If one of these is easily readable, it will also be easy to steal your ideas. Better encrypt your architecture by using unsymmetric and complex design instead of easing the life of industry spies with patterns.
  • Whenever you are encountering a new domain, you will make the experience of cultural shock. Domain experts tend to use some cryptic domain languages. There are two reasons for this: (1) no expert is interested to be understood by the rest of the world and (2) When domain experts speak with each other they need abstraction in order not to be confronted with reality. Patterns are the cryptic entities of the software engineering domain.
  • You will definitely know that patterns are considered blue prints and not implementations. They give you infinite numbers of implementation options and variants. In other word, patterns hide a high degree of uncertainty behind a deterministic facade. Thus, implementing patterns might make your life a complete nightmare.
  • What do you think about Karl Marx and George Orwell? Equality is an important issue in each society but striving for total equality might be completely counterproductive. Using the same patterns everywhere is like striving for total equality. Draw your own conclusions!
  • Did you ever wonder why the authors of the seminal book on design patterns were coined "Gang of Four"? This term does not reveal positive associations from a historical perspective. Do you really think, they called it this way incidentally?

There are even more arguments available. Maybe, someone else could make some suggestions and come up with additional disclosures. I hope, you now can see the whole story. There is some confederacy going on in the background. Everything is backed by a secret society called the Hillside Group. The conspirers meet in what they call xxxPLoP conferences. Their ultimate goal is world domination. Be cautious and trust nobody!

Saturday, March 18, 2006

What the hell is Web 2.0?

To continue with the discussion of my last posting, I'd like to discuss Web 2.0. As most of you will know, this term has been around for several months now. If you ask people what that could be, they will mostly refer you to new technologies such as AJAX. Applications like Google Suggest are prominent known uses for AJAX (Asynchronous JavaScript And XML). The AJAX concept however is pretty old. There were many Web applications available that used the same kind of approach. Take Web-based mail applications as an example. The concept behind AJAX consists basically of hiding all communication activities between clients and servers by introducing a kind of business delegate. Well, that business delegate is implemented using JavaScript when you use a HTML client aka browser.
Originally, Web 2.0 was just a name for a series on Web conferences. Wikipedia (see http://en.wikipedia.org/wiki/Web_2.0) defines Web 2.0 as follows

[...] Web 2.0 applications often use a combination of techniques devised in the late 1990s, including public web service APIs (dating from 1998), Ajax (1998), and web syndication (1997). They often allow for mass publishing (web-based social software). The term may include blogs and wikis [...]

If you read this definition, then it becomes obvious that this buzzword is another example for an attempt to keep the IT technology market continuously running.

On the positive side, the Web 2.0 hype makes people from different companies think on old but proven technologies so that they can be leveraged in Web applications more efficiently and effectively. As another side effect this might lead to standards. Standards despite of their liabilities such as being slow or being least common denominators at least foster developer productivity because we don't have to deal with dozens of incompatible and proprietary solutions.

Hence, Web 2.0 may boost our set of possibilities and capabilities. Take it, forget the hype, and use it to your own advantage.

At the end, that is what really counts

Monday, March 13, 2006

The Open Hype Scale

To earn money in the [IT] industry one of the potential preconditions is the availability of innovative solutions in your products. Innovative can mean a lot of things, for example faster, better, easier, or nicer. Only seldomly this kind of innovation improves or extends the functionality. Application domains have turned out to be very stable over time. So, what could a text processor do more than editing, spelling checking, or printing? On the other side, it is impossible for a vendor to publish a product and then live with it for years, without any regular updates. Same for other industries. What if your car would be the nicest, fastest, energy-saving car in the world with all features anyone could ever wish and what if this car could never be damaged by accident or age? Consider the truth: No one would ever buy a new car anymore. End of car industry. Point. Same holds for software development. That's why your new brand of software tools support MDA, UML, SOA, AJAX, VIIV, you name it. That doesn't necessarily mean that software vendors themselves invent all of these technologies, each of them promising a cure for all world problems. But if someone comes up with such a potential technology innovation, all vendors will jump on the wagon, no matter whether this technology is really useful. At the end of the day all of the software engineers, business accountants, and other personel must receive their cheques. So do I and so do you. It is essential for the IT industry to always improve and innovate, even if some of these improvements might be questionable. But don't blame our industry. Do you really thing that all of these features in your mobile phone, LCD-TV or car are necessary? Nonetheless, there is one implication for us architects and engineers. Make sure that your management never gets addicted to a new hype. I remember management guys to be totally convinced that the invention of components and their wiring with graphical IDEs would solve everything. That were the stone ages, you might think. But just consider the current SOA Hype. Most hypes come in waves and even if they don't succeed they reappear again wearing other clothes. To be able to prevent the worst, look at all of these new technologies very soon and try to keep yourself informed about all their strengts and weaknesses. And we as engineers should also be careful not to enter the trap. It is easy to come addicted to all this stuff as it promises to improve our lives as architects and engineers. Be realistic!

Sunday, March 12, 2006

Software Architect's Role

I am back. It took quite some time until my last posting. This was due to the work load I had in the last twelve months. From now on I am trying to be more verbose.

One of the topics I encountered in the last months was when I gave a talk at the OOP 2006 conference in Munich. An attendee told me offline he was going to manage a big software project and wanted some recommendations how to hire the right people for the software architect's role in his team. So what is the qualification an architect needs for software engineering? Is it just mastering UML and MS Project? Is it mastership of patterns? Of course, all these experiences are important but there is more. Personally, I would identify the following areas where a software architect should have expertise:

Software Engineering Skills: It is really obvious, that a software architect should have deep knowledge about all relevant technologies in software engineering such as UML, patterns, frameworks, components, services, requirement analysis, OOP, etc. She or he must also know upcoming trends, for example Model-Driven and Aspect-Oriented Software, Domain Modeling, Feature Modeling.

Software process: In addition, it is also important to know how software projects are organized in terms of roles, disciplines, phases, and activities. Rational Unified Process, Agile Methods are absolutely important here. Think about Unit Testing, Refactoring, Iteration Planning. Of course, quality-assessment and improvement are essential, i.e. techniques such as as metrics or methods such as CMMi.

Project Management: An architect must make sure that a software project is well organized in terms of resources and participants. The reason for that is simple: A software project should also be considered a (partial) failure when it does not meet its deadlines or resource constraints. As architects are the people that have all the experiences and knowledge already illustrated, they should definitely take care about project management, even if there is a dedicated project manager. And keep in mind: organizational issues such as project members coming from different departments might also be disturbing and counterproductive for any project. There is an old saying "show me your architecture and I know your company organization". Thus, architects should be proactive.

Business Skills: Every software projects - well at least most of them - follow some business case, meaning that management expects some benefits from the software system being developed. Thus, it is important to calculate whether a software development project is able to achieve all of the financial objectives. If, for example, stringent requirements are expected to be met by a customer such as "build this complex embedded system with a group of unexperienced developers in three weeks" then an architect must be able to evaluate the propability that the project might succeed. And, of course, if soime important requirements are not met by a software architecture, this might imply significant losses. Take commercial systems (software or hardware) as an example that revealed inappropriate architectures. Such problems are not very well received by customers.

Technology Expertise: Architects are not those people who develop Powerpoint and Word documents full of bubbles that can't crash. Software engineering is not a discipline where you can develop high level visions from 10000 feet without ever checking whether the real-world technology choices are able to implement the visions. For example, a software architect who is completely unfamiliar with Java EE won't ever be able to come up with an architecture that meets all requirements. If the software architects are domain experts they might be able to define the appropriate decomposition and relationships. But ... they are unable to meet most of the operational and developmental requirements. Believe me, most failed projects I've seen so far often failed exactly for that very reason. So, always keep up to date with the newest middleware, platforms, programming languages, paradigms.

Implementation Expertise: Architect always implements. That basically means, "eat your own dog food". An architect must design an implementable software architecture. And she or he must be able to refactor when necessary. Thus, an architect needs to participate in implementing and unit-testing. It is definitely not recommendable to introduce a BDUF (Big Design Upfront) approach where a couple of software architects sets up some architectural visions behind closed doors in a few weeks and then throws the architecture specification over the fence to the developers without being involved in subsequent development phases. If you don't trust your architecture you shouldn't be a software architect, anyway.

Social skills, the most important being communication. As an architect you will talk to customers, team members, business accountants, and all the other stakeholders. It requires huge efforts to keep all of them motivated and synchronized. For this purpose, an architect's daily agenda consists mainly of talking to other people. An architect must clarify requirements with customers, set the scope of the domain, design architectures with other architects, supervise the development team so that there is no deviation between architecture and implementation, make sure the testers are tightly integrated. And even more. Architects should motivate others and convince them.

As a consequence, someone who just has received an university degree, no matter how smart and knowledgeable, will not be able to be a software architect in the beginning. This requires years of experience.

There are even more issues here. But as always, space is void and can never be filled completely. Any further suggestions what makes up a good software architect?

Saturday, January 15, 2005

IT and Religion

Today, I'd like to discuss a more philosophical and controversial issue. Let me start with some background information. At home I am using a Sony Digital Camcorder, a Panasonic VCR, a Canon digital camera, a Philips TV, a Pioneer DVD system, and a Fujitsu-Siemens Activy Media Center. "So what?" you will think, "this is nothing special". And, of course, you are absolutely right. I chose in each area the device I heard would be great for a specific task. We might call this a best-of-breed approach. Most will agree that this is fine as long as the devices meet my requirements. Sure, it is not only the devices as stand alone gadgets that matters but also the interaction. For example, some VCRs and TVs have a special link interface to directly synchronize their channel settings. Great, but I don't care. On the other hand, it would be inacceptable if I could not play videos in the VCR and display them on my TV screen. Audio/Video interoperability is definitely a must. You still don't understand what I am talking about? So let me first give you some additional details: I am using Linux and Windows, and I am working with Java and .NET. I am editor-in-chief of a German Java magazine called "JavaSPEKTRUM" and at the same time I am appointed Microsoft MVP (Most Valuable Professional). Can you see the problem now? Some people really ask me how I could sell my soul to Microsoft, while others are wondering why anyone would ever use Java instead of Microsoft technologies. And that is the lesson learned: In the area of computer/software technology things are considered in almost religious dimensions. There may be similar discussions in some other areas too (e.g., IPod versus other MP3 players, BMW versus Mercedes Benz, Stallone versus Schwarzenegger, ...), but IT people seem to be much more involved in those stupid religious battles. I don't like these useless discussions as they are only a waste of time. But often it is hard to remain uninvolved. To be honest, I am working for Siemens which is one of the biggest companies in the world (440.000 employees). In our products you'll probably find all kinds of operating systems, programming languages, platforms and these products are developed using various engineering processes and different configuration management systems, etc. Do you see the point? For the consumer it does not matter what IT technologies we use. Every thing is fine when we can satisfy all requirements. Technology does matter, but architecture does even more. I am taking a rather pragmatic approach: Use all technologies that help to meet your requirements. First collect your requirements and use cases. Then build a baseline architecture. In the third step decide which technologies and tools to use for implementation. I have been involved in projects where the technology decisions came first. Interestingly enough, most of these projects failed either partially or completely. Sometimes, it would be really helpful to compare this technology-first approach with other areas. Want to cut a piece of wood into two halfs? Of course, you should use a screwdriver! Want to open your PC? Why not use a hammer for this problem? No person that is not completely insane would ever consider to solve the aforementioned problems with the stupid solutions I proposed. It is obvious that we should use tools and technologies only for what they were built for. Why should software development be so different? I love Java and .NET, and I stll love C++and CORBA because those technologies are extremely cool, each of them for a specific range of problem contexts. And what if there is a problem where we could use two or even all of them? That is even cooler because we got a choice.