Lightweight REST framework for Java
Do you want to embrace the architecture of the Web and benefit from its simplicity and scalability?
Leverage our innovative REST engine and start blending
... [More] your Web Sites and Web Services into uniform Web Applications! [Less]
Kauri is a Java-based framework for RESTful (web) application development. It's based on Restlet, jQuery, Maven, Spring and the sweaty hands of its core development team.
Tabula is a Java Web Framework, comprised of several subprojects, such as a server and GUI tools. Right now there is a preview version of the server available for Windows and Linux.
The framework is
... [More] based on SOFEA, removing the UI responsibilities from the server to other applications. The server itself deals with business logic and persistence, among other issues. In order to expose this functionality, there is a REST service layer, implemented with the RESTlet library. I've created a simple XML format specification to declare and configure the services, allowing for runtime changes. The implementation supports Java and Groovy classes as request handlers.
The main goal of the framework is to reduce app restarts during development as much as possible, while providing a simple environment for prototyping and developing small to medium applications.
The controller layer uses another project of mine, named JTAction. It's a library for handling composite actions. Each action is a state machine, where each state is built by several steps. Actions are cached but can be changed via a remote refresh request. Action steps can be implemented with Java or Groovy scripts. JTActions can also be used as request handlers for the service layer.
There is also a custom AOP system which defines an approach to create, edit and apply aspects to JTActions through a rule system based on request parameters. This allows to add for example logging and authorization aspects, and is already used to automatically refresh the REST service layer when any PUT, POST or DELETE methods are performed on the stored rest service configuration objects.
The persistence layer uses a custom persistence abstraction layer. Ideally, I would have used JPA, and though I like it, it doesn't support real time changes such as redefining groovy classes. The implementation uses Neodatis ODB, an object based database system, which is still under development, but is showing great promise.
There will be SWING-based editors for some of these components, such as configuring REST services, building JTActions from groovy scripts and applying aspects. The goal is to ease development of the whole application, hide any XML details from the developers, instead showing a configuration interface, and support runtime changes of the application.
The whole purpose of the project right now is to try out different ideas and approaches to web development. As such, currently this is a proof of concept and should not be used for deployment.
Due to time restraints, some aspects of the framework may be changed or removed. The source code also reflects the time restraints unfortunately, but as this is something I plan of using and developing along the way, it will improve. [Less]
Restly is a simple framework for building RESTful webservices in Java.
FeaturesResources are represented by Classes identified with a @Resource("...") annotation and automatically discovered from
... [More] the WEB-INF/classes directory. Parameter to @Resource is the path that the resource is bound to, supporting templating with {...}. HTTP methods map to methods on the resource class and MAY return an instance of a Representation, which will get returned to the client. So far, includes 2 representations: StringRepresentation: returns the given String as the entity body and sets the content type to text/plain SerializedRepresentation: takes an object and serializes it with XStream as text/xml or application/json, depending on the provided Accept request header. Automatically converts HEAD requests to a GET request and suppresses the output of the entity body. Automatically enumerates available methods and responds to OPTIONS requests. Request parameters, request attributes, Resource path attributes, and HttpServletRequest/HttpServletResponse objects automatically injected by name into fields on the Resource class. For security, request parameters will only be injected into public fields. Resource level and method level interceptors by means of decoration with @InterceptedBy(...) annotation. Interceptor interface defines methods called before and after execution of the resource method. Before interceptor returns: InterceptorChain.next Continue processing the next Interceptor or resource method. Representation Halt all further execution of interceptors or resource method and return this Representation to client. null Halt all further execution of interceptors and moves on to execute resource method. After interception takes the Representation return from the resource method, and returns a Representation (either the same as the one passed in, or a different one). Fields can be decorated with OVal annotations which will be checked before invoking the method, and errors will be reported to the client automatically with descriptions serialized in requested format in entity body and appropriate status code set. Tunnels PUT and DELETE through POST using either an HTTP header (X-HTTP-Method-Override) or a parameter (method-override). Negotiates content type via Accept header. Automatically checks for XML or JSON. Might make this configurable at some point. Correctly sets response codes based on various kinds of detectable errors (Method Not Allowed, Unsupported Media Type, Bad Request). By default, when SerializedRepresentation outputs XML, it includes a stylesheet based on resource class name, method name, and a configurable base URL. May be excluded by passing null as second parameter to constructor. [Less]