简体   繁体   English

Asp.Net Web服务数据有效载荷

[英]Asp.Net web service data payloads

To keep my data payloads as agnostic as possible I want to use objects and arrays or objects (the objects are just containers for a bunch of primitive type ie: Customer. Store. etc) 为了使我的数据有效负载尽可能地不可知,我想使用对象和数组或对象(对象只是一堆原始类型的容器,例如:Customer.Store等)

Does this make sense? 这有意义吗?

I don't want to use something datasets which aren't as portable, make sense? 我不想使用某些不那么可移植的数据集,这有意义吗?

What is the typical model most asp.netters are using today? 今天大多数asp.netters使用的典型模型是什么?

Yes what you are stating makes sense. 是的,您要说的是有道理的。 Objects and Arrays are the most portable types so your code can be used from multiple different languages easily (well usually). 对象和数组是最可移植的类型,因此可以轻松地(通常)从多种不同的语言使用您的代码。 I agree with your statement about datasets. 我同意您关于数据集的声明。 Even if you are using a language currently that handles datasets there is no knowing how you might need to consume them in the future. 即使您当前使用的是处理数据集的语言,也不知道您将来可能需要如何使用它们。

Are you talking about using ASMX web services or WCF ones? 您是在谈论使用ASMX Web服务还是WCF服务?

For WCF here are some good link to Best Practices: 对于WCF,这里有一些与最佳做法的良好链接:

MSDN - Guidelines and Best Practices MSDN-准则和最佳做法

MSDN - Best Practices for Security in WCF MSDN-WCF安全最佳实践

Patterns and Practices - Web Service Software Factory 模式和实践-Web服务软件工厂

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM