Forums Register Login

Database and extensibility

+Pie Number of slices to send: Send
Hi, when reading my db data, I convert all bytes to characters and it works well. However, shall we perform a check that the field value is numeric/not numeric? I mean this for extensibility. If we give for granted that each field value is a string, what would it happen tomorrow if a numeric field would be added?
Am I asking too many questions?
Marco
+Pie Number of slices to send: Send
Don't fall into the trap of trying to make sure that anything that can happen will be handled by your program. If something isn't stated in the assignment spec, just leave it alone. Not only will you not get any extra points for doing extra stuff, but you also open yourself up to extra bugs and issues which can bring down your score or even fail you.
There is a balance between making a good design and doing everything possible. Lot of people hardcode the db schema information into the data access class, while others made some sort of meta information class to use. Either approach seems to be valid, but keep it tempered. Don't get carried away.
Any time you hear your brain mutter "extensibility" kick it. (Or at least question it).
+Pie Number of slices to send: Send
I agree with Nathan.
Some time before, when I had asked similar questions, Andrew had suggested me XP's YAGNI Approach . Do read it. It is an interesting view that sounds logical for practial projects
Did you just should on me? You should read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 663 times.
Similar Threads
h:inputText field, Numeric and Length validation
magic cookie ?
giving a choice selection a double value
EL Question
how to retrieve value of PK , when it is composed of more than one columns
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:14:36.