Solved

sample CRUD using WCF

Posted on 2007-11-30
6
3,347 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
  • 3
  • 2
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
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
Comment Utility
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 125 total points
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:manduz_griffus
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now