Pomona is a framework built for exposing a domain model in a RESTful and hypermedia-driven manner. It embraces the concept of convention over configuration, and provides opiniated defaults on how domain model objects is exposed as HTTP resources.
Pomona was born out of frustrations with the difficulties of exposing a complex business domain model as a RESTful web service.
master | develop | future | |
---|---|---|---|
GitHub | - | - | |
NuGet | - | ||
Travis | |||
AppVeyor | |||
Codefactor |
To illustrate what Pomona does, here's a diagram:
- Starting on the top left, in the client:
- A Linq statement is written inside a client application against a statically typed and auto-generated client library.
- The query is run through a Linq Provider and translated to an HTTP query string.
- Inside the server:
- The HTTP query string is received by the Pomona Server and parsed back into a Linq Expression Tree.
- The Linq Expression is fed through a (custom) Linq Provider that can execute it against any back-end datastore supporting Linq as a query method.
- The Data is mapped from Data Transfer Objects, to database objects, back into DTOs and fed through a JSON serializer.
- Back inside the client:
- The JSON is deserialized to statically typed DTOs.
- The DTOs are made available to the client with just the data requested
with the initial
.Select()
statement.
This is in many ways similar to what Falcor
does, only in a statically typed way tailored for .NET instead of a
Promise
-based approach for JavaScript.
To get started with Pomona please read the documentation.
Do you want to contribute to Pomona? Lovely! Contributions of any kind are highly appreciated! Just make sure you've read and agreed to the contribution guidelines before submitting a pull request.
Copyright Karsten N. Strand, Asbjørn Ulsberg, PayEx and contributors. Pomona is provided as-is under the MIT License.
Thanks to: