Giter Site home page Giter Site logo

gorestclient's Introduction

GoRest Client

Screenshot

Features

  • Search employees by name
  • Pagination (go to the first, previous, next, last page)
  • Sort results (page) by field
  • CRUD operations
    • Create a new employee record
    • Update employee record
    • Delete an employee record

Prerequisites

.NET Core SDK 3.1.403

How to Run

The application can be built and run directly from Visual Studio, or from the console using the following .NET Core CLI:

  dotnet run --project ./GoRestClient/GoRestClient.csproj --configuration Release

Technologies

  • .NET core 3.1 and WPF
  • Prism – For the MVVM implementation
  • MS Unity Container – For dependency injection
  • Json.NET – For JSON serialization
  • NUnit – For unit tests
  • Moq – For mocking objects

All dependencies of the application are included as Nuget packages; therefore, they should be automatically restored during the build process.

Solution Structure

  • GoRestClient – MVVM implementation.
  • GoRestClient.Core – Infrastructure classes that could, if necessary, be reusable in other projects.
    • ConfigurationProvider – Wrapper for the configuration manager to facilitate the DI and unit tests.
    • JsonProvider - Provider to centralize all Json related operations and configurations. Also, to facilitate DI and unit test of the static methods.
    • RestProvider – Provider responsible for executing all rest operations and handle requests/response contents.
    • StatusManager – Very simplistic implementation of a log/status manager. Just enough to meet the requirements of this exercise.
  • GoRestClient.Services – Implementation of the service, and required models, to interact with the API.
  • GoRestClient.*.Tests – Each project has its own unit test project.

Code coverage

The code coverage index for this application is currently 89%. The unit tests are mainly focused on the most important classes/methods covering both, “happy path” and corner cases scenarios.

Future improvements

The scope of this exercise is to be simple and right to the point .NET Core client for GoRest API. Some things are still missing or could be improved:

  • Remove the Authentication Token from the config file.
  • Include a data currency mechanism based on the timestamp of the records.
  • Introduce a proper cache mechanism (according to the necessary requirements).
  • Introduce a fault-handling (retry, circuit breaker, timeout) for the API requests.
  • Implement fields data validation.
  • Extend the search feature to the other properties.
  • Improvements on the UI.
    • Create separated controls to improve reusability.
    • Add a loading control and “busy” state to avoid inconsistent/multiple requests.
    • General enhancements on the application layout.

gorestclient's People

Contributors

soaresluciano avatar

Watchers

James Cloos avatar  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.