style

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

style

squeakman
Greetings,

In past postings I have read that it is not recommended to use the
#style method in a component, instead we should use a static style sheet.

In a previous posting (that I can no longer find) it was pointed out
that using the #style method would probably be inefficient and give a
bad user experience.

I am now using the #updateRoot: method and aWAFileLibrary to add my
"static" style sheet and things seem to work. But, is this really
different than implementing  the #style method in my component? If yes,
the how is it different and what makes it more efficient?

I appreciate any help or tips you can provide.

Thanks,
Frank



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: style

Philippe Marschall
2008/10/14 Squeaker <[hidden email]>:

> Greetings,
>
> In past postings I have read that it is not recommended to use the #style
> method in a component, instead we should use a static style sheet.
>
> In a previous posting (that I can no longer find) it was pointed out that
> using the #style method would probably be inefficient and give a bad user
> experience.
>
> I am now using the #updateRoot: method and aWAFileLibrary to add my "static"
> style sheet and things seem to work. But, is this really different than
> implementing  the #style method in my component? If yes, the how is it
> different and what makes it more efficient?

#updateRoot: does not have anything to do with it. Especially if you
use WAFileLibrary you shouldnpt use #updateRoot: and instead add the
library to your application.

Using #style means the browser has to request a CSS for ever component
instance implementing #style on a given page. They can not be cached.
Using proper CSS files not only reduces the amout of CSS documents a
browser has to fetch but also allows the browser to cache them
resulting in far fewer request for rendering a page.

Note however that WAFileLibrary as well as #style is not recommended
for production use. For production use stand alone files and a web
server like Apache. It will offload work form your Smalltalk image.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: style

Julian Fitzell-2
On Tue, Oct 14, 2008 at 8:41 AM, Philippe Marschall
<[hidden email]> wrote:
> Note however that WAFileLibrary as well as #style is not recommended
> for production use. For production use stand alone files and a web
> server like Apache. It will offload work form your Smalltalk image.

Assuming that your Smalltalk image is overloaded. It's a bit strong to
say that either are not recommended for production use, isn't it? It
may not scale as well but many people have production applications
that aren't worried about scaling. You can always move away from
either of those techniques when scaling becomes an issue...

Julian
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: style

Philippe Marschall
2008/10/14 Julian Fitzell <[hidden email]>:

> On Tue, Oct 14, 2008 at 8:41 AM, Philippe Marschall
> <[hidden email]> wrote:
>> Note however that WAFileLibrary as well as #style is not recommended
>> for production use. For production use stand alone files and a web
>> server like Apache. It will offload work form your Smalltalk image.
>
> Assuming that your Smalltalk image is overloaded. It's a bit strong to
> say that either are not recommended for production use, isn't it? It
> may not scale as well but many people have production applications
> that aren't worried about scaling. You can always move away from
> either of those techniques when scaling becomes an issue...

WAFileLibrary is a hack because we can't put files under source
control in Squeak. I was written with the Seaside tests and Pier quick
start in mind. It was never intended for production use.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: style

Sebastian Sastre-2
In reply to this post by Julian Fitzell-2
> <[hidden email]> wrote:
> > Note however that WAFileLibrary as well as #style is not recommended
> > for production use. For production use stand alone files and a web
> > server like Apache. It will offload work form your Smalltalk image.
>
> Assuming that your Smalltalk image is overloaded. It's a bit strong to
> say that either are not recommended for production use, isn't it? It
> may not scale as well but many people have production applications
> that aren't worried about scaling. You can always move away from
> either of those techniques when scaling becomes an issue...
>
> Julian

Hi Julian,

Having in mind best web practices I think Phillipe is right in saying is not
recommended for production. That, as you also pointed, wont mean it can't be
used for production.
But that really can't be recommended due to some scenarios where requests are
expensive. Like in web apps for cell phones where requests are the most
expensive delays.

Cheers,

Sebastian

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside