Re: Getting started with object design



Responding to H. S. Lahman...

First of all, Thank you so much for your response. By reading your
answer, I'm absolutly sure that my explanation of the problem to solve
was very very incomplete :). Even though, many of the concepts you
explained are really useful, so thanks (again).
First of all, we are programming in Delphi 7. Ok, Delphi is not the
best language for OOP, but using it is one of our non functional
requirements.
Picasa is (Google's) application for organizing and cataloguing every
image (maybe I should say "photos"...) in someone's hard disk(s). The
idea is that you can create an album, add images to it, browse it,
view its pictures and, eventually, you can do some basic editing tasks
on them (rotate the image, cut and crop, adjust brightness, contrast,
reduce red eye effect, etc). The component suite we use to edit images
is ImageEn (www.hicomponents.com, which is probably the most powerful
for image processing in Delphi, and another of our non-functional
requirements). We created a class that interacts with those
components, and a Facade for it. We added a Facade because we suspect
that we will not use only ImageEn components, probably for some
editing tasks we'll need another, so we though that we would have an
"image processing subsystem" in the future (even today it has only one
class), and a Facade could provide a simple interface for it.
We are just starting with the development of the application, but we
already have the (obvious) classes "Album" and "Photo" (Album contains
photos, a user can have several albums, etc). In GUI, we use a
miniature view component (ImageEnMView) which displays, for example,
all the photos of an album. We had no idea where we should insert the
code to update that miniature view when, for example, you select a
different album... so and we added a GUI class which does those kinds of
things (maybe the name of the class is not the best considering the
class' responsibility...).
In some part of the screen we need to show an image that represents an
album. It is composed of a base image of a folder in which we insert a
miniature of one of the images contained in that album (similar at
what Windows does). To create that composed image, we need to get the
base folder image, resize it, get other the image (from the album),
resize it, apply a mask to combine both, etc. All those steps are
image processing tasks, methods implemented by the class that
interacts with ImageEn components, and they must be called
sequentially in order to get the desired composed image of an album.
So, GUI class puts the final image of an album (beautifully composed)
wherever it must be on the screen, and the image processing class
performs each one of the steps needed to get that image... but the
question is: which class implements a method that calls those methods
one after the other?

Again, thank you so much.
I'm going to read the Application Partitioning section of your blog
(and probably other sections too, it seems to be a lot of useful
information there).

Best regards,
Andrea Giorgetta

Your English is fine; better than a number of US compatriots I know. But
being Argentinean is a different problem... B-))
PD: It could be worse... ;)



.