A few years ago, I was talking with a colleague at Duke Energy in Charlotte, NC about what he does on a daily basis as a software architect. He gives me the usual answer about meetings and donuts and drawing boxes. Then, he starts talking about Enterprise Architecture (EA) and how great it is and how I should learn it until basically I asked him for his driver's license to make sure his name wasn't Oral. (Yes, I know he's dead. Too soon? Oral, not the Architect)
I did a little research into what was going on with the various frameworks (EA, DODAF, FEAF, MODAF, TOGAF, Zachman). What I found was, at a high level, they are only good for documentation. EA and TOGAF actually give you some large boxes on where to put your code, but Zachman, DODAF, FEAF and MODAF just show you how to organize your thoughts and plan for the movement and integration of data.
So you framework people are telling me that I need help conceptualizing the solution, not actually designing and building it? No wonder nobody seems to be able to get things done. As a kid, I thought we'd be in the Star Trek Universe by now, where people were freed from the drudgery of work and making a living because the computers were doing all the heavy lifting, freeing us to think and innovate, to solve really interesting problems instead of producing widgets or TPS reports with or without the correct cover sheet. Instead, we have spreadsheets and email and business as usual, the same as it was in 1843, except that Bob Cratchit doesn't have ink stains on his fingers and he can email his spreadsheets to old Ebeneezer instead of hoofing them over. Sometimes they do still hoof them over. We call that SneakerNet. NikeNet if it's a really good network.
So today, I came across Paul Preiss' article "Why Frameworks Are Killing Architecture" and I thought, 'finally,someone who gets it. Paul does get it, kind of. Here are his five reasons he states NOT to use an Architectural Framework:
- Frameworks get in the way of innovation
- Frameworks put the focus on deliverable instead of outcome
- Frameworks create poorly skilled architects
- Frameworks make hiring architects more difficult
- Frameworks allow architects to keep 'killing patients'
I've linked to the article so you can research that last one yourself. He then goes on to explain why you should simply change your approach to AFs:
- Move to only working with individuals who a have achieved an experience based certification in architecture
- Optionally pay for the personal development roadmap of your current people, not your future staff
- Measure your architects based on business outcomes
- Start measuring outcomes related to design decisions and share results
Well, you had me at the first five. "Measure architects based on outcomes" is a great thing to do, but the people cutting the checks can't see or understand the design decisions and the reasons that they are made, so that kills the only one that really made any sense, number 4, pay for performance. Which brings me to the conclusion: Either you can write the code, or you can't. If you can't write the code, AFs are a really good way for you to get away with drawing boxes, attending meetings, eating donuts all day and getting nothing accomplished while drawing a paycheck.
If you've been following along, you know that only once have we pointed out a problem without offering a solution. Here is what we replace these Architectural Frameworks with:
- Identify the entities in the Enterprise, like employees, structures, capital assets, processes and everything else
- Identify the attributes of the entities, last name, date of purchase, hours run and everything else
- Identify the relationships between these entities, basically either one to one or one to many.
- Identify the desired outputs such as production reports, P&L, purchases, sales and even tax returns. We will no longer be producing TPS reports, with or without the correct cover sheet.
Build a database that contains all the entities, their attributes and relationships. Design and build a piece of software that looks at this database and builds a middle tier to support Create, Read, Update, Delete and Search (CRUDS (CRUD + Search)) and looking at related data in this database. If we have a database table of students and a database table of classes we need to generate the code to get a list of classes for each student and a list of students given a ClassID automatically. We don't want our developers to write that mundane stuff. Read all about developers a little below. Design and build a tool to generate a User Interface (UI) based on the generated middle tier.
There are tons of tools out there to generate the middle tier, and I dislike them all. (N)Hibernate and Entity Framework immediately come to mind but I don't like them because they create big, mysterious 'black boxes' that work black magic and might end up in possession of your soul at the end of the contract. You can't see what SQL is getting generated and what it is doing to your database. If you have performance problems, and you will, there is literally no way to solve them. Further, it is a security nightmare since the tables are opened up to the generated SQL they produce. this also opens the tables to hackers and what are called SQL Injection Attacks. We built a tool that uses Stored Procedures exclusively and locks down the tables to anyone who doesn't wear the System Administrator's underwear. Or shave his ugly mug in the morning. That's not mean, I'm the System Administrator. Mostly.
We have a tool to consume our generated middle tier on the desktop and Microsoft was generous enough to build a tool that creates MVC web forms based on the generated Model (middle tier) from above. Given a good database design, we can generate about 80% of a new application. The other 20% is making it pretty and adding visual gewgaws like datepickers and modal dialogs for additional input or information. That part of the development can be handled by a junior developer.
This does a couple of things for us. We have the ability now to generate ONE piece of software to run the enterprise. Think of the traveling salesman problem. As the number of stops increases, the time to come up with the best route increases. As the number of stops approaches infinity, the time to calculate a solution also approaches infinity. Until you generate the solution. That makes the ONE piece of software conceivable and even buildable. Further, since the framework is followed to the letter, this obviates the need for Zachman, DODAF, FEAF and MODAF becuase they are about figuring out where the data sits and integrating it. If we generate the code, we already have a framework that we might describe with the other two, EA and TOGAF, and since everything is done the same way, every time, we need minimal documentation which is really what they are meant to produce. Additionally, if we find later that we made a mistake, or we found a better way to do things, we change the structure of the database or we simply need a new version, we simply reconfigure the code generator and regenerate the middle tier.
Here at Sentia Systems We are moving away from an object oriented (OO) middle tier where adding a member to a collection adds it to the database, to a hybrid OO/Dependency Injection (DI) middle tier where if we want to use DI, we can but otherwise the default OO solution continues to work. When we pull that trigger, we'll regenerate the middle tier and nobody will ever know that they have a completely redesigned and rebuilt middle tier (about 65-70% of the application), it will just continue to work, just with the new DI capabilities.
So yes, Frameworks ARE killing Architecture. If you are a junior guy, you are probably going to use Access or loop through records in Java or make whatever other mistakes junior developers make, but you don't need a framework for that. If you are a senior guy, you don't need the frameworks getting in the way of doing the real heavy lifting of design and development and so some MBA feels better about hiring you to do something he doesn't understand. If you are about producing documentation, reams of paper, to tell you what was done and how it was done, nobody needs you. That stuff isn't even read most of the time, and doing things the exact same way, every time eliminates the need for that anyway.
The conclusion is that frameworks don't add value and they don't write software. They are a solution looking for a problem.