+1 I like it. It marks "slot"(extension point) in slice view, and we can choose to extend it or not in application. I also like the jquery style API.
On Tue, Jan 6, 2009 at 9:23 PM, Piotr Sarnacki <[email protected]> wrote: > > Hi, > > I don't know if I should post it here or on rails group, but since > rails doesn't support slices yet I've posted here :) > > I love the idea of living in the reusable world. I would love to be > able to build application by just adding new "bricks". It would be > very generic, standarized (boring?), but hey! Sometimes I just want to > build app in a few hours, check if idea is good in practice and then > possibly extend it later. > > Idea of slices and mountable apps is very good, but they must be build > with good design to easily merge them with other applications. > > I know that there are plans to build admin interface API, but I would > like to make something different. Many of you probably used Radiant > and saw its extensions views API. There are many regions defined in > views, which allows to easily add some code to views in specified > place. > > Something like (it's pseudo code): > <% region :comments do %> > <div id="comments"> > ..... > </div> > <% region :form do %> > <% form_for @comment do %> > .... > <% end %> > <% end %> > <% end %> > > And then something like: > region("comments.form").insertAfter("<p>Paragraph displayed after > form</p>") > > I think that it would be very useful if I could take comments slice > and make comments-ratings slice which would plug ratings into comment > form and comments show without changing comments slice code. As long > as developer doesn't need to customize code it solves the problem out > of the box, without additional coding. And event if he wants to > customize it, he could just use this API. If all else fails, for > example he can't solve the problem without rewriting views, he could > copy views to the app like normally he can do now with slices and then > change it. > > What do you think about that? Is it good idea? Are there any plans on > such API? > > Another approach could be to take nokogiri, or another parser and plug > additional html by parsing generated views. Good sides of it is > ability to use it without defining "regions" by slice developer and , > but I don't know if it's doable and maybe there would be to many > 'gotchas'. > > Cheers :) > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
