OOP design

G

Guest

I've got to produce a console app that requests a dataset from a web service
in our personnel system, manipulates the data and then updates each record in
the Active directory.

Not being the most brilliant OOP programmer I'm having problems trying to
design suitable objects.

Would anyone like to suggest how they would design this type of app?

Thanks
 
K

Kevin Spencer

You haven't defined the requirements fully enough to make any
recommendations.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.
 
S

Steven Cheng[MSFT]

Hello John,

Thanks for posting here.

From your description, the application you're designing will have three
processing stages:

1. Retrieving data from remote server through webservice, and since you
mentioned that the return object is DataSet, the remote datasource is
relational database, correct?

2. Processing and maniuplating the returned data locally in the application.

3. Update the processed data into Active Directory.

Here are some of my general suggestions for the above three stages:

#1 Generally, for relational database table/records, we would consider
designing some custom classes to represent them in our program so that our
code just simply deal with relational data as normal class objects. This is
commonly called O-R mapping. .NET framework support creating typed Dataset
for conveniently accessing and manipulate relation database data which is
very like a O-R mapping object through it is not a pure one. So you can
consider return typed dataset from the remote datasource for the client
application to maipulate them with strong-typed objects.

#Working with a Typed DataSet
http://msdn2.microsoft.com/en-us/library/esbykkzb.aspx

#Implementing Data Transfer Object in .NET with a Typed DataSet
http://msdn.microsoft.com/library/en-us/dnpatterns/html/ImpDTOtypedDataSet.a
sp?frame=true

And as for the webservice call, since .net has provide proxy generator(the
VS IDE's add webreference or the wsdl.exe tool), it will help automatically
generate strong-typed webservice client proxy, we don't need to worry too
much about this.

#2 As for the local processing and manipulation, would you provide some
further info on this? I think here we should design some classes dedicated
for these data manipulating. And the design also rely on the classes we
used in #1, the processing class/interfaces would vary depend on how you
design the data access objects(use custom classes or typed dataset or
normal dataset ...)

#3 for the AD querying/updating, the .net framework has provided the
System.DirectoryServices namespace for ADSI programming, you can further
implement some custom helper classes which expose some specific interfaces
for your scenario. For example, you can create a certain class which
encapsulate all the AD updating operations as its member functions.

BTW, you can find some good articles and guidelines in the MSDN pattern &
practice center:

http://msdn.microsoft.com/practices/

All of these are quite general opinions, if you have any detailed cases or
problem, please feel free to post here and we can have some further
discussion on them.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial

response from the community or a Microsoft Support Engineer within 1
business day is

acceptable. Please note that each follow up response may take approximately
2 business days

as the support professional working with you may need further investigation
to reach the

most efficient resolution. The offering is not appropriate for situations
that require

urgent, real-time or phone-based interactions or complex project analysis
and dump analysis

issues. Issues of this nature are best handled working with a dedicated
Microsoft Support

Engineer by contacting Microsoft Customer Support Services (CSS) at

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello John,

How are you doing on this issue? Have you had a chance to have a look at my
last reply or have you got any further ideas on this? Please feel free to
post here if there is still anything we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top