• Post Reply Bookmark Topic Watch Topic
  • New Topic

URLyBird: Database schema

 
Matt Sheehan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it necessary to read the schema upon execution of the DB? Some of this info already needs to be hard-coded into the client GUI, doesn't it? So is this info ok to be hardcoded for all purposes?
 
mike acre
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing needs to be hardcoded anywhere.
Obviously there is sliding scale of complexity depending on how much you hard code.

I would think about rather which tiers can easily be ignorant of there use and which ones make sense to be less flexible and have 'spec nuggets' included, even then you can probably get the hard coded stuff into just two or three classes at most.

I think you will make it easy on your self if your view is specific to the application.
 
Matt Sheehan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Mike. That makes sense.
 
james airey
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am taking the approach of hard coding the schema (in a Schema class), but I am also reading it from the DB when I load it, and validating that the 2 are the same.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!