Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
JVP's mid-tier inheritance challenge
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
JVP's mid-tier inheritance challenge
Miscellaneous
Thread ID:
00324138
Message ID:
00324138
Views:
74
I will throw out the same challenge to you as I did to some others up here not too long ago.

Give me a concrete middle-tier example were you make heavy use of inheritance. Keep in mind, the example cannot be contrived. You cannot use inheritance for the sake of inheritance. Rather, it needs to solve a major problem that could not be otherwise solved through patterns.

To date, nobody has accepted nor delivered on this challenge.


OK Buddy your on. I'm going to make a weak attempt here at disputing your challenge, not because I think your wrong but simply because I've spent the last four weeks designing an app that incorporates the use of inheritance for a future mid-tier component. I fully expect you to blow me out of the water here, but I figure I stand to learn a lot so here goes. Let's keep in mind I'm tap dancing around a confidentiality statement, so some things are generalized to protect my paycheck. Feel free to call me & beat up on specifics if you feel I stand any sort of chance of meeting your challenge < g >

Lets say we have a 16-bit FPW data mining app that is a successful commercial product. It is now time to make that app 32-bit, and it's meta data intensive with nothing coming close to the 2 gig limit so a VFP backend for the time being makes sense. The app needs to come up to standard in the 32-bit market, and then be supplemented with a future web app for on-demand report generation from the same data. We have some hefty application services for munging data. Conserative estimate - 75% of the data munging services required in the desktop version will need reused in the future web app. So in order to recoup some investment in the 32-bit desktop product when the time comes to do the web app, we designed the data munging services to be implemented in a stateless component. Lets call this stateless component DataMungeEngine.

The DataMungeEngine as been designed with all common services coded to an abstract base class. I then have two specific subclasses layed out that inherit that functionality, and add 2-3 UI specific functions. One subclass for the 32-bit DataMungeEngine that will be built into the 2-tier app, and another subclass for future use as a true mid tier component in the web app. IOW my mid-tier use inheritance allows me to reincarnate my DataMungeEngine from the initial 32-bit desktop purpose with very little additional development.

So my answer to your challenge is this - inheritance can be useful in the middle tier if your implementing a stateless component, common to a specific domain of functionality, that gets used in multiple applications.

(ok lemme brace myself & find my life vest... I figure impact from getting blown out of the water here is darn near inevitable)
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Next
Reply
Map
View

Click here to load this message in the networking platform