REST web services offer interfaces to create, retrieve, update and delete information from a database (also called CRUD interfaces). However, REST web services can also be used to create rich services that offer more than simple CRUD operations and still follow the REST architectural style. In such a case it is important to create and publish behavioral service interfaces that developers can understand in order to use the service correctly. In this chapter we explain how to use models to design rich REST services. We use UML class diagrams and protocol state machines to model the structural and behavioral features of rich services. The design models are then implemented in Django Web Framework. We also show how to use the behavioral interfaces to implement a service monitor.
- cURL. 2010. http://curl.haxx.se/.
- urllib2 extensible library for opening URLs. Python Documentation, 2010. http://docs.python.org/library/urllib2.html.
- Django Software Foundation. Django Documentation. Online Documentation of Django 1.2, 2010. http://docs.djangoproject.com/en/1.2/.
- A. Holovaty and J. Kaplan-Moss. The Django Book. Online version of The Django Book, 2010. http://docs.djangoproject.com/en/1.2/.
- T. Mens and P. V. Gorp. A Taxonomy of Model Transformation. Proceedings of the International Workshop on Graph and Model Transformation, 2005.Google Scholar
- I. Porres and I. Rauf. From uml Protocol Statemachins to Class Contracts. Procceedings of the International Conference on Software Test, Verification and Validation(ICST 2010), 2010.Google Scholar
- I. Porres and I. Rauf. Modeling Behavioral RESTful Web Service Interfaces in UML. Accepted for Publication in 26th Annual ACM Symposium on Applied Computing Track on Service Oriented Architectures and Programming (SAC 2011), 2011.Google Scholar
- OMG UML. 2.2 Superstructure Specification. OMG ed, 2009. http://www.omg.org/spec/UML/2.2/.