The focus of design, interface or implementation?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
smwikipedia
Member
Member
Posts: 49
Joined: Tue Apr 20, 2010 1:11 am

The focus of design, interface or implementation?

Post 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!
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: The focus of design, interface or implementation?

Post 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).
Every good solution is obvious once you've found it.
rdos
Member
Member
Posts: 3310
Joined: Wed Oct 01, 2008 1:55 pm

Re: The focus of design, interface or implementation?

Post 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.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: The focus of design, interface or implementation?

Post 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.
Post Reply