views:

1680

answers:

5

I work for a large state government agency that is a tad behind the times. Our skill sets are outdated and budgetary freezes prevent any training or hiring of new employees/consultants (firing people is also impossible). Designing business objects, implementing design patterns, establishing code libraries and services, unit testing, source control, etc. are all things that you will not find being done here. We are as much of a 0 on the Joel Test as you can possibly get. The good news is that we can only go up from here!

We develop desktop CRUD applications (in C++, C#, or Java) that hit the Oracle database directly through an ODBC connection. We basically have GUI's littered with SQL statements and patchwork code. We have been told to move towards a service-oriented n-tier architecture to prevent direct access to the database and remove the Oracle Client need on user machines.

Is WCF the path we should be headed down? We've done a few of the n-tier application walkthroughs (like this one) and they seem easy to implement, but we just don't know enough to understand if we are even considering the right technologies. Utilizing the .NET generated typed DataSets seems like a nice stopgap to save us month/years of work (as opposed to creating new business objects from the ground up for numerous projects). Is this canned approach viable for a first step?

+3  A: 

I recently started using WCF services for my Data Layer in some web applications and I must say, it's frustrating at the beginning (the first week or so), but it is totally worth it once the code is deployed.

You should first try it out with a small existing app, or maybe a proof of concept to make sure it will fit your needs.

From the description of the environment you are in, I'm sure you'll realize the benefit almost immediately.

Jimmie R. Houts
+2  A: 

The last company I worked for chose WCF for almost the exact reason you describe above. There is lots of good documentation and books for WCF, its relatively easy to get working, and WCF supports a lot of configuration options.

There can be some headaches when you start trying to bend WCF to work in a way not specifically designed out of the box. These are generally configuration issues. But sites like this or IDesign can help you through those.

Sailing Judo
Great website that I had not yet seen, thanks!
BikeMrown
+2  A: 

First of all, I would definitely not (sorry for the emphasis) worry about the time you'll save using typed DataSet's versus creating your own business objects. That is usually not where you will spend most of your development time. I prefer using business objects myself.

In you're situation I would want to implement a proof-of-concept first. One that addresses all issues you may encounter. This proof-of-concept should implement an entire use case, starting on the client, retrieving data from the database and returning it to the client. You should feel confident about your implementation before continuing.

Then about choice of technology. WCF is definitely a good choice for communication between your client applications and the service layer. I suppose that both your clients as well as your service layer will become C# applications? That makes things a lot easier since interoperability between different platforms (Java/C# for example) is still not trivial although it should work in most cases.

Ronald Wildenberg
Yes, both client and service layers will be moving to C# exclusively. I see your point about business objects. I just figured that the typed datasets might make the transition a little less daunting for some of our developers as they learn more about object design.
BikeMrown
I do not agree that typed datasets teach you more about object-oriented design, rather the opposite. They are a thin layer around a DataReader and a lot goes on behind the scenes to make them work the way they do. Not a really transparent technology and quite complex once you start using them.
Ronald Wildenberg
My comment may have been misleading. I agree with you about typed datasets and ood conflicting. I meant typed datasets as a stopgap to get their project moving, not as a learning experience for business objects. Your point does make me wonder if it will only confuse them because of the opaque/complex nature of the tech.
BikeMrown
Well, that's just my experience with the technology. You may want to consider another data access technology like Entity Framework. It has some learning curve but it will give you a lot of flexibility. And unfortunately it has some constraints on what you can map in your database (so test this first).
Ronald Wildenberg
+2  A: 

Take a look at Entity Framework (as there are a couple Oracle providers available for it already) in conjunction with .NET 3.5 SP1 which enables built-in WCF serialization of your EF generated classes.

Here is a good blog to get started: http://blogs.msdn.com/dsimmons

MattK
+2  A: 

CSLA might be a good fit for your N-Tier desktop apps. It supports WCF, has a large dev community, and is well documented. It is very object oriented.

Todd Stout
Very interesting! I had not come across CSLA yet and it looks quite promising. Thanks for the tip.
BikeMrown
One nice aspect of CSLA is that you can choose to use Remoting, WCF, or a custom protocol by simply changing configuration, not your code. In a couple of years Microsoft might have yet another preferred communications framework. CSLA can give your app some insulation from this.
Todd Stout