开发者

Best strategy for moving data between physical tiers in ASP.net

Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI tier into separate physical layers.

What is the best/easiest strategy to move serialized objects between the service tier and the UI tier?

I was considering serializing POCOs into JSON using simple ASP.net pages to serve the middle tier. Meaning that the UI/Web tier will request data from a (hidden to the outside user) web server that will return a JSON string. This kind of JSON 'emitter' seems easily testable. It also seems easily compressible for efficiently moving data over the WAN between tiers.

IIS Asp.net UI webforms
    ^
    ^
-- WAN --
    ^
    ^
IIS Asp.net webforms
 to generate JSON
    ^开发者_如何转开发
SQL Server

I know that some folks use .asmx webservices for this kind of task, but this seems like there is excess overhead with SOAP, and the package is not as human readable (testable) as POCOs serialized as JSON. Others are using more complex technology like WCF which we have never used.

Does anyone have advice for choosing a method for moving data/objects between the data (db) tier and the web (UI) tier over the WAN using .net technologies?

Thanks!!!


Sounds like you want a REST API. ASP.NET MVC Controllers will do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