4 ms·
I'm suprised by this point: "the database tends to be an after-thought in application design". Maybe it's a generational thing (I'm 40+), but I tend to always
by andysinclair 10y ago
I'm suprised by this point: "the database tends to be an after-thought in application design".
Maybe it's a generational thing (I'm 40+), but I tend to always start with thinking about the data structures and design in conjunction with the UI design.
Getting a solid database design in place early in the development cycle is critical to building a solid, stable system- you can of course alter the database as you start building but having a good idea of the data structure should be a "before thought" rather than a after-thought.
- joslin01 10y agoI'm 30- and I always start with the data first as well. Linus said good programmers always think data first, and that resonated a lot with me when I first started coding. As I got further along, I realized how true it was that application logic often follows the data model. Treating data as an afterthought is a great way to have to be re-defining your application logic every time you re-define your data because you forgot something.
- mercer 10y agoI agree, and I prioritize data structures myself as well, but only because I've been up here in the hizzle for the past three or so years (in a development career of six years) and I kept being reminded of it via the linus quote, and the whole functional programming kazoo. My experience is that lots of people, including people with many more years of development on me, don't take this approach though.
- combatentropy 10y agoIt was of all things a database book that advised me to begin with the user interface. It's counterintuitive because, isn't the database the foundation of the interface? Don't get me wrong. I don't roll an application into production until I've gone back and forth over both the interface and the database, until both satisfy me, the database is well-normalized, and so on. But when the first line of anything has yet to be written, I think I save a few iterations by first sketching out the fields and behavior of the user interface.
- Clubber 10y agoI agree with database first. It's the essence of your application, meaning hypothetically, if you were to strip away all your UI and business logic, and all your users were experts at SQL and never made a mistake, the database is all you would have left. Furthermore, a database mistake, once built on, will stay with your organization for life, only removable by a lot of pain. A coding mistake is fairly trivial to recover from. I find it troubling that many self taught programmers don't take the time to learn databases. They aren't even that difficult to master. 3NF, Constraints, Indexes. That covers 90% of it. Everyone thinks they're making Google.
- insulanian 10y agoOh yes! Database is the source of truth and often outlives the application on top of it. Also, functional programming teaches to first think about the data structures and then about the processes/operations.