Hey, look at that, Barack won the election.
When I left off I was talking about a great new development methodology, called Interface-Driven Development. Yes, with all capitals. You can read all about the principles in the last article.
Team Organization
Many development teams are organized “horizontally.” That is to say, different team members have different specialties, and they gravitate towards working on those parts of the system. This happens a lot in shops which use giant systems like Oracle, and in Waterfall organizations where the parts of the application are gone over in excruciating detail and doled out to developers at the end.
This causes several problems:
- Developers who specialize don’t learn how to do anything else other than their main skill.
- It is easy to shirk off responsibility to other people. It’s a database problem!
- There is a lot of waiting around waiting for the other teams to finish their stuff.
Interface-Driven Development focuses on having “vertical” teams, with each developer solely responsible for every aspect of their part of the overall software system. Craig handles the whole blog and nothing but the blog; every table is created by him, every model class, and every web page. When it comes to the blog, he is the final arbiter. Others can make suggestions, and he can ask for advice, but he owns it. It becomes his Product, and it is his job to make sure it meets the needs of the other team members as well as the application as a whole.
This is madness, you say. Won’t the schema get messy? And what if he sucks as a web designer? How can we be sure he knows what he is doing?
Read on for the answers.
Interfaces
Obviously, letting developers loose on a shared database can be unnerving. This is why each Product gets its own schema on the shared database instance where the developers can go wild. (Common functionality such as user logins and access controls are provided by another Product, or possibly through a business rules engine if one is handy) They can create tables as they please, drop and add columns, use or not use stored procedures, whatever.
What gives them this flexibility are Interfaces.
Interfaces are the contracts between Products. During the first phase of the project, when the Products are being given out to developers, all of their interactions are discussed. Paul might say to Craig, “Hey, I need a way to get a listing of all your blog articles” or “Hey, I need a search function where I provide you a random text string and you return me a list of titles, article summaries, and links in order of relevance.” Craig then defines an Interface using common web service protocols (REST, SOAP, XML-RPC) that meets all of the needs of the other Products.
It doesn’t matter what the blog schema looks like because no other developer sees it. They interact with it solely through the Interfaces.
The Front End
At the start of the project, the developers also need to figure out the user interface for the application. Walking through a few use cases, (how many doesn’t matter, you can iterate later) they develop the UI Palette for the application. The UI Palette consists of the following things:
- Screen Chrome: Logos, Logout Buttons, My Account Links, Copyright Notices, etc.
- Primary Nav: Tabs
- Secondary Nav: Sub Tabs, Breadcrumbs, Section Splash Pages
- Forms: Inputs, Textareas, Buttons, Form Tabs, Dropdowns, Calendar Popups, AJAX Controls, etc.
- Tabular Data: Tables, Filters, Column Sorting, Pagination, Search Boxes, etc
- Content Rules: Panels, List and Paragraphs Styles, Headings, Alert Boxes
Once the Palette is built, it is marked up quickly, CSS is put together, and an appropriate Javascript library is found or built that will handle any additional widgets. If the team decides to use a view layer toolkit such as Smarty in PHP or tag libraries in Java, they can build out their various components there for an even deeper level of integration.
With the UI Palette in place, any developer can build web pages that look as pretty as those from the best designer on the team. All of the components are standardized. After the Products are released, the other team members can also make suggestions on how things might be better; since they are Customers it is logical that they would have feedback.
Responsibility and Authority
Since a developer owns their Product, they have a vested interest in making sure it is successful and thriving. They have the responsibility to make sure it works for all of their Customers and the authority to do whatever is needed codewise to make it happen.
This is a powerful combination that isn’t often found together, and it tends to bring out the best in people. I have found that most developers throw themselves into projects where they get to do everything themselves. For most, it is an opportunity to “do it the right way” that they always wish they had during all the water cooler conversations.
It isn’t ideal for everyone though, and that is also a good thing. Interface-Driven Development makes it apparent very quickly who can’t keep up with the rest of the team, and gives management a chance to reassign them elsewhere.
In my next article I will walk through a brief sample project to show how Interface-Driven Development works.
Til next time.