Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lotus: because sometimes you need to reinvent the wheel

Lotus: because sometimes you need to reinvent the wheel

Arjan van der Gaag

July 08, 2015
Tweet

More Decks by Arjan van der Gaag

Other Decks in Programming

Transcript

  1. lotus
    sometimes you need to
    reinvent the wheel

    View Slide

  2. Arjan van der Gaag
    @avdgaag
    brightin

    View Slide

  3. Lotus is a Ruby MVC web framework
    comprised of many micro-libraries. It
    has a simple, stable API, a minimal
    DSL, and prioritises the use of plain
    objects over magical, over-
    complicated classes with too much
    responsibility.

    View Slide

  4. standalone
    frameworks

    View Slide

  5. standalone
    frameworks to
    build full-stack
    applications

    View Slide

  6. from small endpoints…
    require 'bundler/setup'
    require 'lotus/router'
    run Lotus::Router.new {
    get '/', to: ->(env) {
    [200, {}, ['Hello, world']
    }
    }

    View Slide

  7. …to containers

    View Slide

  8. some conventions

    View Slide

  9. some conventions
    many objects

    View Slide

  10. some conventions
    many objects
    no monkey patches

    View Slide

  11. simplicity >
    convenience

    View Slide

  12. testable
    class Show
    include Lotus::Action
    expose :book
    def initialize(repository: BookRepository)
    @repository = repository
    end
    def call(params)
    @book = @repository.find params[:id]
    end
    end

    View Slide

  13. focus on
    maintenance

    View Slide

  14. writing Ruby is fun

    View Slide

  15. Guides and docs at
    lotusrb.org

    View Slide

  16. @avdgaag
    arjanvandergaag.nl

    View Slide