WCF service Layer

30 views
Skip to first unread message

Lucas Barlassina

unread,
Jul 18, 2011, 11:50:31 PM7/18/11
to sharp-arc...@googlegroups.com

 

I want to make an API for my application, as a way to make a good abstraction for calling it from every where. (differents UI (winforms, wpf, smartphones, pc browsers))

So I was reading and looking into the web about the best way to architecture with sharp#.

 

After spending some days I decided to ask you about the best way  to implement a SOA architecture with sharparchitecture.

 

I’m thinking in the Request Response pattern for a clean way of doing that.

 

Any advice would be appreciated

thang chung

unread,
Jul 19, 2011, 4:52:58 AM7/19/11
to sharp-arc...@googlegroups.com
Hi Lucas,

I think SOA architecture is good for your case. It makes you loose coupling for all your layers. Sharp-arch is built on DDD concept, so I think these will be flexible if you use it with your SOA architecture. Certainly, you must be customize a lot of things to fix with your requirements. Request-Response pattern is very easy to implement, but the effect of its are invaluable. 
  • You can inherit all of your request and responses from base objects where you can maintain consistency for common properties
  • You can validate all your R & R objects.
  • You can organize the error code, error message inside R & R objects
  • ...
That's all things I think about your question!

--
You received this message because you are subscribed to the Google Groups "S#arp Architecture" group.
To post to this group, send email to sharp-arc...@googlegroups.com.
To unsubscribe from this group, send email to sharp-architect...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sharp-architecture?hl=en.



--
==========================================================
Regards,
ThangChung,
http://weblogs.asp.net/thangchung

Chris Richards

unread,
Jul 19, 2011, 7:23:40 AM7/19/11
to sharp-arc...@googlegroups.com
Hi Lucas,

I've added a RESTful API to my Sharp application by using an API area within a standard MVC3 project. This is much simpler than going down the WCF route,  and has been working well for us. We have two different clients, one a Windows CE device and the other some Ruby code running on an RFID reader.

Basically, I've created an API class library project which contains the model classes to be shared between the client and the server, and an interface for the operations. The project also contains an implementation of the interface that makes the calls to the server and convert to/from JSON (I've implemented this using Hammock). The controllers in the API area then accept basic types or an API model object and return a JsonNetResult with the appropriate data (again either basic types or an API model object).

Take a look at the TweetSharp and the Postmark-dotnet projects for a couple of examples that work against public REST APIs.

If your API is more complex you might want to take a look at OpenRasta but I'm not sure how that would hook into your S#arpArch code.

Regards,
Chris


thang chung
19 July 2011 09:52


Lucas Barlassina
19 July 2011 04:50

Lucas Barlassina

unread,
Jul 19, 2011, 8:33:30 AM7/19/11
to sharp-arc...@googlegroups.com

Thanks Chris, thang chung and all the other team for all the work.

Last night I discovered  WCF Web Api, anybody knows it, o use it with sharp?

 

As I said before I think the best way is to use a request response pattern because my object are complex and the way it works is very clean.

Also I found Agatha service (http://code.google.com/p/agatha-rrsl/) a good example of a request response pattern

 

I think that’s a good point to include in sharp arch, the way to make an api for your application, because really separates the controller and web app as a presentation layer.

Thanks, I will see how to continue on it

image001.jpg
Reply all
Reply to author
Forward
0 new messages