Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiate class from custom assembly/DLL
Message
From
24/03/2015 17:30:29
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
 
To
24/03/2015 17:21:12
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 5.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01617218
Message ID:
01617220
Views:
36
It's an MVC app, although business logic will be in business objects, so it will be something like MVC -> Business Objects -> Entity Framework. Theoretically, the business object layer will work with any type of .NET front end. My main concern is the ability to put a customized business object in a separate DLL.

>That's one pupose of IoC. But there may be other ways. Is this an ASP.Net or MVC app?
>
>
>>In our vertical market VFP app, we use a data-driven abstract factory to instantiate all of our classes containing business logic. Basically, that means instead of using CreateObject("MyClass"), we use Factory("MyClassKey"). The factory looks up the class in a table, then instantiates and returns the object. An important benefit of the factory is that it allows us to substitute a custom class for the standard one. For example, if a client wants us to customize a calculation for them, we put it in a custom class, install it on their system, then use the factory to instantiate the custom class in place of the standard one.
>>
>>I'm wanting to implement something similar in C#. The customizations for a specific client would be compiled into a custom DLL. Then I need to instantiate the custom class in place of the standard one. I figure I could probably roll my own factory using reflection and whatnot. I wondered if there was already a standard solution to this problem. I've been learning about IoC containers, but I can't tell if they do what I need. I'm not sure I buy into all of the dependency injection stuff, but I would be willing to use an IoC container if it also met my need with customizations. Or maybe there is some other mechanism built into .NET to achieve what I need. Any suggestions?
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform