zope3views
Michel does some advertisement for the book Zope3 live, it is an ebook and living. There will be a lighning talk about rds, too...
Zope 3 Views in Plone
* First step of the Goldegg initiative
* Goldegg is going to be explained during the conference.
Plone needs views
Plugability, cleaning the page templates to get logic out of them.
Components are very explicit in zope3 and those expressions you see in todays page template code will be cleaner.
You can not debug you python scripts or tales expressions with pdb. If you make a change you will have to fire up the whole site.
What is a view component?
* A regular python class with some extra decoration
* It implements an interface
Q: View components in zope 3 versus refresh and reload.
A: You are not supposed to be testing those things in the full zope environment, but in a small unit test.
How to use a view class?
* Register a regular component in ZCML, there you give it a name
* Use the @@syntax; acquisition is magic, but also hard to handle, you don't know what you will get, you couold even overwrite 'URL' screwing zope sites. Now namespaces are specific in zope 3.
Advantages?
* test debug and reuse.
* the template is hard to change or replace. with components you just do another implementation and you have a pluggable way to change a view.
* Security machinery: Classes are trusted and fast.
* Page templates are more designer firendly that dtml. Designers would make a dummy template and the developer would fill in the logic, namely tales expressions.
No Disadvantages experienced so far ;-)
Philipp von Weitershausen: Through the web designing is not the same thing any more and probably not integrated
Jim Fulton: Editing through the web and editing on the filesystem has impact on the reload mechanisms and how they will work.
Q: Are we going to turn off customosation totally or...
A: The existing skins still exist in the branch, and you can still 'customize' a Plone site.
Q: Can we still use the oldfashioned TALES
A: Yes, of course
A: Philipp von Weitershausen Customisation means pressing 'customize' and that is the way it is done atm. You are customizing now on the file system and it 'feels' different but works well.
Templates should not handle complex objects
For a lot of projects there are too many customisation prssibilites.
What does the UI people need to display? Classes should return simple python types, which don't even need security checks.
Jim: There are supplementary views, you don't have to register the view on a class, it is associated with the object.
[...Michel calls spanky 'Jerry Springer' as he hands Jim the Micorphone...]
When you define a view in zope 3 you have a template and a class. They are glued together and it is registered. A component usually has a template and the logic is in the python object.
Martijn: Everything should be handled by zope 3 but we have to take small steps.
When you are designing an interface you create a stub implementation and register it. The designer designs against the stub. Later on you implement the real implementation(s). You defer the implementation until you know what the site would look like. This seperation gives you more freedom. You declare the interface NOW and then you create a stub. UI Designers don't need to know a lot about python or the framework.
Goldegg Phase One
Several funded projects whit and sidnei; Do run a project at the moment, they collaborate. Existing expressions need to be dragged into python classes. This task may suck from time to time. It is tricky and sometimes a little to magical.
The global defines are causing some overhead, they are called at every page rendering. Global variables can be cached now. navigation viewsm, news view, breadcrumbs and some more have been worked on.
And now EMACS!
[...the screen resolution of the presentatiomn computer is changed by spanky...]
Michel shows code: he removed expressions and put them into a view component.
[...the code is not very readable due to the color it has on the screen...]
[...audience asks for registration code and Michel brings it up...]
The view should actually be registerd with a template.
name, class permission and allowed_interface
Philipp: There is no python code for security, security is policy and belongs to ZCML.
Q: Can you show a test?
A: There is no time for that.
A: Every dot in python expressins would trigger security checks in tales... That slows things down pretty much.
[]
Q: How would I use that with Archetypes Widgets.
A: Good question, ther is this Fate project, which is Five in Archetypes.
Michel is advertising for his book once more.
Trackback
The URI to TrackBack this entry is: http://gogo.bluedynamics.net/plone/blogs/pc2005/blog/archive/2005/09/19/zope3views/trackback-
Penis enlargement pills
health pills
-
8937afabd49c25d302428323719b8a25:
8937afabd49c25d30242
8937afabd49c25d302428323719b8a25<a href="http://8937afabd49c.info">8937afabd49c</a>
-
Stanford:
Stanford
While browsing for content to write about, I discovered an intresting post on "" which I found relevent to blog readers here at <a href="http://plato.stanford.edu/search/searcher.py?query=research+and+recommendations+on+%3Ca+href%3D%22http%3A%2F%2Fwww.doctorstrust.com%2Ffind%2Fpolicosanol.html%22%3Epolicosanol%3C%2Fa%3E+products+and+policosanol+health">Stanford</a> and I recommend that everyone drop by and read that post...