?
Solved

sample CRUD using WCF

Posted on 2007-11-30
6
Medium Priority
?
3,387 Views
Last Modified: 2013-12-16
hi everyone,

im currently about to start a new project which basically is a registration system (for school). In the past i have developed this type of project using n-tier OOP approach. I have recently learned WCF, and im convinced that SOA is the way to go. But all samples that i have read involves only a service with simple methods. I can't seem to find a sample of WCF used in CRUD database operations. I have even read something about anti-pattern when it comes to CRUD. Can someone point me to the right direction? A sample of an n-tier WCF database application or even an article would be of great help. thanks!
0
Comment
Question by:manduz_griffus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20389589
You won't find many examples about WCF with database operation, because database examples are complex to deploy, and really it is not related with the WCF issue.
Just look for WCF examples and apply your knowledge of database programming, there is no mystery.
0
 

Author Comment

by:manduz_griffus
ID: 20390419
hi jaime olivares,

thanks for your comments. if so, then how am I suppose to add records in a distributed system using WCF? in my point of view, adding a student is a service. what i want to know is am i getting the right impression and if so, something to justify this impression would be very helpful (like an article). due to the anti-pattern that i read, im not sure if CRUD operations are services. if not, how do i add, update, delete, and find records from a client to a service? if yes, please give me a sample. thanks again.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20390483
Well, anti-pattern is a vast term, frequently related to an unuseful or harmful practice that appear to be benign.
Adding a studing to a database using a service could be excesive, but if as a part of several tasks related to a student would be perfectly justifiable, specially when more than a single database operation will be involved.
By example, maybe adding a student will imply to add it to the master student table, plus the career/courses table, plus the accounting table. So, the service can provide you a high-level interface (like the client tier) to encapsulate mid-level (business) and low level (data access) tasks.

0
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 

Author Comment

by:manduz_griffus
ID: 20390998
thanks, i understand what you mean... one last thought though; your sample makes perfect sense, but what about isolated add/update/delete operations? i mean for example, creating a new course where you can't associate it with any other operations. just merely adding a course. or merely update the name or delete a new course (no relations yet). if you were in this situation, how would you expose an add new course feature? is it okay to expose it as a service, cause i cant think of any possible way to add this course from a client using WCF.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20391060
all operations: add student, add course, remove course, remove student,  should be grouped as a single service.
in your client message, you should specify the kind of operation you desire to do.
0
 

Expert Comment

by:vj_mi
ID: 21563081
Hi manduz_griffus,
Did u manage to get the WCF for CRUD? I would appreciate if I could get your sample source to study and understand as I need the same scenario.

Regards.
MI
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question