Plug-In Architechture - Using Strataframe in Dynamic Enviroment


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
My question is where should I have the Datasource logic placed?

It looks like you have the right idea.  The DataSources is a shared collection, so you could create a base BO that all of your business objects inherit from.  In the constructor of the BaseBO, you could then test to see if the connection string(s) have been created:

If Not MicroFour.StrataFrame.Data.DataBasics.DataSources.ContainsKey("") Then
    '-- Add your data source to the collection
End If

But it looks as though you were already heading down the right road Smile

Richard Keller
Richard Keller
StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)StrataFrame User (174 reputation)
Group: Forum Members
Posts: 84, Visits: 324
I am looking for an approach to Datasource access with using a Strataframe BO in another plug-in enviroment ( these enviroments dynamically load assemblies using CreateInstance ).   The BO may be called from a Form or User Object and configuration of the Datasource connection string would be done prior to usage.  Maybe Ben or Trent have an idea here.   My question is where should I have the Datasource logic placed?  

The first option that came to mind is to modify my base business object to instantiate the Datasource if it is not found.  I can do this through a shared class, module, etc. if necessary.  This would work like the way the AppMain functions and loads the Exeception and Datasource objects.   Any comments, ideas, etc?

Thanks,

Richard

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