Re: [Zope] MVC Approach
Thomas Adams wrote: > Hi all, > > I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one) > and I want to know if there is something > like a MVC approach available for Zope, i.e. Model-View-Controller > approach, as it is for instance in Java with the Struts framework from > Apache. > (snip description of MVC à la Struts) > To transfer this appraoch to Zope, I'm not sure: > > Views: > DTML-Document and/or DTML-Methods? Nope, use ZopePageTemplates instead. DTML is useful for non-html templating (css, Javascript, SQL etc), but it's an horror when it comes to html IMHO. > Controller: > PythonScripts? You could get away with Python scripts, but Zope product(s) might be your best bet. Note that a single Zope Product can be composed of multiple classes, external methods, templates etc... > Models: > I'm absolutely not sure, Pluggable brains? Why ? This goes into the product too. Understand that a Zope product is not restricted to a single class, and that not all classes in a Zope product needs to be persistant or whatsoever. My 2 cents -- Bruno Desthuilliers Développeur [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MVC Approach
On Wednesday 03 August 2005 22:06, Thomas Adams wrote: > Hi all, > > I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one) > and I want to know if there is something > like a MVC approach available for Zope, i.e. Model-View-Controller > approach, as it is for instance in Java with the Struts framework from > Apache. Sure its possible to implement MVC in Zope2 (we did it for our product), especially if youre not afraid of Python Products, though theres no special support for this in Zope 2.7 You really should be looking at Zope3 or Zope2 + Five (which is part of Zope2.8) for this though. See the Zope3 Developers Book, eg. http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/components.html - peter. > To be more specific: > > - The Model consists of several python classes implementing business logic > (the pendant to Enterprise Java Beans or simple Java Beans) > > - The Views producing the visual appearance of the business objects > (in java or more specific in Struts these are the custom tag libraries) > > - The Controller, as a kind of glue between the two above, is > controlling the work/process-flow > (in java with servlets and in struts with actions classes (as a minimum) > ) > > To transfer this appraoch to Zope, I'm not sure: > > Views: > DTML-Document and/or DTML-Methods? > > Controller: > PythonScripts? > > Models: > I'm absolutely not sure, Pluggable brains? (the Zope book has a example > but only as a handling of resultsets) > > So if has anybody a hint if there are some resources > in the web, please post it. > > P.S: I don't know Zope 3 (Is that apossible answer of my questions?) > > Thasnks in advance > Regards > Thomas Adams ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MVC Approach
Asad Habib schrieb: Hi Thomas. If you plan to implement MVC, my advice would be to stick to Java technology - it's by far the best for implementing MVC - I mean literally the best! You may want to look at JSF or the Spring frameworkas alternatives to Struts. - Asad On Wed, 3 Aug 2005, Thomas Adams wrote: Hi all, I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one) and I want to know if there is something like a MVC approach available for Zope, i.e. Model-View-Controller approach, as it is for instance in Java with the Struts framework from Apache. To be more specific: - The Model consists of several python classes implementing business logic (the pendant to Enterprise Java Beans or simple Java Beans) - The Views producing the visual appearance of the business objects (in java or more specific in Struts these are the custom tag libraries) - The Controller, as a kind of glue between the two above, is controlling the work/process-flow (in java with servlets and in struts with actions classes (as a minimum) ) To transfer this appraoch to Zope, I'm not sure: Views: DTML-Document and/or DTML-Methods? Controller: PythonScripts? Models: I'm absolutely not sure, Pluggable brains? (the Zope book has a example but only as a handling of resultsets) So if has anybody a hint if there are some resources in the web, please post it. P.S: I don't know Zope 3 (Is that apossible answer of my questions?) Thasnks in advance Regards Thomas Adams Hi Asad , I was afraid of that ;-(. But let me spin around yet: - Views: --- Editing/Creating business objects: ZPT's/DTML's with appropriate properties managing view concerns, genaralized for a category of possible (already standardised) business/zope objects (gaining from aquisition rules) --- Displaying Results: Pluggable Brains as subclass of above ones - Model : Perhaps Zope Products ???, handling business logic , I'm not sure if that would work, perhaps a so called workaround with.interfacing and so on. - Controllers: really PhytonSricpts, I think so, or alternatively dtml-methods So, why I'm asking: I want to implement a standardized web application (at this time it's only a stupid choose and buy like any other so called e-commerce/shopping cart system , but my intention is to make it almost configurable in all three aspects (i know ... but William S. wrote # #And enterprises of great pith and moment #With this regard their currents turn awry, #And lose the name of action. - Soft you now! #The fair Ophelia! Nymph, in thy orisons #Be all my sins remember'd. ;-)) Is that totally wrong? or is that a so called acceptable (but not ideal) approach? Thanks in Advance Thomas Adams begin:vcard fn:Thomas Adams n:Adams;Thomas adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland email;internet:[EMAIL PROTECTED] tel;work:089 55 186 500 tel;home:089 54 03 28 96 version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MVC Approach
Hi all, I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one) and I want to know if there is something like a MVC approach available for Zope, i.e. Model-View-Controller approach, as it is for instance in Java with the Struts framework from Apache. To be more specific: - The Model consists of several python classes implementing business logic (the pendant to Enterprise Java Beans or simple Java Beans) - The Views producing the visual appearance of the business objects (in java or more specific in Struts these are the custom tag libraries) - The Controller, as a kind of glue between the two above, is controlling the work/process-flow (in java with servlets and in struts with actions classes (as a minimum) ) To transfer this appraoch to Zope, I'm not sure: Views: DTML-Document and/or DTML-Methods? Controller: PythonScripts? Models: I'm absolutely not sure, Pluggable brains? (the Zope book has a example but only as a handling of resultsets) So if has anybody a hint if there are some resources in the web, please post it. P.S: I don't know Zope 3 (Is that apossible answer of my questions?) Thasnks in advance Regards Thomas Adams begin:vcard fn:Thomas Adams n:Adams;Thomas adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland email;internet:[EMAIL PROTECTED] tel;work:089 55 186 500 tel;home:089 54 03 28 96 version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )