HTML EMail

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

HTML EMail

Louis LaBrunda
Hi All,

I am working on a Seaside server that as part of its function has to send
EMail with HTML content.  I have subclassed WAComponent to make an object
that defines the HTML and used WARenderCanvas to render it.  I am wondering
if I should have subclassed WAPresenter instead of WAComponent.  I'm not
sure it matters much but would be interested in any comments.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com

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

Re: HTML EMail

Julian Fitzell-2
At first glance, it doesn't sound like you need a Component or a
Presenter at all. You just want to use a Canvas to generate some HTML
and you can do that from any object you want. By convention, you'd do
this by implementing an object with a #renderOn: method but even
that's not strictly necessary. In 2.9 you could subclass WAPainter.

An exception to the above would be if you need to embed other
Presenters within your rendering.

Also, if you haven't found it already, you might want to look at
Builder (you create one by calling the class-side #builder method on a
Canvas). This should make getting a string of the HTML easy.

Julian

On Tue, Jul 14, 2009 at 9:22 AM, Louis
LaBrunda<[hidden email]> wrote:

> Hi All,
>
> I am working on a Seaside server that as part of its function has to send
> EMail with HTML content.  I have subclassed WAComponent to make an object
> that defines the HTML and used WARenderCanvas to render it.  I am wondering
> if I should have subclassed WAPresenter instead of WAComponent.  I'm not
> sure it matters much but would be interested in any comments.
>
> Lou
> -----------------------------------------------------------
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
> mailto:[hidden email] http://www.Keystone-Software.com
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: HTML EMail

Philippe Marschall
In reply to this post by Louis LaBrunda
2009/7/14, Louis LaBrunda <[hidden email]>:
> Hi All,
>
> I am working on a Seaside server that as part of its function has to send
> EMail with HTML content.  I have subclassed WAComponent to make an object
> that defines the HTML and used WARenderCanvas to render it.  I am wondering
> if I should have subclassed WAPresenter instead of WAComponent.  I'm not
> sure it matters much but would be interested in any comments.

WAPresenter is preferable since it's not a "general" component and
many component features won't work: callbacks, #updateRoot:,
backtracking, ...

It does not matter a big deal though, it's more a stylistic thing.

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: HTML EMail

Louis LaBrunda
In reply to this post by Julian Fitzell-2
Thanks Julian and Philippe for your replies.

I do need to embed other Presenters within my rendering.  So I guess
Presenters are the way to go.

I would like to know more about the Builder you mentioned below.  Can I use
it instead of WARenderCanvas?  If so, can you please give me an example.

Many thanks inadvance, Lou

>At first glance, it doesn't sound like you need a Component or a
>Presenter at all. You just want to use a Canvas to generate some HTML
>and you can do that from any object you want. By convention, you'd do
>this by implementing an object with a #renderOn: method but even
>that's not strictly necessary. In 2.9 you could subclass WAPainter.
>
>An exception to the above would be if you need to embed other
>Presenters within your rendering.
>
>Also, if you haven't found it already, you might want to look at
>Builder (you create one by calling the class-side #builder method on a
>Canvas). This should make getting a string of the HTML easy.
>
>Julian
>
>On Tue, Jul 14, 2009 at 9:22 AM, Louis
>LaBrunda<[hidden email]> wrote:
>> Hi All,
>>
>> I am working on a Seaside server that as part of its function has to send
>> EMail with HTML content.  I have subclassed WAComponent to make an object
>> that defines the HTML and used WARenderCanvas to render it.  I am wondering
>> if I should have subclassed WAPresenter instead of WAComponent.  I'm not
>> sure it matters much but would be interested in any comments.
>>
>> Lou
>> -----------------------------------------------------------
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon
>> mailto:[hidden email] http://www.Keystone-Software.com
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com

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

Re: Re: HTML EMail

Julian Fitzell-2
You use it *with* a Canvas. A Builder simply drives a Canvas (well,
any renderer) for you. It handles setting up the Document, the render
context, etc. and provides a way to get at the resulting content.

Look for senders of #builder in the image for a few examples.

Julian

On Wed, Jul 15, 2009 at 6:45 AM, Louis
LaBrunda<[hidden email]> wrote:

> Thanks Julian and Philippe for your replies.
>
> I do need to embed other Presenters within my rendering.  So I guess
> Presenters are the way to go.
>
> I would like to know more about the Builder you mentioned below.  Can I use
> it instead of WARenderCanvas?  If so, can you please give me an example.
>
> Many thanks inadvance, Lou
>
>>At first glance, it doesn't sound like you need a Component or a
>>Presenter at all. You just want to use a Canvas to generate some HTML
>>and you can do that from any object you want. By convention, you'd do
>>this by implementing an object with a #renderOn: method but even
>>that's not strictly necessary. In 2.9 you could subclass WAPainter.
>>
>>An exception to the above would be if you need to embed other
>>Presenters within your rendering.
>>
>>Also, if you haven't found it already, you might want to look at
>>Builder (you create one by calling the class-side #builder method on a
>>Canvas). This should make getting a string of the HTML easy.
>>
>>Julian
>>
>>On Tue, Jul 14, 2009 at 9:22 AM, Louis
>>LaBrunda<[hidden email]> wrote:
>>> Hi All,
>>>
>>> I am working on a Seaside server that as part of its function has to send
>>> EMail with HTML content.  I have subclassed WAComponent to make an object
>>> that defines the HTML and used WARenderCanvas to render it.  I am wondering
>>> if I should have subclassed WAPresenter instead of WAComponent.  I'm not
>>> sure it matters much but would be interested in any comments.
>>>
>>> Lou
>>> -----------------------------------------------------------
>>> Louis LaBrunda
>>> Keystone Software Corp.
>>> SkypeMe callto://PhotonDemon
>>> mailto:[hidden email] http://www.Keystone-Software.com
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
> -----------------------------------------------------------
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
> mailto:[hidden email] http://www.Keystone-Software.com
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside