Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum

CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • Encapsulated Invocation - Loading unreferenced assemblies

    rated by 0 users
    This post has 1 Reply | 1 Follower

    Top 500 Contributor
    Posts 35
    Mr X Posted: Tue, Apr 28 2015 12:24 PM

    Hi all,

    I have implemented the Encapsulated Invocation Model successfully as described in the CSLA 4 - Data Access book, p. 89 and as described in the EncapsulatedInvokeDto solution. This implementation is great but in my opinion, the solution/example provided allows a "switchable" rather than a "pluggable" DAL. I find that the need for the application to reference all the concrete DALs beforehand breaks the very idea of what I believe a pluggable implementation should be: to use an assembly without the need to set a new reference and recompile the application.

    I am going to investigate this, but as it is something I have never done before, any guidance or suggestion(s) would be appreciated.  



    Top 10 Contributor
    Posts 9,475

    The only reason the samples in the book reference the concrete DAL assemblies is convenience.

    One way or another the DLLs need to end up in the bin directory on the server so they can be loaded dynamically. The easiest way to get the DLLs into the bin directory when building the solution is to have the web project reference those DAL projects. That way Visual Studio copies them in automatically.

    In real life you wouldn't reference them, and would instead have your IT staff build deployment scripts that ensure the DLLs end up in the bin directory.

    The problem with doing that in a book is that the readers of the book then have to understand my deployment scripts, etc. That just leads to a support issue for me around the book itself, as people email me asking why they can't just build and run my demo :)


    Page 1 of 1 (2 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems