Dave Burke - Freelance .NET Developer specializing in Online Communities

A freelance .NET Developer

DevTeach2004 : Designing applications with ADO.NET and XML Web Services


Designing applications with ADO.NET and XML Web Services.   
Beth Massi.
NET239.

These session notes serve primarily to share the content of the session and as a reference for me.  They may also provide some value to those interested in the session topics. Some of the information found in these notes may be inaccurate due to my typing errors or a lack of understanding of the subject matter. DevTeach policy is that session material is available online to registered attendees only, so I cannot respond to any requests for session PPTs or source.

Distributed Architecture.

Cons: slower performance for smaller number of users, longer to write, harder to debug and test, harder to deploy

Pros: scalable, flexible (based on the non-changing interfaces between the tiers - exactly), easy to add new front ends ("as long as your business layer is in one place" - good point), easier to integrate with other business systems, easier to maintain data (with central data store.)

Design Choices

Agree on the contract.  What is the interface? What is a good message (strings, dataset, etc) that can be marshaled easily?

Agree on the way to access the contract.  Direct access to objects: DCOM, .NET Remoting.  Access to messages only (stateless) web services and message queues.

Four design rules for scalable components

1) Be stateless
2) Design "chunky" not "chatty" interfaces.  Larger amounts of data rather than frequently exchanged bits of information
3) Keep objects close together if they talk frequently.
4) Use connection pooling

Remoting

Must inherit MarshalByRefObject.  (VB).  In web.config, add a remoting section, exposing the class as a single call object.

<system.runtime.remoting>
<application>
<service>
<channels>

.NET remoting can return data using the binary formatter.

In client, add app.config file, and at the <system.runtime.remoting> section to include URL.

Add reference to remote service DLL in the client project (or create metadata assembly with the interface).

System.runtime.remoting.remconfig.config(app.executablepath +".config")
webservice1.classfacade o
o.HelloWorld

Demo of adding records, then saved, then DataSet is refreshed on server (keys updated) and sent back to the client.

Saving Datasets to a .NET Web Service

Declare DS byref.

Web service dataset, updates both tables with transactions.  Insert statements (used in example) do the update, a stored proc example is commented in the source (select id where id = scope_identity()

Summary: Its clear that Beth Massi has extensive experience building distributed applications.
Session was much more general than I anticipated, but the example of updating a dataset in a disconnect environment was gold.  9 out of 10.


 

Posted: Jun 24 2004, 12:02 AM by daveburke | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)