GithubHelp home page GithubHelp logo

daisy's Introduction

Daisy

A library to make clojure Components easier to use.

Usage

FIXME

Rationale

The component library is a large step forward in the organization of clojure libraries, but it is not perfect.

Here are the usability problems I have found with it.

Creating the component record in one place and then listing its dependencies in another seems wrong.

Looking at the component record, there is no way to tell the difference between fields that should be passed in the constructor, those that should be injected, and those that will be set by the component itself in its start method.

Making start and stop methods idempotent seems boilerplaty.

Want to add prints? eg: "Staring webserver...", "Stopping webserver...". There is no obvious way to do this without adding boilerplate to each component. Maybe it would be possible to add an alternative start-system function that prints what it's doing?

Exceptions during startup leave the system in a half-started state, but with nothing stored in the system map (at least in the "standard" setup, using alter-var-root). This sucks when you have a port bound, but no access to the server to shut it down - you have to just kill the repl and restart.

System map is hard to inspect. Probably need a custom-build pretty-printer that does not re-print referenced components.

Missing configs can be hard to track down, I have found. Well, in one case so far anyway - I was passing a nil port to jetty 9. Actually, I think the problem was more that I was not passing :join? false, so my system start was hanging, then never associng, so it was running, holding on to the port, and I had no handle on it to stop it. So never mind. But I still feel like I want a better way to to declare required configs.

License

Copyright © 2015 Chris Perkins

Distributed under the MIT License

daisy's People

Contributors

cthulhu-bot avatar grammati avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cthulhu-bot

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.