重复:这是" REST服务的最佳用途是什么? "和其他许多内容的副本.请关闭它.
在Web开发中:
我是否应该非常好地学习RESTful服务并使用它来完成我未来的所有项目?它比SOAP服务更快吗?什么时候用哪个?
在某些情况下我应该更喜欢其中一种吗?
我正在寻找以下用例的RESTful API设计的最佳实践:
Table1     Table2
Id1        Id1
Id2        Id2
Id3        Id3
Name       Name
           Table1Id1(FK to Table1)
           Table1Id1(FK to Table1)
           Table1Id1(FK to Table1)
假设我有如下表1的端点:
/root/table1 (to get list of records)
/root/table2 (to get single record by primary key)
现在我的问题是从第二个以下代表第二个网址中的复合键的最佳方式:
/root/e1/Id1/Id2/Id3
or 
/root/e1?Id1=1&Id2=2&Id3=3
假设我有如下表2的端点:
/root/table1/Table1Id1_Table1Id2_Table1Id1/table2 (to get list of records for table2 by table1).
现在这里是我的问题,在url之上是有效的,并且在复合键的情况下是否合适?
关于此用例的良好模式的任何建议将不胜感激.