Lotus Web Framework

website·Indexed 33 days ago

https://hanakai.org

A web framework for Ruby featuring RESTful nested resources, database migrations, form helpers, and asset management. The project evolved through versions such as v0.3.0, v0.4.0, and v0.6.0, eventually transitioning into the Hanami project and the dry-rb ecosystem (including dry-validation and dry-transaction).

Tokens
289.9K
Snippets
2K
Records
2.3K
Agent score
70%

What's inside Lotus

  1. Overview of dry-container

    v0.11
    dry-container is a simple, thread-safe container designed to be part of a dependency injection system, often used alongside dry-auto_inject. It facilitates object composition and the SOLID principles by allowing dependencies to be passed to objects rather than instantiated internally. This enables easier swapping of implementations (e.g., using mocks/doubles during testing) and simplifies the management of complex dependency trees.
  2. Overview of dry-operation

    v1.0
    dry-operation is a library that provides an expressive and flexible DSL for modeling business operations. It is built on top of dry-monads, allowing developers to chain together a series of operations focusing on the 'happy path' while automatically short-circuiting and elegantly handling failures, avoiding deeply nested conditionals or repetitive guard clauses.
  3. Overview of dry-view rendering system

    dry-view is a standalone, functional view rendering system for Ruby. It treats views as stateless transformations that accept user input and return a rendered view. It is designed to work independently of HTTP requests, making it suitable for lightweight routing DSLs (like Roda or Sinatra) and applications utilizing dependency injection (such as dry-system or dry-web).
  4. Overview of Ruby Object Mapper (ROM)

    v5.0

    Ruby Object Mapper (ROM) is a fast Ruby persistence library designed to provide powerful object mapping capabilities without limiting the features of the underlying datastore. Unlike traditional ORMs that focus on object state tracking and identity management, ROM focuses on data and transformations. It aims to isolate the application from persistence details and provide a minimum infrastructure for mapping data into formats needed by the application domain (such as plain Ruby hashes, ROM Structs, or custom objects).

    Key design principles include:

    • Explicitness: Prefers explicit configuration over "magic".
    • Immutability: There is no dirty tracking or mutable state; data is loaded and mapped as a result of direct requests.
    • Decoupling: Components are stand-alone, loosely coupled, and follow the single responsibility principle.
    • Performance: Prioritizes speed and the use of native datastore features.
  5. Overview of dry-validation core concepts

    v1.11
    dry-validation is a data validation library that uses contract objects to define schemas and validation rules. A contract consists of a schema for basic type checks and additional rules for domain validation. Crucially, contract rules are only executed after the values they depend on have been successfully verified by the schema, ensuring that rule logic is type-safe.
  6. Overview of the Rom persistence toolkit

    Rom is a flexible persistence toolkit for Ruby that decouples domain logic from persistence concerns. Unlike traditional ORMs, Rom uses a data mapping approach to return plain data objects with no mutable state, preventing unexpected queries and improving performance and testability.
  7. Overview of the Dry Ruby toolkit

    Dry is a comprehensive collection of framework-agnostic Ruby libraries providing tools for validation, types, monads, events, and functional patterns. Because they make no framework assumptions, Dry gems can be used in Hanami, Ruby on Rails, or standalone Ruby applications to ensure robust code.
  8. Overview of the Hanami framework

    Hanami is a complete Ruby framework designed for building production-ready applications with a focus on structure and clarity. It features a modular slice architecture that allows applications to evolve gracefully as they grow. Key components include routes, actions, views, persistence, and dedicated tools for business logic, all optimized for speed and snappy local development.
  9. Overview of Hanami View Parts

    v3.0
    Parts are optional decorators for values returned from exposures. They provide a dedicated place for view-specific behavior, allowing you to move formatting and presentation logic out of templates and into reusable, testable Ruby classes. Unlike helpers, parts are bound to the specific object they decorate.
  10. Overview of dry-files gem

    dry-files is a Ruby gem that abstracts low-level file manipulations. It provides an API to touch, write, read, and remove files and directories, as well as inject, remove, or append Ruby code lines and blocks. It is particularly useful for building code generators.
  11. Overview of dry-core toolset features

    v1.1

    dry-core is a general-purpose toolset providing several utility modules for Ruby development:

    • Cache: Caches call results based on arguments.
    • Container: A dependency injection/storage container.
    • Class Attributes: Tools for managing class-level attributes.
    • Class Builder: Utilities for constructing classes.
    • Constants: A set of predefined constants to reduce memory allocations and simplify identity checks.
    • Deprecations: Tools for marking and managing deprecated code.
    • Equalizer: A mixin that provides equality, equivalence, and inspection methods.
    • Extensions: Additional extendable functionality.
  12. Overview of Hanami View Parts

    v2.2
    Parts are decorators for values returned from exposures. They provide a dedicated place for view-specific behavior, allowing developers to move logic out of templates and into reusable, testable object-oriented classes. Unlike helpers, parts are bound to the specific object they decorate. Parts have full access to the view rendering environment, including the context, partial rendering, and scopes.