Page 1 of 1
The focus of design, interface or implementation?
Posted: Tue May 03, 2011 1:56 am
by smwikipedia
Hi,
As I am foreseeing my file system and hard disk driver, I come across the question below:
Should I put my focus on interface or implementation?
I want to make a system prototype as quickly as possible. So my file system could be as simple as a table with only 2 columns as below:
(file_name , sector_index)
I think it's more important to design a good interface than detailed implementation for a quick prototype.
Any comments will be appreciated..
Thanks!
Re: The focus of design, interface or implementation?
Posted: Tue May 03, 2011 2:23 am
by Solar
"Quick prototype" and "design considerations" doesn't really mix. Either you design something carefully - then it's not a prototype. Or you hack something together all quick-quick, then don't worry about design, but worry about destroying that prototype ASAP so it does not escape into production use. (Happens too often.)
As for interface vs. implementation... a carefully designed interface allows the implementation to be changed fundamentally without change of interface. Also, interface changes usually require extensive adaptions of client code. So I say, interface is more important.
However, in order to come up with such an interface, you have to be aware of existing and / or desirable implementations for the subject, so your interface will be flexible and efficient enough to survive the test of time (and implementation changes).
Re: The focus of design, interface or implementation?
Posted: Tue May 03, 2011 6:06 am
by rdos
I find it more or less impossible to separate design and implementation for complex projects like OSes. Problems with designs too often won't show-up until in the implementation phase, and some algorithms even need to be tested (which means implemented) before they can be accepted as "best solutions". A good, flexible, interface is the most important. Changing interface often is more problematic than switching designs or fixing quick-and-dirty implementations.
Re: The focus of design, interface or implementation?
Posted: Tue May 03, 2011 6:33 am
by NickJohnson
I tend to combine all three tactics: I write a few quick and dirty implementations to test out possibilities, then I come up with a nice interface, then I replace the prototype implementation with a better one. This does take more time than just researching and implementing a single good solution, but I find it to produce better interfaces when it works.