On Thu, Mar 22, 2012 at 9:42 PM, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Thu, 22 Mar 2012 19:03:16 -0300, trsvax <trs...@gmail.com> wrote:
>>
>> different template. All three have drawbacks but at least modifying the
>> DOM does not require understanding how the component works.
>
>
> I think that's the way to go too. By the way, have you thought of doing part
> of the implementation as mixins, specially for specific widgets?
>

There is one mixin and a service that backs it up with code for
specific components. It's easier to add the same mixin to all the
components with a worker plus you can swap out services without
changing any page code. In theory you could create a service that
supports a different CSS framework and just plug it in. It also
support multiple services so you can add more services to support any
custom components you have. Unfortunately since the mixin cannot
support informal parameters you are limited to it's current set of
arguments.  I'd really like to figure out a way around this problem
but so far I'm stuck. I suspect I'm just going to add a parameter with
type Map and be done with it.

>
>> I can understand not wanting to modify the existing components by default.
>> Unfortunately you can't really mix the Tapestry CSS and the Bootstrap CSS.
>
>
> Why? What bad results did you have? Tapestry's CSS is just enough to make
> the components not look bad out-of-the-box. I would never ever consider it a
> CSS framework. In addition, using DOM rewriting (MarkupWriterFilter or
> mixin, doesn't matter), you can remove the class attributes and add your
> own.
>

I did have some problems. Tapestry is pretty good about putting t-
infront of everything and if you removed all the t- classes it would
work but then there is really no point in having the Tapestry CSS. The
issues are really a combination of the CSS and HTML structure. For
example the form markup is very different. BeanEditor adds a lot of
markup where as Bootstrap wants just a straight up form.

>
>> I suspect this is true of any framework type CSS.  They just fight with
>> each other consequently I think you are stuck with the all or nothing
>> approach. If you have other ideas I'd be happy to hear them.
>
>
> Either way, as I said, Tapestry's CSS can be ignored, you just need to cover
> yourself what it covered before.
>
>
>> As far as removing the got5-jQuery requirement I'm on the fence. While
>> Bootstrap will work without jQuery important things like dropdown menus
>> don't work without it. So again realistically I think you may be stuck
>> with the all or nothing approach.
>
>
> I guess you can break it in two parts: one just with CSS, without any
> dependencies beyond Tapestry, and the other with the JS stuff and
> tapestry5-jquery dependency.

I don't think it's that hard to split them I'm just not sure how
useful Bootstrap is without jQuery. So I'm not sure it's worth the
effort.

>
>
>> I have tried to make sure it will work with
>> both Prototype and jQuery so you don't have to throw out any Prototype
>> code.
>
>
> Nice!
>
>
>> As far as the download I was thinking about Less but now that they have
>> the zip download I think I'm going to support that. I'll provide a default
>> but the idea is you just download the zip file and drop it in your project.
>> You don't even unzip it. You could also use Less if you like.
>
>
> If you provide the Bootstrap widgets as components or mixins, each one of
> them will be able to @Import the needed CSS and JS files, so you can have
> all them inside the JAR but each page import only what it really uses.
>

Currently I have all the JS included separately by the mixin but now
Twitter allows you to download a bundle configured the way you want it
and I think I'm going to switch to that method. The javascript file is
only 21K, CSS 90K so I think it's easier to just go to here

http://twitter.github.com/bootstrap/download.html

configure what you want and then just drop the zip file into WEB-INF
in your project. If the module finds the bootstrap.zip file (or a
bootstrap directory) in WEB-INF it will just use it.

> Gosh, I really wish I had the time to try Tapestry-Bootstrap. :( Maybe next
> week. :)

I've found the Bootstrap CSS nice looking, robust and easy to use. The
responsive version is also very interesting.

I've got one API to change and then I'm going to write more test
cases. Hopefully I can get it Beta quality in the next couple of
weeks.

>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to