{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/a09862c4e99d05160beaf5d1f0eee31a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a09862c4e99d05160beaf5d1f0eee31a","url":"https://api.github.com/users/darscan","login":"darscan","id":59090},"milestone":{"state":"open","open_issues":16,"url":"https://api.github.com/repos/robotlegs/robotlegs-framework/milestones/1","due_on":null,"creator":{"avatar_url":"https://secure.gravatar.com/avatar/a09862c4e99d05160beaf5d1f0eee31a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a09862c4e99d05160beaf5d1f0eee31a","url":"https://api.github.com/users/darscan","login":"darscan","id":59090},"title":"Version 2 Beta 1","description":"The first public beta of Robotlegs version 2","number":1,"closed_issues":1,"created_at":"2011-10-29T14:21:23Z"},"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/a09862c4e99d05160beaf5d1f0eee31a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a09862c4e99d05160beaf5d1f0eee31a","url":"https://api.github.com/users/darscan","login":"darscan","id":59090},"updated_at":"2011-11-07T08:51:07Z","labels":[],"comments":8,"closed_at":null,"url":"https://api.github.com/repos/robotlegs/robotlegs-framework/issues/34","body":"An issue to discuss the View Map API and implementation.","html_url":"https://github.com/robotlegs/robotlegs-framework/issues/34","title":"RL2 ViewMap","number":34,"id":2087005,"created_at":"2011-10-29T13:47:11Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/caa30471f9ee4c1fcf9a1cdd9b0f5a4c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"caa30471f9ee4c1fcf9a1cdd9b0f5a4c","url":"https://api.github.com/users/creynders","login":"creynders","id":436347},"updated_at":"2011-11-07T08:51:07Z","url":"https://api.github.com/repos/robotlegs/robotlegs-framework/issues/comments/2651194","body":"@stray I semi agree on `map()` being icky, but only because in this case it has no consequence at all to call map if done so w/o patching it with toMatcher etc.\r\nI can't seem to find mapMatcher in IMediatorMap...? I thought it used IMediatorMap#toMatcher?\r\n\r\n>It all depends whether you're mapping the consequence to the trigger - which is the pattern in the mediator map and the command map, in which case I think we need to map the rule to the view\r\n\r\nAh, that sentence is the missing piece of the puzzle for me. I still hadn't realized that.\r\n \r\nHowever, what's making this viewmap's API so hard to define is the fact that 99% usecase of the map is to apply the same consequence over and over to various triggers.\r\nFor that reason I'm thinking option 2 is the best solution all along. Since the use case deviates from the default map pattern, the API should reflect that deviation.\r\nDo you think there will be more possible rules? I can't really think of any.\r\nIf there aren't any others, I'd add a injectIntoView as an optional Boolean parameter, by default true, to the mapView method.  The only thing I'm worried about would be that you map a view, with injectIntoView set to false, but a lot later in the process, you decide you do need injections and add Inject tags to the view, but it still doesn't work, since you set the parameter to false. I can imagine a bunch of \"view does not receive injections\" threads on the fora. So maybe it's better to drop the DontInjectInto/injectIntoView=false rule all together, since the benefit is only minor.\r\n\r\nUsing option 2 viewMap is still the best name, I think. Otherwise it isn't.\r\n\r\nBTW how would you call ApplyCompanyColours, SimpleEnglish, ...? I mean what kind of classes are they? Processor, command, decorator,...? I seem to understand what they do, but find it hard to name them.","id":2651194,"created_at":"2011-11-07T08:51:07Z"}}