Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
request processing system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Sep 2014 at 23:14 UTC
Updated:
14 Nov 2014 at 11:18 UTC
Jump to comment: Most recent
Comments
Comment #1
Crell commentedComment #2
Crell commentedComment #3
wim leersFixing typos that hinder legibility.
Comment #4
cosmicdreams commentedI searched all of core for the string "RenderHtmlRenderer" and couldn't find one. Did I miss something, or does that not exist anymore.
Also, HtmlFragmentRenderer and HtmlPageRenderer doesn't exist. But DefaultHtmlFragmentRenderer.php and DefaultHtmlPageRenderer.php exist as well as HtmlFragmentRendererInterface.php and HtmlPageRendererInterface.php.
Let's be clear of what we're talking about here.
Comment #5
Crell commentedRenderHtmlRenderer will appear in core as soon as someone gets around to committing #2256365: Factor render->fragment code out to a service.
Comment #6
cosmicdreams commentedRenderer seems like an appropriate name to me. But for the sake of argument here are a few alternatives:
http://www.thesaurus.com/browse/render
Producer
Maker
Deliverer
Interpreter
Performer
Contributor
Provider
also some that weren't included
Hydrator
Builder
Processor
Compiler
I'm assuming you want to keep the er pattern.
Comment #7
joelpittetRender is the action, shouldn't a HtmlPage or HtmlFragment know how to render themselves via a render() method and/or a __toString()?
"View" would be what I'd prefer(bias), but may get confused with Views which seems to be why we call everything "render" or "renderable"
Likely over simplifying things but thought I'd throw it out there, the View that I'm familiar with most is from Kohana which is very similar to an HtmlFragment in that they use HMVC pattern (sub controller calls from within other parts of the system with their own view(fragment) returns like a server side ajax call.
https://github.com/kohana/core/blob/3.4/develop/classes/Kohana/View.php#...
This ends in a beauty like this:
Comment #8
joelpittetIgnore me... I don't know what HtmlPage/Fragment is really doing yet to say anything constructive...
And I can do mostly that View::factory thing with this:
Comment #9
cosmicdreams commentedThis issue might be on the right track; see:
http://objology.blogspot.com/2011/09/one-of-best-bits-of-programming-adv...
Renderer made the list of Objects that tend to have better names.
Should we switch our thinking into having the ability to render be an interface. We could call it Renderable. Then anything that has the Renderable interface could be renderable.
Comment #10
wim leersFixed by #2352155: Remove HtmlFragment/HtmlPage.