Solved

sample CRUD using WCF

Posted on 2007-11-30
6
3,367 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 125 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

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…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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