If I were an architect

The client I was at for the last three weeks has enough teams working on a single code base that they have an architect role (indeed, a distinct architecture team). That’s made me wonder what I would do were I on that team, given my awfully iterative, refactor-your-architecture-into-being biases.

About those biases

The way I was taught to do architecture was like this:

You think and think and think, and design an infrastructure that will support the needed features. Then you add the features, one by one. The first part is the hard part, which makes the second part easy.

That approach still has enormous appeal for me, but it’s really hard to pull it off. The design is so often wrong, and the features don’t require what you expected, and the infrastructure needs to be changed, but you had no practice changing it, so it’s hard to change it right, and the lesser programmers who are supposed to be doing the features are standing around tapping their feet, or (worse!) they’re not standing around, they’re implementing the features anyway and doing all sorts of hackery to make up for the infrastructure failings, and you were supposed to be this godlike disembodied intelligence that Gets It Right, but now everyone scorns you.

So the safer approach is to start with a single feature and implement it as a “vertical slice” (in a web app, from javascript down to database):

Now you implement the next slice:

Amazingly, the second slice does some things quite similar to what the first one did. Either during the slice’s development or just after, factor that commonality out into shared code:

Repeat the process with each new slice, constantly finding and factoring common behavior:

The end result is a system with an infrastructure:

Moreover, if you do it well, that infrastructure will look like it was designed by some really smart person who provided exactly (and only) the features needed by the current implementation. And it’s an infrastructure that’s well tuned to allow the sorts of changes and growth that the business will demand in the future (because it was built by responding to those sorts of changes in the past).

How often does this work superbly? Probably about as often as big-architecture-up-front does, but it seems to be less risky and (I’m inclined to believe) gets closer to a really good architecture more often.

What would I do?

My first (and ongoing) task as an architect would be modest. I would pair with people on the implementation of vertical slices, concentrating on being a moving information radiator. In some ways, an architecture is nothing but a bunch of libraries, but any library so restrictive that it can’t be misused is one that can’t be used well. People need to know how to use a library, and the best way of teaching them is to sit with them and show them. An effective project has a common style. It’s everyone’s job to develop and communicate that style, but it surely seems an architect ought to pay special attention to it.

I would also be an agent of intolerance. Programmers are way too tolerant of programming experiences that grate, that throw up friction to seemingly every action. They tweet that they spent the whole day shaving a yak as if that were a mildly humorous thing instead of an outrage. As I programmed with my pair, I would insist we remove the friction for the next person who’ll have to do something similar. If it means we miss our story estimate (we’re working on a real vertical slice, remember), so be it: I will model a calm resolve.

If I do this well, all the teams will know they certainly have permission to solve the many small problems that would otherwise slow them down. They won’t wait for someone else (the architect!) to fix them.

Having enlisted all the teams in putting out small fires, would I then leap toward grand architectural visions? Not if I could avoid it. I’d rather work on solving medium-scale problems. Those are problems that even I wouldn’t be willing to solve under the auspices of a single story.

Here might be a scenario: as before, I’m pairing with someone. We notice the need for some abstraction or other solution, one that’s too big to get right during this story or iteration. We can still do three things, though: (1) imagine what a good solution would look like, (2) imagine what sort of smaller steps might get us there, and (3) take the first step. We end up with a delivered story, some rough plans for the future, and code whose structure is more than the minimum required. For example, we might have pushed code out into a class in a new package/namespace. And we might have changed both our new code and some existing code similar to it to use that new package.

Now, I as architect will actively look for new stories that give excuses to take further steps toward the good solution. I’ll pair with people on those stories. We’ll use the stories as an excuse to flesh out the previous solution (in a way that either doesn’t break previous stories or adapts them to use the fleshed-out solution).

I fully expect that the original “good solution” will look somewhat naive partway through this process. That’s fine. If I’m an architect, I’m supposed to be good at adjusting my path as I traverse it.

Eventually, we have a decent solution, some vertical slices that use it, some vertical slices that don’t use it, and some vertical slices that use it in a sort of halfway, intermediate, not-quite-right way. It’s my job to make sure code doesn’t get frozen in that state. Partly that’s a matter of helping on stories that give us an excuse to fix up some vertical slice. Partly that’s making sure my pairing results in ever more people who know how to use the solution and are sure to change code to use it when they get the excuse. (That’s the information radiator and agent of intolerance roles as applied to this one solution.)

