Developing COM apps in a Smalltalk style

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Developing COM apps in a Smalltalk style

Andy Burnett
I am building some very simple database apps which will read and write
to the Lotus Domino back-end via COM. Thanks to this group I have the
basic COM stuff working but I am now faced with a design question.

I started building the app but found that my methods were becoming very
long - basically looping through the rows in a database table to
extract the values.  So, I then changed my thinking to try to include
the methods in the appropriate DominoIView etc classes which the
Active-X wizard had created. However, I am concerned that if Lotus made
changes to the COM objects and I had to regenerate the interfaces, I
would presumably lose my methods.

So, how do other people deal with this problem. Do you create
additional wrapper classes which act as your models or do you develop
directly in the active-x classes, or do something else completely?

Cheers
AB


Reply | Threaded
Open this post in threaded view
|

Re: Developing COM apps in a Smalltalk style

Don Rylander-5
Andy,
<[hidden email]> wrote in message
news:[hidden email]...
[...]
> So, how do other people deal with this problem. Do you create
> additional wrapper classes which act as your models or do you develop
> directly in the active-x classes, or do something else completely?
If you look at the class categories for your the generated methods, you'll
notice they're in the auto-generated category.  Removing a generated method
from that category means that it won't be overwritten even if you
re-generate the interfaces.

That said, I tend not to add a lot of functionality to the interface
classes, partly for the reasons you suggest, partly to keep classes as
simple as possible (which isn't always that simple anyway).  If something is
generally useful (e.g., I find myself always having to convert something
from a string to a collection), I'll add it to the interface class.  I try
to keep my application functionality in my own classes.

As with most things, your mileage may vary...

HTH,

Don

>
> Cheers
> AB
>


Reply | Threaded
Open this post in threaded view
|

Re: Developing COM apps in a Smalltalk style

Andy Burnett
Thanks Don, that is very helpful.

So, given that the Domino COM classes are essentially back-end models,
would you build your 'wrapper' (or perhaps meta-wrapper) classes as
subclasses of Model?  What I was thinking was that if I subclassed
Model and then included the various parts of the Domino COM objects
within my Model, it should make it easier to then use the existing e.g.
ListPresenter etc.

Does that seem like a reasonable approach?

Cheers
AB


Reply | Threaded
Open this post in threaded view
|

Re: Developing COM apps in a Smalltalk style

Don Rylander-3
Andy
<[hidden email]> wrote in message
news:[hidden email]...

>
> Thanks Don, that is very helpful.
>
> So, given that the Domino COM classes are essentially back-end models,
> would you build your 'wrapper' (or perhaps meta-wrapper) classes as
> subclasses of Model?  What I was thinking was that if I subclassed
> Model and then included the various parts of the Domino COM objects
> within my Model, it should make it easier to then use the existing e.g.
> ListPresenter etc.
>
> Does that seem like a reasonable approach?

Sounds reasonable to me.  I don't know how much development experience you
have, but I'd just recommend that you don't overthink how you organize
everything, particularly on the first iteration of your first Smalltalk
application.  The one thing you can count on is that you'll want to
reorganize (refactor) things as you learn more about Smalltalk and about the
problem you're trying to solve.

HTH,

Don


>
> Cheers
> AB
>


Reply | Threaded
Open this post in threaded view
|

Re: Developing COM apps in a Smalltalk style

Andy Burnett
Great, I shall go and explore.

TVM
AB


Reply | Threaded
Open this post in threaded view
|

Re: Developing COM apps in a Smalltalk style

Chris Uppal-3
In reply to this post by Andy Burnett
[hidden email] wrote:

> However, I am concerned that if Lotus made
> changes to the COM objects and I had to regenerate the interfaces, I
> would presumably lose my methods.

Don't forget that you can put your additional, hand-written, methods into a
different package from the automatically-generated stuff.

    -- chris