| Nome: | Descrição: | Tamanho: | Formato: | |
|---|---|---|---|---|
| 2.72 MB | Adobe PDF |
Autores
Resumo(s)
Os serviços web com APIs que aderem ao estilo arquitetural REST, conhecidos por serviços web RESTful, são atualmente muito populares. Estes serviços seguem um estilo cliente-servidor, com interações sem estado baseadas nos verbos disponibilizados pela norma HTTP. Como meio de especificar formalmente a interação entre os clientes e fornecedores de serviços REST, várias linguagens de definição de interfaces (IDL) têm sido propostas. No entanto, na sua maioria, limitam-se ao nível sintático das interfaces que especificam e à descrição das estruturas de dados e dos pontos de interação. A linguagem HEADREST foi desenvolvida como uma IDL que permite ultrapassar estas limitações, suportando a descrição das APIs RESTful também ao nível semântico. Através de tipos e asserções é possível em HEADREST não só definir a estrutura dos dados trocados mas também correlacionar o output com input e o estado do servidor. Uma das principais vantagens de ter descrições formais de APIs RESTful é a capacidade de gerar código boilerplate tanto para clientes como fornecedores. Este trabalho endereça o problema de geração de código para as APIs RESTful descritas com HEADREST e investiga de que forma as técnicas de geração de código existentes para os aspectos sintáticos das APIs RESTful podem ser estendidas para levar em conta também as propriedades comportamentais que podem ser descritas em HEADREST. Tendo em conta que a linguagem HEADREST adota muitos conceitos da Open API Specification (OAS), o trabalho desenvolvido capitaliza nas técnicas de geração de código desenvolvidas para a OAS e envolveu o desenvolvimento de protótipos de geração de código cliente e servidor a partir de especificações HEADREST.
Web services with APIs that adhere to the REST architectural style, known as RESTful web services, have become popular. These services follow a client-server style, with stateless interactions based on standard HTTP verbs. In an effort to formally specify the interaction between clients and providers of RESTful services, various interface definition languages (IDL) have been proposed. However, for the most part, they limit themselves to the syntactic level of the interfaces and the description of the data structures and the interaction points. The HEADREST language was developed as an IDL that addresses these limitations, supporting the description of the RESTful APIs also at the semantical level. Through the use of types and assertions we not only define the structure of the data transmitted but also relate output with input and the state of the server. One of the main advantages of having formal descriptions of RESTful APIs is the ability to generate a lot of boilerplate code for both clients and servers. This work addresses the problem of code generation for RESTful APIs described in HEADREST and aims to investigate how the existing code generation techniques for the syntactical aspects of RESTful APIs can be extended to take into account also the behavioural properties that can be described in HEADREST. Given that HEADREST adopts many concepts from the Open API Specification (OAS), this work capitalised on the code generation tools available for OAS and encompassed the development of a prototypical implementation of a code generator for clients and servers from HEADREST specifications.
Web services with APIs that adhere to the REST architectural style, known as RESTful web services, have become popular. These services follow a client-server style, with stateless interactions based on standard HTTP verbs. In an effort to formally specify the interaction between clients and providers of RESTful services, various interface definition languages (IDL) have been proposed. However, for the most part, they limit themselves to the syntactic level of the interfaces and the description of the data structures and the interaction points. The HEADREST language was developed as an IDL that addresses these limitations, supporting the description of the RESTful APIs also at the semantical level. Through the use of types and assertions we not only define the structure of the data transmitted but also relate output with input and the state of the server. One of the main advantages of having formal descriptions of RESTful APIs is the ability to generate a lot of boilerplate code for both clients and servers. This work addresses the problem of code generation for RESTful APIs described in HEADREST and aims to investigate how the existing code generation techniques for the syntactical aspects of RESTful APIs can be extended to take into account also the behavioural properties that can be described in HEADREST. Given that HEADREST adopts many concepts from the Open API Specification (OAS), this work capitalised on the code generation tools available for OAS and encompassed the development of a prototypical implementation of a code generator for clients and servers from HEADREST specifications.
Descrição
Tese de mestrado, Engenharia Informática (Engenharia de Software) Universidade de Lisboa, Faculdade de Ciências, 2018
Palavras-chave
REST RESTful HTTP Geração de código API Serviços Web Teses de mestrado - 2018
