Re: [Zope3-Users] How to render PageTemplate manually?

2006-01-05 Thread Wade Leftwich
Jean-Marc Orliaguet wrote:
> Stephan Richter wrote:
> 
>> On Wednesday 04 January 2006 07:55, Łukasz Łakomy wrote:
>>  
>>
>>> Create content type 'Portlet' that could have TAL as its content and
>>> when
>>> watched in browser TAL should be redered. My code is below.
>>>   
>>
>>
>> You really should not call this a portlet. A portlet is very well
>> defined by JSR 168. Note that the Zope community -- specifically CMF
>> and Plone -- have misused the term for a long time.
>>  
>>
> this is very developer-specific.
> people started using "telephones" before phone companies agreed on a
> common standard I guess.
> 
> PS: note that "viewlets" are known outside the Zope3 world as being
> small tutorial movies:
> http://psptips.com/6/viewlets/
> http://www.pmwdc.com/skies/
> http://www.geek.com/tipstrix/qarbon/
> http://www.djdenham.com/Basic_Windows.htm
> http://www.datacad.com/support/bulletin/Viewlets/viewlets.htm
> 
> I wonder why "portlets" are called "viewlets" in Zope3.
> 
> best
> /JM
> ___


Just don't call them "portolets". http://www.portolet.net/





___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to render PageTemplate manually?

2006-01-05 Thread Jean-Marc Orliaguet

Stephan Richter wrote:


On Thursday 05 January 2006 08:28, Jean-Marc Orliaguet wrote:
 


PS: note that "viewlets" are known outside the Zope3 world as being
small tutorial movies:
http://psptips.com/6/viewlets/
http://www.pmwdc.com/skies/
http://www.geek.com/tipstrix/qarbon/
http://www.djdenham.com/Basic_Windows.htm
http://www.datacad.com/support/bulletin/Viewlets/viewlets.htm
   



Viewlets in our case are a wordplay on the term "view", because they are 
sub-views or view fragments. In any case, the meaning of viewlets in both 
settings is very different and thus hard to confuse.



 


I wonder why "portlets" are called "viewlets" in Zope3.
   



Because viewlets do not fulfill all the requirements of a portlet. Portlets 
have to provide very specific user interactions, which viewlets do not 
promise. For example, portlets must be able to be minimized, selectively be 
removed, be fully self-contained and sharable across servers.


The reason we should not use the term portlet lightly is because we are 
working in the same industry, Content Management. People from the Java world 
have (rightfully) very specific expectations of portlets.


Regards,
Stephan



Yes, portlets that implement JSR-168 must be able to be minimized, 
others don't since they don't implement the specification.


cf http://en.wikipedia.org/wiki/Portlet
"Portlets are reusable Web components that display relevant information 
to portal users."


this definition is simple enough that anyone can relate to it. But 
there's a sense of confusion that arises from inventing new words for 
API reasons. Namespaces are sufficient for that, I think when used as 
adjectives:


jsr168.portlet
ibm.portlet
zope3.portlet
zope2.portlet
cpsskins.portlet
cmf.portlet
plone.portlet
...

why invent a new word? these are just different specifications / 
implementation of a same thing.


Regards

/JM



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to render PageTemplate manually?

2006-01-05 Thread Stephan Richter
On Thursday 05 January 2006 08:28, Jean-Marc Orliaguet wrote:
> PS: note that "viewlets" are known outside the Zope3 world as being
> small tutorial movies:
> http://psptips.com/6/viewlets/
> http://www.pmwdc.com/skies/
> http://www.geek.com/tipstrix/qarbon/
> http://www.djdenham.com/Basic_Windows.htm
> http://www.datacad.com/support/bulletin/Viewlets/viewlets.htm

Viewlets in our case are a wordplay on the term "view", because they are 
sub-views or view fragments. In any case, the meaning of viewlets in both 
settings is very different and thus hard to confuse.


> I wonder why "portlets" are called "viewlets" in Zope3.

Because viewlets do not fulfill all the requirements of a portlet. Portlets 
have to provide very specific user interactions, which viewlets do not 
promise. For example, portlets must be able to be minimized, selectively be 
removed, be fully self-contained and sharable across servers.

The reason we should not use the term portlet lightly is because we are 
working in the same industry, Content Management. People from the Java world 
have (rightfully) very specific expectations of portlets.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to render PageTemplate manually?

2006-01-05 Thread Jean-Marc Orliaguet

Stephan Richter wrote:


On Wednesday 04 January 2006 07:55, Łukasz Łakomy wrote:
 


Create content type 'Portlet' that could have TAL as its content and when
watched in browser TAL should be redered. My code is below.
   



You really should not call this a portlet. A portlet is very well defined by 
JSR 168. Note that the Zope community -- specifically CMF and Plone -- have 
misused the term for a long time.
 


this is very developer-specific.
people started using "telephones" before phone companies agreed on a 
common standard I guess.


PS: note that "viewlets" are known outside the Zope3 world as being 
small tutorial movies:

http://psptips.com/6/viewlets/
http://www.pmwdc.com/skies/
http://www.geek.com/tipstrix/qarbon/
http://www.djdenham.com/Basic_Windows.htm
http://www.datacad.com/support/bulletin/Viewlets/viewlets.htm

I wonder why "portlets" are called "viewlets" in Zope3.

best
/JM
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to render PageTemplate manually?

2006-01-05 Thread Stephan Richter
On Wednesday 04 January 2006 07:55, Łukasz Łakomy wrote:
> Create content type 'Portlet' that could have TAL as its content and when
> watched in browser TAL should be redered. My code is below.

You really should not call this a portlet. A portlet is very well defined by 
JSR 168. Note that the Zope community -- specifically CMF and Plone -- have 
misused the term for a long time.

> class PortletView:
>     def renderText(self):
>         portlet = IPortlet(self.context)
>         format = portlet.format
>         if format in ('HTML', 'Plain'):
>             return portlet.getText()
>         elif format == 'Structured':
>             struct = structurize(portlet.getText())
>             doc = DocumentWithImages()(struct)
>             output = HTMLWithImages()(doc, level=1)
>             return output
>         elif format == 'Page Template':
>             page_template = PageTemplate()
>             page_template.write(portlet.getText())
>             output = page_template()
>             return output
>
> But there is a problem. When I define a variable in template and call it
> its ok. But I cannot call 'context' variable (for example  tal:content="context/title"/>). This is my traceback.

Well, of course this does not work. The ``PageTemplate`` class does not know 
magically about a context. Have a look at 
zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile to see what 
is involved in making variables available.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users