Giter Club home page Giter Club logo

resteasy's Introduction

Lightweight RESTFUL Webservice Framework


About >>>
Initially designed to be part of my 3rd Year Software Engineering Degree.

This is lightweight framework that makes it easy to make RESTful endpoints. Currently it only outputs XML however it's MVC design means an adapter could be made to alter the output format.

It uses the Adodb (http://adodb.sourceforge.net/) Library as a database abstraction, which in turn is encapsulated within a Model class

It also uses the php.XPath class to provide a nice OO interface to handling XML files submitted to the server.

Lastly it has Unit tests for each of the library classes, the test harness is provided by php SimpleTest

Due to restrictions on the university servers, i built the framework assuming that Modrewrite was not available so a folder structure is used to simulate this

Source Layout >>>

adodb/		The adodb src files
app/		The files for the HTML front end to the example service
libs/		The framework files
PhpXPath-3	The PhpXPath framework
tests/		Tests for the framework files
webservice	The example webservice that uses the framework files

How it works >>>

Each node consists of three files

controller.php
index.php
model.php

controller.php Handles the incoming requests. It inherits dispatching code from it's parent, and requires the users to implement functions named after the the HTTP verb(s) that they wish to respond to.

index.php Acts as a simple bootstraping script, uniting the other files in the resource, initstaniating the controllers, so they can respond to a request.

model.php Simple ORM, modelled on CakePHP ORM layer, this class would establish the name of the table, and any custom Model layer methods that would need to be implemented.

Example of request handling

url  http://localhost/EWT/webservice/Location

This endpoint responds to GET,POST, PUT, and DELETE requests, it will output XML for each


Jonathan Dalrymple
[email protected]

resteasy's People

Stargazers

Jonathan Dalrymple avatar

Watchers

Jonathan Dalrymple avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.