Nelibur

Something that will make you feel better

Nelibur is message based web service framework on the pure WCF. Nelibur simplifies creating high-performance and message based web services and you certainly have all the power of the WCF

Based on the pure WCF

Nelibur uses only standart WCF implementation with no modifications

Extremely fast

Framework is virtually as fast as WCF itself

See comparison

REST and SOAP

You can build powerful services both SOAP and REST based services

Check out documentation

Nelibur Package is available on Nuget.org

Or you can install it via Package Manager Console

PM> Install-Package Nelibur

Source code is available on GitHub

As well as latest examples and other useful stuff

JsonServiceClient

Here is a simple example of a RESTful service client. It should give you the basic idea of how simple it is to use Nelibur.

var client = new JsonServiceClient("http://nelibur.org/service");

var createRequest = new CreateClientRequest
{
    Email = "email@email.com"
};
ClientResponse response = client.Post<ClientResponse>(createRequest);

var updateRequest = new UpdateClientRequest
{
    Email = "new@email.com",
    Id = response.Id
};
response = client.Put<ClientResponse>(updateRequest);

var getClientRequest = new GetClientRequest
{
    Id = response.Id
};
response = client.Get<ClientResponse>(getClientRequest);

var deleteRequest = new DeleteClientRequest
{
    Id = response.Id
};
client.Delete(deleteRequest);
                

Service example

And here is an example of processor that processes requests from the clients.

public sealed class ClientProcessor : IGet<GetClientRequest>,
                                      IPost<CreateClientRequest>,
                                      IPut<UpdateClientRequest>,
                                      IDeleteOneWay<DeleteClientRequest>
{
    private static List<Client> _clients = new List<Client>();

    public object Get(GetClientRequest request)
    {        
        Client client = _clients.Single(x => x.Id == request.Id);
        return new ClientResponse { Id = client.Id, Email = client.Email };
    }

    public object Post(CreateClientRequest request)
    {
        var client = new Client
            {
                Id = Guid.NewGuid(),
                Email = request.Email
            };
        _clients.Add(client);
        return new ClientResponse { Id = client.Id, Email = client.Email };
    }

    public object Put(UpdateClientRequest request)
    {
        Client client = _clients.Single(x => x.Id == request.Id);
        client.Email = request.Email;
        return new ClientResponse { Id = client.Id, Email = client.Email };
    }

    public void DeleteOneWay(DeleteClientRequest request)
    {
        _clients = _clients.Where(x => x.Id != request.Id).ToList();
    }
}

Further reading

For additional information please get aquianted with the docs on our GitHub page