I'm currently developing a commercial application that will be using a datasource (SQL Server in most cases) w/ several tables. My last few attempts have ended up in the recycle bin after I became discouraged and knew I could do better. Now I'm basically starting over (minus the knowledge and experience gained from my past attempts) and see two basic options:
1 - I can design the database first complete with stored procedures. Then write a minimal amount of code to pull items from the database using simple forms and the stored procedures. In this case, the program really won't know much about the data it's pulling from or storing to the database.
2 - I can design the code first, implementing classes for every aspect necessary for this program. Then I could model the database after these classes. In this case, the program would be much more aware of the data and would act as the gatekeeper. Data validation would be much more clean since I could implement it at the class level, however this appears to be infinitely more work. Any changes made to code later may require changes to the database's design as well.
I was hoping to hear arguments for each side. Naturally, I want my program to be aware of what it's handling, but I want to make sure it will be worth the extra effort required before I decide. Thanks!
1 - I can design the database first complete with stored procedures. Then write a minimal amount of code to pull items from the database using simple forms and the stored procedures. In this case, the program really won't know much about the data it's pulling from or storing to the database.
2 - I can design the code first, implementing classes for every aspect necessary for this program. Then I could model the database after these classes. In this case, the program would be much more aware of the data and would act as the gatekeeper. Data validation would be much more clean since I could implement it at the class level, however this appears to be infinitely more work. Any changes made to code later may require changes to the database's design as well.
I was hoping to hear arguments for each side. Naturally, I want my program to be aware of what it's handling, but I want to make sure it will be worth the extra effort required before I decide. Thanks!