Nicolas Petton | 18 Apr 23:17
Picon

WebElement and WebComponent

For now, WebComponent is an empty subclass of WebElement. 
To differentiate them, we should probably add some useful methods to
WebComponent.

My idea is to override WebComponent class>>initialize to call a #build
method, then add an empty #build method. That way the trick (often used)

printHTMLPageOn: aStream forSession: aSession

	self build.
	^super printHTMLPageOn: aStream forSession: aSession.

Won't be necessary.

What do you think ?

Nico
--

-- 
Nicolas Petton
http://nico.bioskop.fr
            ___
          ooooooo
         OOOOOOOOO
        |Smalltalk|
         OOOOOOOOO
          ooooooo
           \   /
            [|]
--------------------------------
Ma clé PGP est disponible ici :
(Continue reading)

Rob Rothwell | 18 Apr 23:19
Picon

Re: WebElement and WebComponent

#build makes sense to me, as in "build the component out of it's constituent WebElements."

Is that what you were thinking?

Rob

On Fri, Apr 18, 2008 at 5:18 PM, Nicolas Petton <petton.nicolas <at> gmail.com> wrote:
For now, WebComponent is an empty subclass of WebElement.
To differentiate them, we should probably add some useful methods to
WebComponent.

My idea is to override WebComponent class>>initialize to call a #build
method, then add an empty #build method. That way the trick (often used)

printHTMLPageOn: aStream forSession: aSession

       self build.
       ^super printHTMLPageOn: aStream forSession: aSession.

Won't be necessary.

What do you think ?

Nico
--
Nicolas Petton
http://nico.bioskop.fr
           ___
         ooooooo
        OOOOOOOOO
       |Smalltalk|
        OOOOOOOOO
         ooooooo
          \   /
           [|]
--------------------------------
Ma clé PGP est disponible ici :
http://nico.bioskop.fr/pgp-key.html

_______________________________________________
Aida mailing list
Aida <at> aidaweb.si
http://lists.aidaweb.si/mailman/listinfo/aida


<div>
<p>#build makes sense to me, as in "build the component out of it's constituent WebElements."<br><br>Is that what you were thinking?<br><br>Rob<br><br></p>
<div class="gmail_quote">On Fri, Apr 18, 2008 at 5:18 PM, Nicolas Petton &lt;<a href="mailto:petton.nicolas <at> gmail.com">petton.nicolas <at> gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote">For now, WebComponent is an empty subclass of WebElement.<br>
To differentiate them, we should probably add some useful methods to<br>
WebComponent.<br><br>
My idea is to override WebComponent class&gt;&gt;initialize to call a #build<br>
method, then add an empty #build method. That way the trick (often used)<br><br>
printHTMLPageOn: aStream forSession: aSession<br><br>
 &nbsp; &nbsp; &nbsp; &nbsp;self build.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;^super printHTMLPageOn: aStream forSession: aSession.<br><br>
Won't be necessary.<br><br>
What do you think ?<br><br>
Nico<br>
--<br>
Nicolas Petton<br><a href="http://nico.bioskop.fr" target="_blank">http://nico.bioskop.fr</a><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;___<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ooooooo<br>
 &nbsp; &nbsp; &nbsp; &nbsp; OOOOOOOOO<br>
 &nbsp; &nbsp; &nbsp; &nbsp;|Smalltalk|<br>
 &nbsp; &nbsp; &nbsp; &nbsp; OOOOOOOOO<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ooooooo<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ &nbsp; /<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[|]<br>
--------------------------------<br>
Ma cl&eacute; PGP est disponible ici :<br><a href="http://nico.bioskop.fr/pgp-key.html" target="_blank">http://nico.bioskop.fr/pgp-key.html</a><br><br>_______________________________________________<br>
Aida mailing list<br><a href="mailto:Aida <at> aidaweb.si">Aida <at> aidaweb.si</a><br><a href="http://lists.aidaweb.si/mailman/listinfo/aida" target="_blank">http://lists.aidaweb.si/mailman/listinfo/aida</a><br><br>
</blockquote>
</div>
<br>
</div>
Janko Mivšek | 19 Apr 14:37
Picon

Re: WebElement and WebComponent

Rob Rothwell wrote:
> #build makes sense to me, as in "build the component out of it's 
> constituent WebElements."
> 
> Is that what you were thinking?

That's an intentions of #build method, yes. It is meant to build an 
object tree of a component, just as #viewMain do for a whole page.

Component can be namely built once only and then is "cached", or every 
time a page with that component is shown, or when Ajax refresh request 
comes. All three ways use the same #build method.

Janko

> 
> Rob
> 
> On Fri, Apr 18, 2008 at 5:18 PM, Nicolas Petton 
> <petton.nicolas <at> gmail.com <mailto:petton.nicolas <at> gmail.com>> wrote:
> 
>     For now, WebComponent is an empty subclass of WebElement.
>     To differentiate them, we should probably add some useful methods to
>     WebComponent.
> 
>     My idea is to override WebComponent class>>initialize to call a #build
>     method, then add an empty #build method. That way the trick (often used)
> 
>     printHTMLPageOn: aStream forSession: aSession
> 
>            self build.
>            ^super printHTMLPageOn: aStream forSession: aSession.
> 
>     Won't be necessary.
> 
>     What do you think ?
> 
>     Nico
>     --
>     Nicolas Petton
>     http://nico.bioskop.fr
>                ___
>              ooooooo
>             OOOOOOOOO
>            |Smalltalk|
>             OOOOOOOOO
>              ooooooo
>               \   /
>                [|]
>     --------------------------------
>     Ma clé PGP est disponible ici :
>     http://nico.bioskop.fr/pgp-key.html
> 
>     _______________________________________________
>     Aida mailing list
>     Aida <at> aidaweb.si <mailto:Aida <at> aidaweb.si>
>     http://lists.aidaweb.si/mailman/listinfo/aida
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Aida mailing list
> Aida <at> aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

--

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
Aida <at> aidaweb.si
http://lists.aidaweb.si/mailman/listinfo/aida
Janko Mivšek | 19 Apr 14:39
Picon

Re: WebElement and WebComponent

Nicolas Petton wrote:
> For now, WebComponent is an empty subclass of WebElement. 
> To differentiate them, we should probably add some useful methods to
> WebComponent.
> 
> My idea is to override WebComponent class>>initialize to call a #build
> method, then add an empty #build method. That way the trick (often used)

Agree. Also comment all that methods well to help implementers better 
extending them. Also don't forget on Ajax registration for the #build 
method in initialize.

Janko

> 
> printHTMLPageOn: aStream forSession: aSession
> 
> 	self build.
> 	^super printHTMLPageOn: aStream forSession: aSession.
> 
> Won't be necessary.
> 
> What do you think ?
> 
> Nico
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Aida mailing list
> Aida <at> aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

--

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
Aida <at> aidaweb.si
http://lists.aidaweb.si/mailman/listinfo/aida

Gmane