in reply to API Interfaces

I suppose it depends. "Thoroughly" and "Ever" are pretty strong words. After all, you can spend so much time designing and planning that your project sponsors get tired of seeing no progress. (I know this from experience.) Similarly, if you're not willing to change your API, then you prevent it from evolving and improving.

Instead, I think it's wiser to pick the most common operations, design them orthogonally, and then let the API grow organically as needed. If you start with 20% that you'll need 80% of the time, you've got something you can base continued progess on.

It's hard to be more specific without details, but let's assume you're building a custom API for handling a database, one that matches your local standards and idioms. Given that, you then know the basic operations: create, alter, insert, delete, select, update, and so on. Implement those quickly and then produce a simple front-end for testing and evaluation. Let people see that and start providing input. You'll start getting immediate feedback and they'll see appreciable progress.

You have to use care and common sense, of course. After all, you don't want to reinvent the wheel (as in there are a lot of existing database API's available that already handle those atomic operations) nor do you want to short-sheet those using your API.

Inflexibility leads to brittleness and breakage (as it does in real life). If you do not allow yourself to back-track, re-design, improve, update, maintain, and so on, then how will you ever improve quality, performance, and flexibility?

--f

Replies are listed 'Best First'.
Re: Re: API Interfaces
by zakzebrowski (Curate) on May 08, 2001 at 20:00 UTC
    Part of the problem was that I was in a cranky mood and was like "why did i take the time to design this interace when all of the sudden you introduce new requirements... and they don't make sense!" Just frustration... I was just doing sanity checking... (and, of course, I'm insane...)

    ----
    Zak

      Been there; got the scars. :-}

      Dancing requirements are one reason why I try to follow the MVC (model, view, controller) philosophy, as well as (more recently) designing for orthogonality. If you work on little pieces, they can be reassembled as needed; you also stay focused on what's important...getting the job done and staying flexible enough to stay employed.

      Allow me to suggest The Pragmatic Programmer as something to take your mind away from the real-world aggravations, as well as providing some solid ideas for living effectively in an agravating development world. Indeed, it can help make that world less troublesome.

      --f

        Good idea... will do... :) Now if I could only get my supervisor to read the book.... :)

        ----
        Zak