Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How URI get mapped to resources  RSS feed

 
Rupali Patwa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am unable to understand URI maps to resources. and resources are things or domain objects.Because whenever we write rest ful application most of the URIs get mapped to java methods

Suppose I have class Employee

Since client can not directly access domain objects we expose some service to let clients manipulate object of employee class

i.e I may not write

@Path("/emp")
public class Employee{
}

@Path("/employee")
public class EmplyeeService{
@GET
@Path("/{"id"}
public Emplyee getEmployee(@PathParam("id" int id){
............
}

}

So my most of the URIs get mapped to java methods and very few one to domain objects
Can somebody explain this


thanks
Rupali
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!