What about the grand architectural vision? I don’t know. I’ve factored out medium-scale solutions, but I don’t have the personal experience to know how you get from one major architecture to a completely different one. I want to get vicarious experience in that this year.

So, I’d be nervous about big picture architecture, were I an architect. However, I’d take some comfort in knowing that we’d almost certainly be using frameworks that suggest their own architecture (Rails being a good example of that), and that we wouldn’t go too far wrong if we just did what our toolset wanted us to. (So, even though I’m personally fashionably skeptical of the value of object-relational mapping layers, I’d be conservative and use ActiveRecord, though I’d probably lean toward a development style like Avdi Grimm’s Objects on Rails.)

Still, there are two things I’d emphasize, if only out of fear of my own inexperience:

  • I do surely think that product directors should emphasize doing high-business-value work early and low- or speculative-business-value work later. However, as an architect, I’d be on the lookout for minimal marketable features that would stress the architecture, and I’d sweet-talk the product director into scheduling them earlier than she otherwise might. (Said sweet-talking would be easier because I’d always be concentrating on reinforcing the gift economy structure that makes Agile work.)

  • There exists an architectural change cycle that wastes endless amounts of money: humble programmers work within a given architecture, Architects That Be decree there will be a new one, programmers continue to work in old architecture because the new one isn’t available, the new architecture appears, programmers begin to use it, it turns out to have serious flaws, now the system has some code in architecture 1 and in architecture 2, all of which will be superseded by the “This time, definitely” architecture 3, etc.

    I’d hope to force myself to roll out any new architecture gradually (in increments, as it was developed). That imposes extra cost on architecture development and somewhat reduces the possibility of change, but my bet would be the business cost of that constraint would be less than that of a Big Bang rollout.

4 Responses to “If I were an architect”

  1. sconover Says:

    There are other options: there’s a lot to be gained from taking a few days at the beginning of a big effort, spiking, researching, and producing a basic informal design document, written by one or more developers, that you build consensus around. I think that’s a way of arriving more efficiently at the “mid-level architecture” you mention.

  2. Marcin Deryło Says:

    We got a framework cast upon us from ivory tower of R&D team, being developed completely out-of-sync with applications using it. This causes exactly the problems you’ve described - people hacking workarounds while waiting for the new version of some feature in framework, then trying to retrofit the framework into existing design, requesting tons of improvements and changes from the framework team. Or the R&D teams complains that noone is using their latest features, because people already have some solutions working and don’t want to switch unless management starts to push for the change. Unfortunately guys from R&D have good talk and managed to get some high management “on their side” and have no interest in allowing other devs influence the direction of their development.

  3. benfulton Says:

    “As I programmed with my pair, I would insist we remove the friction for the next person who’ll have to do something similar.”

    Yeah! So I’ll tell you what we’ll do. We’ll create this one big piece of infrastructure here that will support all the features everyone will ever have to add. Friction removed!

  4. Brian Marick Says:

    Twitter comment from Cory Foy:

    “What I teach teams at scale is to have an architectural vision, just don’t build it all out. Then, as slices of value are delivered, compare what you are building against the architectural vision. Combines planning with iterative development. So, as a team would have a product vision, they would also have architectural visions. Maybe even SOA, Service Bus, etc visions too.”

Leave a Reply

You must be logged in to post a comment.


  • Buying Cheap viagra pharmacy. Worldwide Rx, Best Prices. WorldWide Shipping.
  • Buy Cheap viagra purchase Online Best Online. No Prescription Needed.
  • Buy Cheap viagra gel jelly Now Low Prices. FDA Approved Rx: Online Pharmacy.
  • Buy Cheap bayer levitra professional pro Now Free Viagra Pills! Top Online Pharmacy.
  • Buy Cheapest on line pharmacy viagra Now Best Internet. Buy Medications Online.
  • Buy Cheapest when to take viagra Now Buy Medications Online. Free Viagra Pills!
  • Buy Cheapest taking 2 20 mg cialis Online Discount Online Pharmacy. Best Internet.
  • Buy Cheapest the cialis Now Buy Medications Online. WorldWide Shipping.
  • Buy Cheap cialis website Now Guaranteed Shipping. Buy Medications Online.
  • Buy Cheapest cialis discoun Online Cheap Prescription Drugs. Best Online.
  • Buy Cheap viagra cheap online Now Low Prices. No Prescription Online Pharmacy.
  • Buy Cheapest buying cialis Now Pharmacy Store. 24/Online Pharmacy.
  • Buy Cheap purchase viagra Now Online Medical Shop. WorldWide Shipping.
  • Buy Cheapest overnight shipping of generic cialis Now Cheap Pharmacy Online. Best Drugstore.
  • Buy Cheap cheapest price for viagra Online Best Internet. Cheap Pharmacy Online.
  • Buy Cheap mens viagra Now Internet Prices For mens viagra! Best Internet.
  • Buy Cheap genaric cialis Online Free Viagra Pills! No Prescription Needed.
  • Buy Cheap cialis best price Now Low Prices. Discount Online Pharmacy Shopping.
  • Buy Cheap bayer levitra samples Now Cheap Prescription Drugs. Pharmacy Store.
  • Buy Cheapest legal generic cialis no prescription Now Best Drugstore. Top Online Pharmacy.
  • Buy Cheapest but cialis in us Now Best Prices. Drugs, Health And Beauty.
  • purchase viagra in australia Online Without Prescription Best Internet. Low Prices.
  • Buy Cheap viagra best price Online WorldWide Shipping. No Prescription Needed.
  • Buy Cheapest how long does viagra last Now Pharmacy Store. Cheap Online Pharmacy.
  • Buy Cheapest mail order viagra in uk Now WorldWide Shipping. Online Medical Shop.
  • Buy Cheapest levitra canada Online Low Prices. 24/Online Pharmacy.
  • Buy Cheap generic viagra soft tab fast Online 100% Satisfaction Guaranteed. Low Prices.
  • Buy Cheapest does viagra work Online Low Prices. Cheap Pharmacy Online.
  • Buy Cheapest buy cheap viagra soft Now Top Online Pharmacy. WorldWide Shipping.
  • Buy Cheapest cheap generic cialis Online Pharmacy At The Best Price! Best Online.
  • Buy Cheap try viagra for free Online Discount Online Pharmacy. Pharmacy Store.
  • Buy Cheap cialis multiple orgasms Online Online Prices For cialis multiple orgasms! Best Prices.
  • Buy Cheap viagra drug interaction Online Special Prices For viagra drug interaction! Best Online.
  • Buy Cheapest online viagra sale Now Best Prices. Discount Online Pharmacy.
  • Buy Cheap cialis faq Online Top Online Pharmacy. Cheap Online Pharmacy.
  • Buy Cheap viagra discount retail Now 100% Satisfaction Guaranteed. Pharmacy Store.
  • Buy Cheapest generic cheap viagra Online Best Prices. Online Medical Shop.
  • Buy Cheapest viagra price Online Online Medical Shop. Pharmacy Store.
  • Buy Cheap viagra generika Online 24/Online Pharmacy. Pharmacy Store.
  • Buy Cheap cialis info Online Pharmacy Store. Top Online Pharmacy.
  • Buy Cheapest buy uk viagra Online Guaranteed Shipping. Pharmacy Store.
  • Buy Cheapest viagra cheap Online Drugs, Health And Beauty. Best Online.
  • Buy Cheap highest safe dose of levitra Online Drugs, Health And Beauty. Best Prices.
  • Buy Cheapest brand viagra without prescription Now Free Viagra Pills! 24/Online Pharmacy.
  • Buy Cheapest buy viagra pill Online Best Internet. No Prescription Needed.
  • Buy Cheapest buy genuine levitra online Online Cheap Online Pharmacy. Low Prices.
  • Buy Cheapest difference between viagra cialas and levitra Now Pharmacy Store. Discount Pharmacy Online.
  • buy online viagra viagra Online Without Prescription Best Prices. Best Internet.
  • Buy Cheap generic cialis softtabs Now Buy Medications Online. Online Medical Shop.
  • Buy Cheapest cialis 36 hours Now 24/Online Pharmacy. Best Drugstore.
  • Buy Cheap viagra info Online Cheap Pharmacy Online. Free Viagra Pills!
  • Buy Cheap bayer levitra online pharmacy Now Best Prices. Special Prices For bayer levitra online pharmacy!
  • Buy Cheapest buy levitra us Now Pharmacy Store. Internet Prices For buy levitra us!
  • Buy Cheap cialis long term effects Online Best Drugstore. Guaranteed Shipping.
  • Buy Cheap cialis sample Online Top Online Pharmacy. Pharmacy Store.
  • Buy Cheapest order viagra now Now Online Medical Shop. Top Online Pharmacy.
  • Buy Cheap discount generic cialis Now Buy Medications Online. WorldWide Shipping.
  • Buy Cheapest levitra professional overnight delivery Online WorldWide Shipping. Best Drugstore.
  • Buy Cheap how many people use cialis Now Best Internet. The Largest Internet Pharmacy.
  • Buy real cialis Online Without Prescription. Best Prices. Best Online.
  • Buy Cheap taking viagra after cialis Now Drugs, Health And Beauty. Best Internet.
  • Buy Cheapest levitra web sites Now Best Drugstore. Cheap Pharmacy Online.
  • Buy Cheapest generic for levitra Online Free Viagra Pills! Online Medical Shop.
  • Buy Cheap cialis oral Online Special Prices For cialis oral! Pharmacy Store.
  • Buy Cheap buy 10 mg cialis Now No Prescription Needed. Pharmacy Store.
  • Buy Cheapest female use viagra Now 24/Online Pharmacy. Best Drugstore.
  • Buy Cheapest cheapest generic viagra Now WorldWide Shipping. Top Online Pharmacy.
  • Buy Cheapest buy brand name cialis Online Top Online Pharmacy. Best Online.
  • Buy Cheap levitra fda Now Top Online Pharmacy. 24/Online Pharmacy.
  • Buy Cheap discount priced viagra Now No Prescription Needed For Drugs. Best Online.
  • Buy Cheapest online drug purchase levitra Now Low Prices. Top Online Pharmacy Supplier.
  • Buy Cheapest purchase cialis Now Top Online Pharmacy. Cheap Pharmacy Online.
  • Buy Cheapest levitra alpha blockers Now Pharmacy Store. Drugs, Health And Beauty.
  • generic viagra online Online Without Prescription Best Drugstore. Low Prices.
  • Buy money order viagra Without Prescription Doctor. Best Internet. Best Prices.
  • Buy Cheapest cialis levia and viagra Now No Prescription Needed. Best Drugstore.
  • Buy Cheapest order viagra on line Now Best Internet. Discount Pharmacy Online.
  • Buy Cheapest viagra pills Online Discount Online Pharmacy. Best Prices.
  • Buy Cheapest find cialis Online Pharmacy Store. Cheap Pharmacy Online.
  • Buy Cheap viagra prescription Now No Prescription Online Pharmacy. Best Online.
  • Buy Cheap where can i buy viagra online? Now Top Online Pharmacy. Cheap Online Pharmacy.
  • Buy Cheap buy viagra online pharmacy Online Best Online. 24/Internet)(safe Pharmacy.
  • Buy Cheap find cialis from mexico Online Online Medical Shop. Best Drugstore.
  • Buy Cheap viagra doses Now No Prescription Needed. Guaranteed Shipping.
  • Buy Cheap can young people take viagra Now Best Online. The Largest Internet Pharmacy.
  • Buy Cheapest buy cialis Now Best Prices. Cheap Prescription Drugs.
  • Buy Cheap pills viagra Now Free Viagra Pills! Discount Online Pharmacy.
  • Buy Cheapest order generic cialis Now Top Online Pharmacy Supplier. Low Prices.
  • Buy Cheapest viagra cialis store Online Low Prices. Cheap Online Pharmacy.
  • Buy Cheap levitra viagra cialis Now 24/Online Pharmacy. Cheap Pharmacy Online.
  • Buy Cheap cheap cialis sale online Now Top Online Pharmacy Supplier. Pharmacy Store.
  • Buy Cheap information cialis Now WorldWide Shipping. Discount Online Pharmacy.
  • Buy Cheapest mail order viagra online Online Cheap Pharmacy Online. Best Internet.
  • Buy Cheapest price of levitra Online Online Prices For price of levitra! Best Prices.
  • Buy Cheapest what is better viagra or levitra Now Discount Pharmacy Online. Low Prices.
  • Buy Cheapest what does viagra do to females Now Cheap Online Pharmacy. Free Viagra Pills!
  • Buy Cheap female version viagra Online Pharmacy At The Best Price! Best Internet.
  • Buy Cheap viagra without a prescription Online WorldWide Shipping. Free Viagra Pills!
  • Buy Cheapest levitra professional overnight delivery Now Drugs, Health And Beauty. Best Drugstore.
  • Buy Cheapest buy cialis without a prescription Now Best Drugstore. Discount Online Pharmacy.