Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI fields derived from DB Header?

 
Nina Binde
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read a lot of posts, but could not get a clear answer. Maybe someone here could give me suggestions.
I have the B&S project. I have harcoded all the field lengths and field names like the customer Id, name and location in my GUI layer. I was rethinking on this if we need to get all the metadata from the DB layer and have it dynamically done in the GUI? Again, I would think doing field lengths this way seems reasonable , but not the field names.
How are you guys going about it? Thank you for the replies.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Nina
I did the same things what you are thinking.
I fetch all fields name and length but dyamicly only field length is used.

But I read some threads here some guys did all dynamically but its really difficult to manage and maintain.
Do what you think easy.
 
rinke hoekstra
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nina,

I know people passed with 100% scores hardcoding it. My reasoning was, that if they want to extend this lousy database with extra fields anyways, I'd strongly recommend to redo it completely and replace it by relational database.
[ September 17, 2007: Message edited by: rinke hoekstra ]
 
Gabriel Vargas
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nina,

I do as is showed in Andrew's book for the value object i have the name of the headers in a array. The record lenghts are verified in the data layer not in the gui layer with the information readed from the header.

I hope it help you.
 
Mark Ebeling
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nina,
The one thing I did that I don't see mentioned here is that I hard-coded it, but also checked that what I read in matches the field names and lengths for all six fields. If there is a mis-match I post a message to the Log and screen, and exit. I am just a little nervous about this, since if the test file the examiners use has a slight difference, I am dead. But I am going to trust that they know what they are doing.
 
Nina Binde
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all the responses. I guess I will be doing more like Gabriel harcoding in the GUI, but making sure the data layer checks the field lengths.
Mark, yours would be similar , but you would go extra length in checking the field names too. What if the field name in the Database is not user friendly like "subcontractorname", it doesn't make sense to display as is to the user. That was my reasoning not to check for field names.
 
Mark Ebeling
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I don't display what is given, only what I have hard-coded. But if it was different I would error out and exit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic