CSLA .NET

From Rockford Lhotka's Expert C# 2005 and VB 2005 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

Click Once with Oracle and CSLA.NET

Last post 05-20-2008, 4:24 AM by ejames. 10 replies.
Sort Posts: Previous Next
  •  05-19-2008, 8:44 AM 23650

    Click Once with Oracle and CSLA.NET

    I've just taken on a WinForms project with a Click Once deployment requirement.

    Data access uses Oracle.DataAccess.dll (ODP.NET) which depends on a full client-side install of the Oracle Client.

    My.CSLA.Library.dll -> Oracle.DataAccess.dll -> Oracle Client

    The Oracle Client cannot be installed via Click Once.  If Click Once is to be used to deploy my application I will need to remove my application's client-side dependency on the Oracle Client.

    I've been thinking a CSLA.NET server-side DataPortal may be able to help.

    My question is:

    If all calls to Oracle.DataAccess.dll are executed server-side within CSLA.NET Data Portal, will my application still be dependent on client-side installations of the Oracle Client?

  •  05-19-2008, 8:55 AM 23651 in reply to 23650

    RE: Click Once with Oracle and CSLA.NET

    I believe it will still need that unless you move ALL data access code outside of client project.  The reason being, your data access code is still using Oracle client and  is still in the same CSLA class.  So, click once will see this as a dependency and will attempt to distribute DLL.  AN option is to distribute DLL, but not use it.  This may work.

     

    Sergey Barskiy

    Senior Consultant

    office: 678.405.0687 | mobile: 404.388.1899

    cid:_2_0648EA840648E85C001BBCB886257279
    Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

     

    From: ejames [mailto:cslanet@lhotka.net]
    Sent: Monday, May 19, 2008 9:45 AM
    To: Sergey Barskiy
    Subject: [CSLA .NET] Click Once with Oracle and CSLA.NET

     

    I've just taken on a WinForms project with a Click Once deployment requirement.

    Data access uses Oracle.DataAccess.dll (ODP.NET) which depends on a full client-side install of the Oracle Client.

    My.CSLA.Library.dll->Oracle.DataAccess.dll->Oracle Client

    The Oracle Client cannot be installed via Click Once.  If Click Once is to be used to deploy my application I will need to remove my application's client-side dependency on the Oracle Client.

    I've been thinking a CSLA.NET server-side DataPortal may be able to help.

    My question is:

    If all calls to Oracle.DataAccess.dll are executed server-side within CSLA.NET Data Portal, will my application still be dependent on client-side installations of the Oracle Client?

    My.CSLA.Library.dll-server-side only->Oracle.DataAccess.dll->Oracle Client



  •  05-19-2008, 9:15 AM 23653 in reply to 23651

    Re: RE: Click Once with Oracle and CSLA.NET

    sergeyb:
    I believe it will still need that unless you move ALL data access code outside of client project.  The reason being, your data access code is still using Oracle client and  is still in the same CSLA class.  So, click once will see this as a dependency and will attempt to distribute DLL.  AN option is to distribute DLL, but not use it.  This may work.


    Hi,

    Just want to point out there's no need to remove the data access code at all.  If the OP sets up remoting, as long as none of the code which depends on the Oracle client actually runs, all will be well because .Net lazy loads referenced assemblies.  So the OP can just install the client on the remoting target and all should be well.
  •  05-19-2008, 9:21 AM 23654 in reply to 23653

    RE: RE: Click Once with Oracle and CSLA.NET

    I could be totally wrong, but I thought that click once applications have to have all referenced assemblies to verify the install.

     

    Sergey Barskiy

    Senior Consultant

    office: 678.405.0687 | mobile: 404.388.1899

    cid:_2_0648EA840648E85C001BBCB886257279
    Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

     

    From: ajj3085 [mailto:cslanet@lhotka.net]
    Sent: Monday, May 19, 2008 10:16 AM
    To: Sergey Barskiy
    Subject: Re: [CSLA .NET] RE: Click Once with Oracle and CSLA.NET

     

    sergeyb:

    I believe it will still need that unless you move ALL data access code outside of client project.  The reason being, your data access code is still using Oracle client and  is still in the same CSLA class.  So, click once will see this as a dependency and will attempt to distribute DLL.  AN option is to distribute DLL, but not use it.  This may work.



    Hi,

    Just want to point out there's no need to remove the data access code at all.  If the OP sets up remoting, as long as none of the code which depends on the Oracle client actually runs, all will be well because .Net lazy loads referenced assemblies.  So the OP can just install the client on the remoting target and all should be well.


  •  05-19-2008, 9:23 AM 23655 in reply to 23651

    Re: RE: Click Once with Oracle and CSLA.NET

    My idea is to distribute the Oracle.DataAccess.dll via Click Once but not make any data access calls until DataPortal takes my objects server-side. 

    Has anyone tried this?

  •  05-19-2008, 9:24 AM 23656 in reply to 23655

    RE: RE: Click Once with Oracle and CSLA.NET

    Nope, but I think this should work.

     

    Sergey Barskiy

    Senior Consultant

    office: 678.405.0687 | mobile: 404.388.1899

    cid:_2_0648EA840648E85C001BBCB886257279
    Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

     

    From: ejames [mailto:cslanet@lhotka.net]
    Sent: Monday, May 19, 2008 10:23 AM
    To: Sergey Barskiy
    Subject: Re: [CSLA .NET] RE: Click Once with Oracle and CSLA.NET

     

    My idea is to distribute the Oracle.DataAccess.dll via Click Once but not make any data access calls until DataPortal takes my objects server-side. 

    Has anyone tried this?



  •  05-19-2008, 10:41 AM 23659 in reply to 23656

    Re: RE: RE: Click Once with Oracle and CSLA.NET

    I haven't done this with clickonce, but I have an application which uses remoting where Oracle is only installed on the application server, not on the client. Obviously the client code references the OracleDataAccess dll but never uses it, but it doesn't cause a problem. If you can get ClickOnce to deploy the Oracle.DataAccess dll you should find you don't need a full client-side Oracle install.

     

  •  05-19-2008, 10:53 AM 23660 in reply to 23654

    Re: RE: RE: Click Once with Oracle and CSLA.NET

    Hmm, that's a good point.  I would think though that as long as the assembly isn't in the ClickOnce manifest, it should be ok.  I did try something like this and it "worked," except that I actually used some of the Data assembly client side (a Command object returned a List<Data.MyDataObject>).  But the application itself started, IIRC.
  •  05-19-2008, 3:15 PM 23668 in reply to 23650

    Re: Click Once with Oracle and CSLA.NET

    It works perfectly fine if you using Click Once with CSLA.NET server-side and only reference classes under Oracle.DataAccess.dll in your DataPortal_XYZ methods for your "CRUD" operations.
    It gets routed to the server-side for execution.

    Andy

     

     

  •  05-19-2008, 4:19 PM 23672 in reply to 23655

    Re: RE: Click Once with Oracle and CSLA.NET

    ejames:

    My idea is to distribute the Oracle.DataAccess.dll via Click Once but not make any data access calls until DataPortal takes my objects server-side. 

    Has anyone tried this?

    In several projects at our current customer, we use ClickOnce deployment without the need for an Oracle client installation. We've included the Oracle.DataAccess.dll in the ClickOnce distribution. The only reason we do this, is to be able to deserialize OracleExceptions at the client side.

    Cheers,
    Herman

  •  05-20-2008, 4:24 AM 23687 in reply to 23672

    Re: RE: Click Once with Oracle and CSLA.NET

    Thank you all for your replies.  I'm happy to think this technique works as it should.
View as RSS news feed in XML

Please contact Magenic for your .NET consulting and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems