Re: Need a sanity check on CAO and lifetime

Tech-Archive recommends: Fix windows errors by optimizing your registry



Roy Chastain wrote:
<snip />
Now, you may wonder why go to this effort.
Upside
  It allows me to have all the actual business logic reside only in the server side code.
Downside
  It appears overly complicated.

Comments and discussion, PLEASE.
<snip />

Hi Roy,

I'm always up for commenting and discussing, so here's my 2c worth (dwy geiniogwarth (Welsh))

Firstly a confession. I don't understand your code on a first reading. However I think I understand what you're trying to do if what you say above is the long and the short of it.

We do exactly this. We have asp.net code running on a web server. This code does no business logic processing or data accessing. For business logic it calls a remote object on the application server: usually one business logic object per application but there is some sharing.

For data access, the presentation layer calls either the business logic component (if there is some business logic processing to do on the data first), or calls a data access component directly. There is often a data access component for the application, but there is a lot more sharing in this area than with business logic.

If the presentation layer calls the business logic layer as an intermediary, the business logic component calls the data access component locally (i.e. not across any appDomain boundaries) - since both sets of components are physically on the same machine.

The web server is not on the domain. The application server is on the domain, so it makes trusted calls to the database which is on another server on the domain. Neither the app server nor the database server have an external IP address. The app server only accepts calls from the web server.

Data access objects do all their own data cleansing (to avoid injection attacks and the like). Generally this means checking any input to the methods of the data access component against a regex, and calling stored procedures on the database using parameters rather than constructing SQL on the fly.

We use only tcp channels, but we produce our proxies using soapsuds even where the documentation says you can't. You can in all the situations we have met so far.

We always configure remoting using config files. We configure DLLs, when necessary, using AssemblySettings (Google for it if you're interested).

We rarely use CAOs because they are generally agreed to be more complex than SAOs, and we make all our SAOs stateless. We don't use the factory pattern, but we will probably move towards it if it looks as though the number of ports open for remote objects is getting unwieldy.

For CAOs we use property sets to set the state and only use the default constructors.

All our assemblies are signed and installed in the GAC. All our remote objects are hosted in Windows services.

So, to cut a long story short, I don't understand why you need anything very complicated to acheive what you appear to want to acheive.

HTH

Peter
.



Relevant Pages

  • Re: Excel data consolidation question
    ... it's talking to the server and trying to auto-complete the name ... you can save your form as a Data Access Page ... you know when you save a spreadsheet as HTML and 'add interactivity'? ... it would if you were so incompetent not to check all entries. ...
    (microsoft.public.excel)
  • Re: Excel data consolidation question
    ... The comment on server side and client side controls ends up a little ... Microsoft MVP - Excel ... you can save your form as a Data Access Page ... it would if you were so incompetent not to check all entries. ...
    (microsoft.public.excel)
  • Re: ADO across vpn
    ... Create client/server application that connects to SQL Server or some ... Create a web service the does all the data access and access the web ... >>> We have a vb6 application which connects via ADO to an access ...
    (microsoft.public.vb.database.ado)
  • Re: Data Access Page Frozen
    ... you can do this only on your local machine or ... I've been trying to configure a data access page (created using wizard ... The server is not at home so I've been asking my friend to ... I've gotten "internet server error" and "An error occured while tryin to ...
    (microsoft.public.access.dataaccess.pages)
  • Trouble connecting to SQL Server
    ... I am trying to create a data access page for a project I'm working on. ... I'm on a winxp machine with Access 2004 and MS SQL Server Desktop ... "Cannot find the database or some database objects that this page ... Update the connection information of the page or fix the references to ...
    (microsoft.public.access.dataaccess.pages)