Giter VIP home page Giter VIP logo

rothko's Introduction

Rothko

We all know the .NET Framework APIs for dealing with the file system are not designed with testability in mind. Also, I wasn't happy with the existing libraries for providing an abstraction for such things. I wanted one that was:

  • Modern - Included the Enumerate* methods for example.
  • Interface based - Using Abstract base classes as the abstraction is blech.
  • Easy to port to - So it had to follow the existing APIs closely.

Rothko is this library. It provides abstractions for:

  • File system.
  • Registry
  • Environment.

The starting point for Rothko is the OperatingSystemFacade class. From there you can get to the other abstractions.

  • IFileSystem
  • IEnvironment
  • IRegistry

Goals

The goal is to use this in GitHub for Windows as well as any other applications where testability is important.

A secondary goal is to make it very easy to port code using the core .NET Framework APIs to port over to Rothko. The interfaces map closely to the .NET Framework's, except in a few places where I wouldn't be able to live with myself if I didn't modernize the library. For example, I updated methods that return arrays to return IEnumerable (or derived interface) instead.

Once these low level abstractions are implemented, I plan to add a set of Facade classes that provide a more usable API that we all wished had been there all along. These Facade classes will simply delegate to the lower-level abstractions.

rothko's People

Contributors

boriscallens avatar flagbug avatar grokys avatar haacked avatar ingmmajcica avatar niladri24dutta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rothko's Issues

Interest in project

Dear @haacked ,

as I do often run in a similar situation, I was thinking that I should have something out of the box, as your Rothko project, that will supply to my need of abstracting system resources.
I would like to contribute and I do think that I have a couple of good ideas.
Is this project still active and do you still have interest in following it?

Thanks

Mario

MessageBox abstraction

Was going to add some methods on IDialogFacade for showing message boxes when I ran in to CA1300.

So I thought about only implementing the overload that takes all parameters up to and including MessageBoxOptions. Guess another approach would be to implement the ones that take an IWin32Window and check the LTR settings on the window. Could even make it take a handle and create an IWin32Window internally to simplify use from WPF.

Any preference? Mine would be that people stop using MessageBox but I don't see that happening. :-/

File.WriteAllText does not accept encoding.

The ``IFileFacade.ReadAllTextmethod accepts anEncoding` parameter but the `IFileFacade.WriteAllText` does not. Is this intentional or an oversight? It seems to me that specifying the encoding on writing a text file is equally, if not more, important than specifying it on read...

Nuget Package

Last night I tried to use rothko but couldn't find the nuget package. Is that on purpose?

Looking for contributions?

I've written simple wrappers implementing some of the interfaces in this project but wasn't sure if you were looking for contributions at all. Or if that's even what you had in mind, although it seemed likely.

It's all rather simple stuff but it should get the job done. There are no integration tests at all since there's really no complexity to speak of. Most methods are just a single line calling another method and it doesn't get any more complex than doing that and calling a Select on the resulting set to convert them to the correct type.

But if tests are desired I'll add them in before submitting a PR.

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.