There is no language that is best for REST so directly.
I'll leave a recommendation, Python!
There are many interesting tools to develop RESTFULL API in python among them Web2py, Django
Web2py
Doc REST + web2py
Example:
@request.restful()
def api():
response.view = 'generic.'+request.extension
def GET(*args,**vars):
patterns = [
"/friends[person]",
"/friend/{person.name.startswith}",
"/friend/{person.name}/:field",
"/friend/{person.name}/pets[pet.owner]",
"/friend/{person.name}/pet[pet.owner]/{pet.name}",
"/friend/{person.name}/pet[pet.owner]/{pet.name}/:field"
]
parser = db.parse_as_rest(patterns,args,vars)
if parser.status == 200:
return dict(content=parser.response)
else:
raise HTTP(parser.status,parser.error)
def POST(table_name,**vars):
if table_name == 'person':
return db.person.validate_and_insert(**vars)
elif table_name == 'pet':
return db.pet.validate_and_insert(**vars)
else:
raise HTTP(400)
return locals()
Novatec has just released a book on REST with Django, book link
Topics:
- Learn an uncomplicated approach to starting a new Django project.
- Separate reusable applications into smaller services that communicate with each other.
- Create a static website using rapid prototyping as a framework for websites and applications.
- Create a REST API with django-rest-framework.
- Learn how to use Django with the MVC Backbone.js framework.
- Create a single-page web application using your REST API.
- Integrate real-time capabilities with WebSockets and the Tornado network library.
- Use the code-oriented examples from the book in your own projects.