Setting up class inheritance layers for StrataFrame classes


Author
Message
AlexSosa
AlexSosa
StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)
Group: Forum Members
Posts: 35, Visits: 138
When using VFP I've made it a practice to use two layers of inheritance for a purchased classes.  An intermediate, shared among several projects and one specific to a project.  The purchased classes are never changed, so updates are easy. 

While there are issues that must be addressed with compund objects, the practice has proven effective and I'd like to continue it with Strataframe.  What is the best way to go about it?  If someone can offer actual examples I would appreciate them very much.

TIA,

Alex

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Your best bet would be to create a core DLL that inherits the 3rd party classes.  Then, create a project-specific DLL that inherits them again.  There's not much more to it than that. Smile  We do the same thing.  Every project has its own Business and UI DLL that contain the inherited classes.
AlexSosa
AlexSosa
StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)
Group: Forum Members
Posts: 35, Visits: 138
Thank you, Ben, sounds reasonable.

From what you say you only subclass the Business and UI DLLs.  Is it too much to ask you to share the source of those (unchaged) inheriting DLLs?  At this stage I still suffer form "lack of ignorance" about ,NET Smile

That would be much appreciated.

Alex

Ben Chase (09/24/2007)
Your best bet would be to create a core DLL that inherits the 3rd party classes.  Then, create a project-specific DLL that inherits them again.  There's not much more to it than that. Smile  We do the same thing.  Every project has its own Business and UI DLL that contain the inherited classes.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Is it too much to ask you to share the source of those (unchaged) inheriting DLLs?

I am not sure what you are asking for here.  Are you referring to the inherited business layer and UI controls?  If so, this would be what you would create on your side:

Public Class MyInheritedTextBox
    Inherits MicroFour.StrataFrame.UI.WIndows.Forms.Textbox

End Class


AlexSosa
AlexSosa
StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)
Group: Forum Members
Posts: 35, Visits: 138
Hi Ben,

Is that all there is?  (Ignorance is NOT bliss).

If I understand correctly, the two layers of inheritance you suggested can be implemented like this: Create a Solution that produces a couple of DLLs with the first level of inheritance.  Then, in the Application Solution include a couple of projects that define the second level of inheritance (DLLs) which are in turn the ones used by the apllication itself.

While we are talking about this, I am not sure if the "Templates" that one uses to create items to add to a project, for example "SF Maintenence Form", are classes that you can later modify and cause all modifications to be inherited by items based on the "template" (as it would be the case with VFP classes), or real templates that are simply copied and become starting points for you to modify.  Can you clarify this point, please?

Thank you very much,

Alex

I am not sure what you are asking for here.  Are you referring to the inherited business layer and UI controls?  If so, this would be what you would create on your side:

Public Class MyInheritedTextBox
    Inherits MicroFour.StrataFrame.UI.WIndows.Forms.Textbox

End Class


StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Aye, the templates are simply starting points that give you a few objects already dropped on the form for you to use.  You can create your own templates and place them in %My Documents\Visual Studio 2005\Templates\ItemTemplates\.  You can find lots of articles detailing how to create and modify templates by searching google for Visual Studio 2005 templates.  So, yes, you would create a company-wide solution that would contain the projects that define the first level of inheritance, and then you create application-specific projects that define the second level of inheritance. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search