Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Is a RESTful url valid without ids between objects? -


i have 2 restful api design questions. let's have fruitstand web app. want return information fruits carry , counts fruits, , with:

http://myfruitstand.com/fruits 

question 1: if have 10 oranges, i'm thinking can information particular orange with:

http://myfruitstand.com/fruits/oranges/3 

but above url restful--don't need id between 'fruits' , 'oranges' conform rest standards? or url 'fruits' being followed subclass 'oranges' okay?

question 2: similarly, if want have discussion forum oranges (not particular orange), can put here:

http://myfruitstand.com/fruits/oranges/comments 

again, above url restful since there's no id between 'oranges' , 'comments' (an id here, of course, imply discussion particular orange , don't want that)? here, there's no subclass rational of 'oranges' being followed 'comments.'

thanks in advance, chuck

it more restful construct resource-collection/id pairs, e.g. /fruits/:id1/items/:id2, id1 = orange, id2 = 3

/fruits/orange/items/3 

then answer second question correct if lose 's' on oranges, treating orange instance of resource , not resource collection.

/fruits/orange/comments 

e.g. slide 48 of http://www.slideshare.net/wombert/phpnw10-designing-http-services-and-restful-interfaces


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -