[Nitro] render.rb stange methods

George Moschovitis george.moschovitis at gmail.com
Mon Feb 12 04:06:23 EST 2007


I would like to ger rid of the skip_ prefix. Lets keep the facets builder.

-g.

On 2/11/07, transfire at gmail.com <transfire at gmail.com> wrote:
>
>
> On Feb 10, 4:18 pm, "George Moschovitis"
> <george.moschovi... at gmail.com> wrote:
> > please, show me the build_form method source code.
>
> okay. well, it's little complicated since I'm using facets builder
> (with one midification since 1.8.20) and had to change some of nitro
> to use it. but i'll see what i can do. in the mean time i'll see if I
> can't get any more clues.
>
> one question about the builder. compared to _why's markaby lib there
> is a difference between the two. markaby imports the helper module
> verbatium -- ie. it's methods are callable without any special
> convention. For example say we're using this helper:
>
>   module AHelper
>     extend self
>     def foo; "FOO!"; end
>   end
>
> With markaby we might have:
>
>   builder.html {
>     h1 "hello"
>     foo
>   }
>
> to do the same with Facets, it prefixes the methods by build_:
>
>   builder.html {
>     h1 "hello"
>     build_foo
>   }
>
> The basic reason why being that markaby only allows standard html
> tags. If you try to insert an arbitrary tag you will get an error. To
> get around this you have to use the tag! method. Facets' on the other
> hand allows any tag whatsoever (minus a handful of special keywords),
> so to avoid name clashes I use a prefix.
>
> Which way is better? Should I get rid of the prefix? And still allow
> the arbitrary tags? in a way i would like to but take nitro's
> FormHelper which defines a form method --that's going to clash with
> creating an ordinary form tag. does it matter --maybe the helper
> method should hacve a more specidic name like entity_form?
>
> i was wondering also. might it just be better to use _why's Markaby
> lib? since it's not really the typical usage, markaby could just be
> optional it's no biggy to me either way really, facets' building code
> is capable enough i believe, and is pretty much the same as markaby in
> functionality, but it is sort of reinventing the wheel in most
> respects, so if this isn't going to get much use is it worth it?
>
> T.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070212/d5a62eb5/attachment.html 


More information about the Nitro-general mailing list