A few more newbie questions.. 
Author Message
 A few more newbie questions..

Thanks to those who answered my MI question.  I will attempt to rework
the design, thankfully there are few classes that need it, but it really
is most elegant w/MI.  We'll see..

I have a few more questions, if anyone can answer them:

1.  Is there any way to add new classes (not instances but classes) to a
Smalltalk application as it executes?  In other words, extend the system
in realtime by creating new classes (possibly overriding existing
methods and creating new ones etc) as the app is running?  This may seem
bizarre but it is critical for my app.  I vaguely remember reading it is
possible because of the language's virtual-machine nature.

2.  I would like to save objects to a database and restore them later
on, but I don't want to deal with insane multiuser licensing fees.  Does
anyone have any suggestions?

that's all I can think of..

thanks again for your feedback

-mikep



Wed, 18 Jun 1902 08:00:00 GMT  
 A few more newbie questions..

Quote:

> Thanks to those who answered my MI question.  I will attempt to rework
> the design, thankfully there are few classes that need it, but it really
> is most elegant w/MI.  We'll see..

> I have a few more questions, if anyone can answer them:

> 1.  Is there any way to add new classes (not instances but classes) to a
> smalltalk application as it executes?  In other words, extend the system
> in realtime by creating new classes (possibly overriding existing
> methods and creating new ones etc) as the app is running?  This may seem
> bizarre but it is critical for my app.  I vaguely remember reading it is
> possible because of the language's virtual-machine nature.

> 2.  I would like to save objects to a database and restore them later
> on, but I don't want to deal with insane multiuser licensing fees.  Does
> anyone have any suggestions?

> that's all I can think of..

> thanks again for your feedback

> -mikep

  I can't speak too much to your first question other than to say that I think
all the methods and stuff required to create a class is part of the development
environment and not part of the usual run-time environment.  You might be
looking at royalties there.  I don't remember your earlier post, so I don't know
what dialect of Smalltalk you are using.  IBM Smalltalk keeps its
"subclass:instanceVariableNames:..." methods in the EmClassDevelopment
application which is not part of the runtime environment.

As to your second question, simply dumping an object for storage in an external
storage medium to pull it in later does not require a license, unless those
objects are part of the compiler or are other development environement
components.  Products that define an interface to a specific database sometimes
require fees, but you could write your own or use a product that requires no
fees.  In addition, the database itself might have multiuser fees associated
with it.  If cost is the issue, either write your own support or use an
essentially free database.  There are many options here.  Check them out in
light of your database requirements.  Remember, there is an addage I learned in
my Comp Sci class: "You pay for what you get."

The better question for #1 is why do you think you need to create a new class
"on the fly"?  Even if you could create the class, how would you define its
methods without a compiler?  There are ways to create dynamic objects.  Without
knowing your real needs (oops, I'm showing that I'm a programmer if I'm giving a
solution without knowing the requirements!) you could create objects that hold
their "instance variables" in a dictionary. Write setter and getter methods to
manipulate keys to the dictionary.  Each object can have its own attributes,
even having a kind of "doesNotUnderstand" process.

I think the design might be the place to look rather than the implementation
here.  I'll be glad to discuss options with you.  E-mail me directly since I
don't get to the newsgroup every day.

Tony Colle
Certified VisualAge for Smalltalk Developer



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. A few more newbie questions

2. Few newbie syntax questions

3. A few newbie questions...

4. a few newbie questions...

5. newbie....a few questions

6. Please asm newbie with few questions

7. Newbie here, a few questions

8. A few newbie questions

9. A few newbie questions

10. Newbie has a few questions

11. Some questions on elided text in the text widget (and a few other text widget questions)

12. Newbie Question (Was: Newbie Question...)

 

 
Powered by phpBB® Forum Software