boots: Boot application by plugins

[ application, factory, ioc, library, mit, monad, program ] [ Propose Tags ]

Boot application by using plugins.


[Skip to Readme]
Versions [faq] 0, 0.0.1, 0.0.2, 0.0.3, 0.0.100, 0.1, 0.1.1, 0.2, 0.2.0.1 (info)
Dependencies base (>=4.10 && <5), data-default (>=0.7.1.1 && <0.8), exceptions (>=0.10.2 && <0.11), fast-logger (>=2.4.16 && <2.5), microlens (>=0.4.10 && <0.5), monad-logger (>=0.3.30 && <0.4), mtl (>=2.2.2 && <2.3), salak (==0.3.1), salak-yaml (==0.3.1), text (>=1.2.3.1 && <1.3), unliftio-core (>=0.1.2.0 && <0.2) [details]
License MIT
Copyright 2019 Daniel YU
Author Daniel YU
Maintainer leptonyu@gmail.com
Revised Revision 1 made by leptonyu at Tue Sep 3 08:43:45 UTC 2019
Category Library
Home page https://github.com/leptonyu/boots#readme
Uploaded by leptonyu at Tue Jul 30 11:51:27 UTC 2019
Distributions NixOS:0.2.0.1
Downloads 491 total (321 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for boots-0.0.3

[back to package description]

boots

Hackage Build stackage LTS package stackage Nightly package MIT license

Boot applications by using plugins.

Motivation

Simplify to create an application in Haskell.

When we decide to create an application using Haskell. We may need using configurations, loggers as basic functions. If this application needs storages, caches, etc., then we have to weaving the management of connection of these facilities into the application. Connections need to be created before and be destroyed after using them. There is a common strategy to manage connections, that is using Control.Monad.Cont. Then we can encapsulate the management of connections separately. For example, we can write a database plugin Plugin cxt m DBConnection, which can manage the database connections in monad m with context cxt. Context cxt may be requested for configurations or logging functions. When all the components of application are encapsulated by plugins, then building an application will be simplified.

A Project Use boots to Build

Refer to 鬼谷子

Have a Try

main :: IO ()
main = bootApp (pluginSimple "application") go
  where
    go = forever $ do
      user <- require "user"              -- Request for configuration.
      logInfo $ "Hello, " <> user <> "!"  -- Request for logging.
      liftIO $ threadDelay 1000000