in reply to Re: My first package - need help getting started
in thread My first package - need help getting started

pg,
Spot on! - except the filter (or at least I think).

I do not think (I could be wrong here) that the filter method should be part of the module. As in:

  • Stream of data is turned into object by module
  • Object is tested by program and possibly rejected
  • Object is possibly manipulated by program
  • Object is converted back to stream by module

    This allows the greatest flexibility over the filtration process as I do not know of all the ways it is currently being used, let alone all the way that it might be filtered on in the future.

    I really like the idea of having a default format method, but allowing it to be dynamic.

    This has really given me something to think about - would you mind critiquing some very bad code as soon as I get started? I have never built an object before, so I know my first attempt will be bad. If not - that is ok too.

    Thanks again and cheers - L~R

    • Comment on Re: Re: My first package - need help getting started
  • Replies are listed 'Best First'.
    Re: Re: Re: My first package - need help getting started
    by pg (Canon) on Feb 27, 2003 at 04:51 UTC
      ;-) Lots of time, you would see more than one design fly, and each of them is good. There is no black and white answer, and this is why computer science is both science and art.

      I agree that you can start with filter as part of your program, instead of a seperate module, but later if you see the functionality need to be reused, then abstract/extract a class out of your existing code.

      The traditional software engineering requires you to have everything laid out at the beginning, the design phase, and there is only one design phase. The modern software engineering does allow you to create your software cycle by cycle, each cycle is a whole traditional software life cycle, and has its own design phase. For each new cycle, new functionality would be added, and the design would be modified in a constructive way.

      This change of methodology is mainly because:

      1. people found there is no way that the traditional methodology would work for big systems/projects. It is simply impossible for people to get everything straight and right, once for forever.
      2. From a business view, companies some time want to be the first in the market. They have to prototype things, and quickly make their products available, worry more functions later.
      For sure, I would like to be one of the persons to do code review for you. By doing that, we can learn from each other.