You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
No
Describe the feature you'd like to see implemented
Currently, rendering logic is split between a BaseHelpers module (primarily), and Blueprinter::Base (with the former also being included in the latter). I believe this was done to help "slim down" Blueprinter::Base, but BaseHelpers has seemingly turned into a sort of "junk drawer" of methods.
Since rendering is a clearly defined concept in the context of Blueprint, it would be helpful to encapsulate relevant logic in a specific class (e.g. Renderer), which would help with comprehensibility, testability, and extensibility moving forward.
Describe alternatives you've considered
No response
Additional context
At the moment, the rendering flow looks something like so:
sequenceDiagram
actor User as User
participant B as Blueprinter
participant BH as BaseHelper
participant E as Blueprinter.configuration.extensions
User ->> B: .render(Object)
B ->> BH: .prepare_for_render
BH ->> BH: .validate_root_and_meta
BH ->> B: .prepare
B ->> E: .pre_render
E ->> B: Object
B ->> BH: .prepare_data
BH ->> B: Hash | Array
B ->> BH: .prepend_root_and_meta
BH ->> B: Hash | Array
B ->> B: .jsonify
B ->> User: JSON Object
Loading
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe
No
Describe the feature you'd like to see implemented
Currently, rendering logic is split between a
BaseHelpers
module (primarily), andBlueprinter::Base
(with the former also being included in the latter). I believe this was done to help "slim down"Blueprinter::Base
, butBaseHelpers
has seemingly turned into a sort of "junk drawer" of methods.Since rendering is a clearly defined concept in the context of
Blueprint
, it would be helpful to encapsulate relevant logic in a specific class (e.g.Renderer
), which would help with comprehensibility, testability, and extensibility moving forward.Describe alternatives you've considered
No response
Additional context
At the moment, the rendering flow looks something like so:
The text was updated successfully, but these errors were encountered: