Skip to content

abenedykt/appEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

appEngine Build status

appEngine - simple dispatcher for request

initialize appengine and register workers

var app = new ApplicationEngine();
app.RegisterWorker(workerThatWillHandleTheRequest);

and you're ready to go

//and now you can just

var response = app.Execute(new Request{
  arg1 = "Hello",
  arg2 = "World"
  };
  
  
// and hey, your response have an intellisense

appEngine will send request to the Worker that knows how to handle the request and will return the response.

All the magic is created with just 2 interfaces:

  1. Mark Interface for Request
public interface IRequest<TRequest, TResponse>{} 

that tells the engine the type of request and corresponding response

  1. Worker
public interface IHandle<TRequest,TResponse>
{
        TResponse Process(IRequest<TRequest, TResponse> request);
}

Worker that can process the given request to given response.

Now with that, you can separate UI layer from the real application without any unnececary references and keep things separated

About

appEngine - simple dispatcher for requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages