Data-First development is an idea that I’ve had for a while and it’s the way I approach most development projects these days. I’m sure that you will have done it too, but just never quite thought about it.
The way I see development is to start with the data. At the very beginning of a project it’s important to get the specification right, and as part of that – design the data store and models. That makes sense, but once they are designed they are inherently forgotten about until they need to be changed.
Instead, I propose a simple workflow that at the start of the project admin interfaces to manage the data is the first thing that is built. There are a few reasons.
- Any issues with the model definitions can be found and changed incredibly easily early on
- Admin interfaces are usually fairly simply in comparison to the main application
- After launch there will be no need to manually edit data in the database
And with that, behold stage two!
Now that the model interfaces are pretty close, it’s important to design the application with a close server – client model. Specifically, a data driven one.
And here’s where the problems start. The fact that we’ve changed just a single element means that the tree-view it’s in needs to be rebuilt. The information slides need to be refreshed and generally these can take a while.
With data-first development this is almost nullified. The idea being that the client side has a basic understanding of how the view is composed and the server sends enough information to be able to manipulate it. So instead of refreshing a section, the JS can manipulate its internal data-store and then update the UI directly.
It’s not easy to implement, and will struggle if it’s an after thought. But generally, I believe, that getting it right first time will save a whole headache of problems.