[AccessD] Class costs & benefits

jwcolby jwcolby at colbyconsulting.com
Wed Feb 25 16:57:29 CST 2009


William,

AFAIK multiple inheritance is not possible in .Net either right?

So yes, inheritance is a really cool feature, and it does not exist in Access.

OTOH, even in .Net there are things that you want to program that don't inherit from anything. 
Business class objects come to mind.

I'll tell you a little story.

When I was in Mexico I was worked on a vending machine project, broken into three parts.  There was 
a database in a handheld computer, written in Foxpro for DOS (no inheritance).  There was a database 
on the desktop written in FoxPro for Windows which had inheritance, and there was the vending 
machine itself (my part) written in C running on a ZWorld z80 based uC.  The HH code was written and 
debugged.  The vending machine code was written and debugged.  The desktop db was hopelessly bogged 
down in discussions on what should be inheriting what base stuff, what should be inheriting from the 
stuff that they managed to write etc.  It was fascinating to sit at the edges of and watch.

Now... this was mid 90s and I guess that the inheritance thing was new to these guys but the point 
remains that inheritance is a double edged sword.  Once you understand and can correctly and quickly 
make such choices, it can be very powerful.  Until that point you can flounder around a lot...

I do agree that the .Net framework is one of the most powerful frameworks I have ever seen.  Nothing 
short of awesome IMHO.

John W. Colby
www.ColbyConsulting.com


William Hindman wrote:
> ...ok ...a basic view ...the real value comes when you can inherit from more 
> than one object and you can pick and choose what you inherit ...within 
> reason, you can build practically anything without having to start from 
> scratch ...VS gives you some basic tools, a grid for instance ...and you can 
> go a long time before it dawns on you that you don't have to accept that 
> basic grid ...you can reach back in the object hierarchy and build a grid 
> that does what YOU need ...a treeview with a grid node for instance ...all 
> without having to lay out bucks for third party tools that only do half of 
> what you wanted.
> 
> ...to me, that's the real value of working with dot net ...there is sooooo 
> much built in high level stuff that lets you easily build low level custom 
> objects for your apps ...and sooooooo many blogs out there with guys doing 
> highly creative things that its nigh impossible to keep up.
> 
> William
> 
> --------------------------------------------------
> From: "jwcolby" <jwcolby at colbyconsulting.com>
> Sent: Wednesday, February 25, 2009 4:14 PM
> To: "Access Developers discussion and problem solving" 
> <accessd at databaseadvisors.com>
> Subject: Re: [AccessD] Class costs & benefits
> 
>> The simplest illustration is to say that inheritance is the ability to 
>> define your own object as
>> starting from something already in existence.
>>
>> Inheritance in the programming world mimics inheritance in the genetic 
>> world except that in most
>> languages you are only allowed to inherit properties from a single parent.
>>
>> So.  I am my dad.  I get everything my dad has, his eyes, his height, his 
>> race, his ...
>>
>> I add to what I inherited.
>>
>> I add a bunch of extra pounds.  I add the experience of living in Mexico 
>> for five years.  I add the
>> knowledge of building computers.
>>
>> In programming.  I inherit a text control.  I add code to check my control 
>> source to see what data
>> type it is.  I then add new method to make my display format depend on the 
>> data type I am bound to.
>>
>> I have all of the normal properties of a text box.  I can generate all of 
>> the events that the text
>> box generated.  But I have additional code to check my data type and 
>> format myself differently
>> depending on the data type.  And other useful things.
>>
>> That in a nutshell is inheritance.
>>
>> Access does not have inheritance.  That doesn't Accesses classes useless 
>> however.  A class is far
>> more than the ability to inherit another object, even in languages where 
>> inheritance is possible.
>>
>> John W. Colby
>> www.ColbyConsulting.com
>>
>>
>> Rocky Smolin at Beach Access Software wrote:
>>> "I will promise to treat every opinion as valid and not go into rant 
>>> mode.
>>> ;)" Gonna be a pretty dull thread.
>>>
>>> For those of who don't know, can you define inheritance?
>>>
>>>
>>> Rocky Smolin
>>> Beach Access Software
>>> 858-259-4334
>>> www.e-z-mrp.com
>>> www.bchacc.com
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: accessd-bounces at databaseadvisors.com
>>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
>>> Sent: Wednesday, February 25, 2009 7:48 AM
>>> To: Access Developers discussion and problem solving
>>> Subject: [AccessD] Class costs & benefits
>>>
>>>  From Rocky's email I thought that perhaps a thread on what the costs and
>>> benefits are for classes.
>>>
>>> Jim made a statement that he felt that "Access has no implementation
>>> inheritance and since inheritance really is the whole point of using
>>> classes, I think they are more or less a waste in Access".
>>>
>>> So what are your feelings and opinions about classes?
>>>
>>> I will promise to treat every opinion as valid and not go into rant mode.
>>> ;)
>>>
>>> In fact I will promise to not respond to any message unless the author
>>> specifically asks me to for some reason.
>>>
>>> --
>>> John W. Colby
>>> www.ColbyConsulting.com
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> http://databaseadvisors.com/mailman/listinfo/accessd
>>> Website: http://www.databaseadvisors.com
>>>
>> -- 
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
> 



More information about the AccessD mailing list