Click Once with Oracle and CSLA.NET

Click Once with Oracle and CSLA.NET

Old forum URL: forums.lhotka.net/forums/t/4862.aspx


ejames posted on Monday, May 19, 2008

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?

sergeyb replied on Monday, May 19, 2008

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



ajj3085 replied on Monday, May 19, 2008

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.

sergeyb replied on Monday, May 19, 2008

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.


ajj3085 replied on Monday, May 19, 2008

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.

ejames replied on Monday, May 19, 2008

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?

sergeyb replied on Monday, May 19, 2008

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?



RikGarner replied on Monday, May 19, 2008

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.

 

McManus replied on Monday, May 19, 2008

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

ejames replied on Tuesday, May 20, 2008

Thank you all for your replies.  I'm happy to think this technique works as it should.

andy replied on Monday, May 19, 2008

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

 

 

Copyright (c) Marimer LLC