This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi,there. I just downloaded the new version assignment, whcih has clearly listed out the structure of db.db. And I wondered if I could define "field numbers","length of field" and "length of record" as constant. You know, doing this will save much work. Thanks in advance!
My two cents - I do think that it might be nice to define things like record lengths, record names, etc. as final, since there's no reason for these things to change once they're initialized. The trick is to make sure that they're properly initialized (by reading the DB file header) by the time the appropriate constructor or / class initializer ends. And (more annoyingly) to convince the compiler that they're really initialized. I find that if I initialize all the instance finals in the constructor, the compiler is happy - but if I try to extract this to a separate (private) method for readability, the compiler whines about blank final fields. Very annoying. So I remove the "final" while refactoring, but I'm hoping to put it back in later...
"I'm not back." - Bill Harding, Twister
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com