?
Solved

developing a restful server in .net

Posted on 2013-01-13
7
Medium Priority
?
257 Views
Last Modified: 2013-01-21
What is the best approach to develop a restful service application, I read some stuff about asp.net web api, but was wondering if anyone has gone that approach on it or what else is out there.
0
Comment
Question by:JDEE8297
[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
  • 4
  • 3
7 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38772909
If you are familiar with MVC, then WebAPI is nice to use. Even if you're not familiar with MVC, I think WebAPI makes rest pretty straight-forward.You can do REST in WCF, buf it takes a bit of setup.
0
 

Author Comment

by:JDEE8297
ID: 38774217
So if I was building something from the ground up, and wanted it to be restful, web api may be the way to go. I am at the very start of this project, and I have being playing around with trying to set up restful services using various examples, and I keep coming back to web api when I am doing my research.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38774647
Is there anything about WebAPI that you don't understand? Have you successfully set up a WebAPI project?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:JDEE8297
ID: 38775111
Another question on this same topic, any time I have worked with the database, I have used datatables. Is that a no no and if it is a no no, what is a better approach. Was looking EF but that just seems like a lot of set up and wondering how efficient it is.

I really want to keep all of the database related things inside stored procedures, and not so much in backend application code (c# or vb.net).
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 440 total points
ID: 38775367
You could certainly use DataTables if you preferred. And there is no reason why you cannot use sprocs. That's the beauty of n-tiered architecture  : )

That being said, you may want to create an adapter pattern that maps your DataTable to an "entity" (read DTO) that you create. In this way, you can code your front-end to work with the entity, and the back end can use the DataTable(s). If you ever decide to switch to EF, you just need to swap out your DAL and remap the entity.
0
 

Author Comment

by:JDEE8297
ID: 38775774
Thanks for your help so far on this, it has been greatly appreciated, I am starting to like this new web api more and more. Although, I will admit this MVC approach is a little confusing to me.

For example I have two public methods in my controller, where one of them takes a string as the parameter and another takes a numeric value. How does the webapi know which one to route my traffic to the appropriate method?
0
 

Author Closing Comment

by:JDEE8297
ID: 38803926
thank you for your help, greatly appreciated.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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

762 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