awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
drapergem avatar

drapergem/draper

0
View on GitHub↗
5,274 stars·522 forks·Ruby·MIT·11 views

Draper

Draper is a presentation layer framework and decorator library for Ruby on Rails that implements the view-model pattern. It serves as a proxy-based system to separate presentation logic from business models, allowing view-specific data transformations to be isolated from the underlying data.

The framework provides specialized capabilities for managing how data is displayed, including the ability to wrap single objects or entire collections. It supports recursive decoration for associated models and the injection of view context and request state into decorators to allow for conditional presentation.

Additional functionality includes the delegation of methods and class-level finders to the wrapped model, integration with view helpers for data formatting, and the use of global identifiers to maintain decoration state during background job serialization.

A command line tool is provided to generate decorator files.

Features

  • Object Decoration - Wrap a model instance in a decorator to provide specialized presentation methods for a single record.
  • Logic and Presentation Separation - Isolates view-specific formatting and presentation logic from business models to keep core logic clean.
  • UI and View Helpers - Use helper methods within decorators to transform raw data into human-readable formats for the user interface.
  • View Helpers - Use application and framework view helpers directly within a decorator class.
  • Object Decoration - Apply a decorator to a model instance or collection to add presentation methods without altering the underlying data.
  • Delegate Message Forwarders - Forwards method calls not defined in the decorator to the underlying model object to maintain original data access.
  • Proxy Objects - Uses a proxy-based system to intercept and extend the behavior of model objects for presentation.
  • Request Context Injection - Injects controller and request state into decorator instances to allow conditional presentation based on the current session.
  • Collection Decoration - Apply decorators to groups of objects to add custom methods for tasks like pagination.
  • Recursive Decoration - Automatically wraps associated model instances in decorators when the parent object is decorated to ensure consistent formatting.
  • Domain Data Presentation Layers - Establishes a dedicated presentation layer for transforming domain data into view-ready formats.
  • Method Delegation - Forward method calls not defined in the decorator directly to the underlying model object.
  • Presentation Layer Frameworks - Acts as a presentation layer framework that isolates view-specific data transformations from business logic.
  • Model-View-Controller Patterns - Implements an architectural separation between data models and the presentation layer.
  • Model-View-ViewModel - Implements the Model-View-ViewModel pattern by wrapping model objects to provide UI-specific methods.
  • Decorator Libraries - Provides a specialized decorator library for Ruby on Rails to separate presentation logic from models.
  • View Models - Provides a view-modeling system to transform raw Rails model data into human-readable formats.
  • Automatic Controller Decoration - Wrap model instance variables in decorators before they reach view templates.
  • Automatic Variable Wrapping - Automatically wraps model instance variables in decorators before they reach view templates.
  • Class-Level Method Mapping - Routes class-level finders and constants from the decorator to the wrapped model class for seamless data retrieval.
  • Decorated Finder Proxying - Call database finder methods on a decorator class to return results that are already decorated.
  • Context Object Passing - Allows passing request and session state into decorators via a context object to enable conditional presentation.
  • Class Method Mapping - Provides the ability to call database finders and class methods directly on a decorator class.
  • View Context Injections - Inject and access controller or view level context within a decorator for conditional presentation.
  • Decorators - Add object-oriented presentation layers to Rails models.
  • More to explore - Adds presentation logic.

Star history

Star history chart for drapergem/draperStar history chart for drapergem/draper

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Draper

Similar open-source projects, ranked by how many features they share with Draper.
  • bbatsov/rails-style-guidebbatsov avatar

    bbatsov/rails-style-guide

    6,509View on GitHub↗

    This project is a collection of community-driven coding standards and best practices for developing maintainable Ruby on Rails applications. It serves as a style guide, architecture reference, and development guide to ensure consistency across a codebase. The guide provides technical recommendations for establishing naming conventions and architectural patterns. It specifically focuses on organizing models, controllers, and views to separate business logic from data persistence and user interface presentation. The documentation covers a broad range of capabilities, including RESTful API desi

    View on GitHub↗6,509
  • android10/android-cleanarchitecture-kotlinandroid10 avatar

    android10/Android-CleanArchitecture-Kotlin

    4,811View on GitHub↗

    This project is a reference Kotlin Android application template and a set of sample implementations demonstrating Clean Architecture principles. It provides a structural design that isolates core business rules from the user interface and data sources into distinct, layered modules. The implementation focuses on the Model-View-ViewModel (MVVM) pattern to decouple UI logic from data models. It utilizes a dependency injection framework to automate object creation and manage component lifecycles, while employing a repository pattern to abstract data requests across memory, disk, and cloud source

    Kotlinandroidandroid-cleanarchitecture-kotlinandroid-development
    View on GitHub↗4,811
  • kudoleh/ios-clean-architecture-mvvmkudoleh avatar

    kudoleh/iOS-Clean-Architecture-MVVM

    4,391View on GitHub↗

    This project is a SwiftUI app template and architectural blueprint for building iOS applications. It implements Clean Architecture and the MVVM pattern to separate business logic, data access, and the user interface into distinct layers. The framework utilizes a dependency injection container to manage object lifetimes and a flow coordinator pattern to handle navigation and screen transitions independently from the view layer. The codebase includes systems for network data management, featuring remote data pagination, cache-backed retrieval, and data mapping via data transfer objects. It als

    Swiftarchitectureclean-architectureios-swift
    View on GitHub↗4,391
  • bufferapp/android-clean-architecture-boilerplatebufferapp avatar

    bufferapp/android-clean-architecture-boilerplate

    3,684View on GitHub↗

    This project is a clean architecture reference implementation and modular project template for Android development. It provides a structural blueprint designed to isolate business logic from external frameworks and user interfaces. The template emphasizes a modular approach to organize code into independent modules, which is intended to improve build times and long-term project scalability. It demonstrates the application of domain-driven design to keep core business rules and entities independent from the underlying platform. The implementation covers several key architectural patterns, inc

    Kotlinandroidandroid-applicationandroid-architecture
    View on GitHub↗3,684
See all 30 alternatives to Draper→

Frequently asked questions

What does drapergem/draper do?

Draper is a presentation layer framework and decorator library for Ruby on Rails that implements the view-model pattern. It serves as a proxy-based system to separate presentation logic from business models, allowing view-specific data transformations to be isolated from the underlying data.

What are the main features of drapergem/draper?

The main features of drapergem/draper are: Object Decoration, Logic and Presentation Separation, UI and View Helpers, View Helpers, Delegate Message Forwarders, Proxy Objects, Request Context Injection, Collection Decoration.

What are some open-source alternatives to drapergem/draper?

Open-source alternatives to drapergem/draper include: android10/android-cleanarchitecture-kotlin — This project is a reference Kotlin Android application template and a set of sample implementations demonstrating… bbatsov/rails-style-guide — This project is a collection of community-driven coding standards and best practices for developing maintainable Ruby… kudoleh/ios-clean-architecture-mvvm — This project is a SwiftUI app template and architectural blueprint for building iOS applications. It implements Clean… bufferapp/android-clean-architecture-boilerplate — This project is a clean architecture reference implementation and modular project template for Android development. It… daveh/php-mvc — This project is a lightweight PHP framework designed for building web applications using the model-view-controller… freshrss/freshrss — FreshRSS is an open-source, self-hosted web feed aggregator designed to collect, organize, and display content from…