SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                   Tips for Migrating Apps to
                             Plone 3



Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                                                Questions?




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                        How Do We Get There?




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                                    Zope Won’t Start




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




    Deprecated Methods and Imports
                •     Products.CMFCore.CMFPermissions
                           Products.CMFCore.permissions
                •     Products.CMFPlone.utils.BrowserView
                           Products.Five.BrowserView
                •     toPortalTime finally gone
                •     toLocalizedTime now in the @@plone view


Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                                        Getting Current




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                      10.11.2007




                             Update your type info
                •     Remove Sharing Tab
                •     Remove Properties Tab
                •     Add Lock Awareness to the Edit Tab
                           condition_expr=quot;not:object/
                           @@plone_lock_info/
                           is_locked_for_current_user|python:Truequot;




Six Feet Up, Inc. • http://www.sixfeetup.com                         Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                        Life Changing Decisions




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                  10.11.2007




                Taking Advantage of Zope 3
                •     View Classes
                •     Create Utilities instead of Portal Tools
                •     Use MenuItems to add custom Actions
                •     Zope 3 Events
                           manage_afterAdd
                           manage_beforeDelete



Six Feet Up, Inc. • http://www.sixfeetup.com                     Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                     10.11.2007




                                                             ZCML




Six Feet Up, Inc. • http://www.sixfeetup.com                        Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                                   10.11.2007




                     <configure
                       xmlns=quot;http://namespaces.zope.org/zopequot;>

                         <subscriber
                           for=quot;Products.OER.interfaces.IOERItem
                                OFS.interfaces.IObjectWillBeRemovedEventquot;
                           handler=quot;.subscribers.deleteSubmissionsquot;/>

                         <subscriber
                           for=quot;Products.OER.interfaces.IOERTag
                                zope.app.event.interfaces.IObjectModifiedEventquot;
                           handler=quot;.subscribers.checkTagsquot;/>

                       <subscriber
                          for=quot;Products.OER.interfaces.IOERSubmission
                               OFS.interfaces.IObjectWillBeAddedEventquot;
                          handler=quot;.subscribers.changeStateHomeFolderquot;/>

                     </configure>



Six Feet Up, Inc. • http://www.sixfeetup.com                                      Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                                      10.11.2007




            def deleteSubmissions(self, event):
                quot;quot;quot;
                Delete the submissions attached to the object we just come from deleting
                quot;quot;quot;
                item = event.object

                  # we delete the tags/ratings/reviews/notes associated with this item
                  ps = getToolByName(self, 'portal_submissions')
                  pc = getToolByName(self, 'portal_catalog')
                                        targets = ps.getTargets(item)
                  ...




Six Feet Up, Inc. • http://www.sixfeetup.com                                         Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                 10.11.2007




                                               GenericSetup
                •     Replaces Customization Policies
                •     Replaces the old Install.py for QuickInstaller
                •     Upgrade Steps
                           Versatile One Time Steps




Six Feet Up, Inc. • http://www.sixfeetup.com                    Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                                     10.11.2007




          <configure
              xmlns=quot;http://namespaces.zope.org/zopequot;
              xmlns:genericsetup=quot;http://namespaces.zope.org/genericsetupquot;
              i18n_domain=quot;plonequot;>

             <genericsetup:registerProfile
                 name=quot;defaultquot;
                 title=quot;AdvancedDocument Profilequot;
                 directory=quot;profiles/defaultquot;
                 description=quot;Extension profile for the AdvancedDocument Productquot;
                 provides=quot;Products.GenericSetup.interfaces.EXTENSIONquot;
                 />

            <genericsetup:upgradeStep
                title=quot;Update Catalogquot;
                description=quot;Update the Catalogquot;
                source=quot;0.4quot;
                destination=quot;0.5quot;
                handler=quot;Products.AdvancedDocument.upgrades.updatecatalog.updateCatalogquot;
                sortkey=quot;1quot;
                profile=quot;Products.AdvancedDocument:defaultquot;
                />
          </configure>

Six Feet Up, Inc. • http://www.sixfeetup.com                                        Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                            Setting up Versioning
                •     GenericSetup export/import broken
                •     Setup via a setup handler
                •     Register via your product




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                                  10.11.2007




     <?xml version=quot;1.0quot;?>
     <import-steps>

      <import-step id=quot;versioningsetupquot; version=quot;20070828-01quot;
           handler=quot;Products.AdvancedDocument.exportimport.versioningsetup.versioningSetupquot;
           title=quot;Versioning Setupquot;>
           <dependency step=quot;contentquot;/>
           Add versioning on our selected content types
      </import-step>

     </import-steps>




Six Feet Up, Inc. • http://www.sixfeetup.com                                     Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                                  10.11.2007




  def versioningSetup(context):
      quot;quot;quot;Setup portal_factory
      quot;quot;quot;
      site = context.getSite()

        portal_repository = getToolByName(site, 'portal_repository')
        portal_diff = getToolByName(site, 'portal_diff')
        versionable_types = list(portal_repository.getVersionableContentTypes())
        type_ids = ['AdvancedDocument', ]
        for type_id in type_ids:
            if type_id not in versionable_types:
                versionable_types.append(type_id)
                for policy_id in DEFAULT_POLICIES:
                    portal_repository.addPolicyForContentType(type_id, policy_id)
            diff_res = portal_diff.getDiffForPortalType(type_id)
            if not diff_res:
                portal_diff.manage_addDiffField(type_id, 'any', 'Compound Diff for AT types')
                   portal_repository.setVersionableContentTypes(versionable_types)




Six Feet Up, Inc. • http://www.sixfeetup.com                                     Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                10.11.2007




                                               People Skills




Six Feet Up, Inc. • http://www.sixfeetup.com                   Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                                          GRUF and PAS
                •     PAS added as default in 2.5
                •     GRUF completely removed in 3.0
                •     User and Group Searching Done via PAS
                      directly




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                    10.11.2007




                                                 New Roles
                •     Reader
                •     Editor
                •     Contributor
                           Add your custom add permissions to this role




Six Feet Up, Inc. • http://www.sixfeetup.com                       Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                   10.11.2007




                                                      Portlets
                •     Viewlets
                •     Viewlet Manager
                •     Classic Portlet
                           Performance Issues
                           left and right slots properties gone




Six Feet Up, Inc. • http://www.sixfeetup.com                      Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker                                      10.11.2007




                       <configure xmlns=quot;http://namespaces.zope.org/zopequot;
                                  xmlns:plone=quot;http://namespaces.plone.org/plonequot;>

                          <plone:portlet
                            name=quot;portlets.Adsquot;
                            interface=quot;.portlets.ads.IAdPortletquot;
                            assignment=quot;.portlets.ads.Assignmentquot;
                            renderer=quot;.portlets.ads.Rendererquot;
                            addview=quot;.portlets.ads.AddFormquot;
                            editview=quot;.portlets.ads.EditFormquot;
                            />

                       </configure>




Six Feet Up, Inc. • http://www.sixfeetup.com                                         Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                              Leverage Other New
                                   Features



Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                Additional Markup and Field
                          Support
                •     textile
                •     markdown
                •     wiki style linking




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                        Don’t Forget the Basics




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                         Catalog Enhancements
                •     ExtendedPathIndex
                •     New Date Indexes




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                        Leverage the Registries
                •     CSS
                •     Javascript




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest
Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker              10.11.2007




                                                Questions?




Six Feet Up, Inc. • http://www.sixfeetup.com                 Silicon Valley • Midwest

Mais conteúdo relacionado

Mais de Calvin Hendryx-Parker

Mais de Calvin Hendryx-Parker (7)

Enterprise search in plone using solr
Enterprise search in plone using solrEnterprise search in plone using solr
Enterprise search in plone using solr
 
2010 py ohio supervisor talk
2010 py ohio supervisor talk2010 py ohio supervisor talk
2010 py ohio supervisor talk
 
Enterprise search in Plone using Solr
Enterprise search in Plone using SolrEnterprise search in Plone using Solr
Enterprise search in Plone using Solr
 
Social Networking Tools Session Three
Social Networking Tools Session ThreeSocial Networking Tools Session Three
Social Networking Tools Session Three
 
Social Networking Tools Session One
Social Networking Tools   Session OneSocial Networking Tools   Session One
Social Networking Tools Session One
 
Social Networking Tools Session Two
Social Networking Tools   Session TwoSocial Networking Tools   Session Two
Social Networking Tools Session Two
 
Plone's Anatomy
Plone's AnatomyPlone's Anatomy
Plone's Anatomy
 

Último

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Último (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Tips For Migrating Apps To Plone 3

  • 1. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Tips for Migrating Apps to Plone 3 Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 2. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Questions? Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 3. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 How Do We Get There? Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 4. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Zope Won’t Start Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 5. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Deprecated Methods and Imports • Products.CMFCore.CMFPermissions Products.CMFCore.permissions • Products.CMFPlone.utils.BrowserView Products.Five.BrowserView • toPortalTime finally gone • toLocalizedTime now in the @@plone view Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 6. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Getting Current Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 7. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Update your type info • Remove Sharing Tab • Remove Properties Tab • Add Lock Awareness to the Edit Tab condition_expr=quot;not:object/ @@plone_lock_info/ is_locked_for_current_user|python:Truequot; Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 8. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Life Changing Decisions Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 9. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Taking Advantage of Zope 3 • View Classes • Create Utilities instead of Portal Tools • Use MenuItems to add custom Actions • Zope 3 Events manage_afterAdd manage_beforeDelete Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 10. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 ZCML Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 11. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 <configure xmlns=quot;http://namespaces.zope.org/zopequot;> <subscriber for=quot;Products.OER.interfaces.IOERItem OFS.interfaces.IObjectWillBeRemovedEventquot; handler=quot;.subscribers.deleteSubmissionsquot;/> <subscriber for=quot;Products.OER.interfaces.IOERTag zope.app.event.interfaces.IObjectModifiedEventquot; handler=quot;.subscribers.checkTagsquot;/> <subscriber for=quot;Products.OER.interfaces.IOERSubmission OFS.interfaces.IObjectWillBeAddedEventquot; handler=quot;.subscribers.changeStateHomeFolderquot;/> </configure> Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 12. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 def deleteSubmissions(self, event): quot;quot;quot; Delete the submissions attached to the object we just come from deleting quot;quot;quot; item = event.object # we delete the tags/ratings/reviews/notes associated with this item ps = getToolByName(self, 'portal_submissions') pc = getToolByName(self, 'portal_catalog') targets = ps.getTargets(item) ... Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 13. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 GenericSetup • Replaces Customization Policies • Replaces the old Install.py for QuickInstaller • Upgrade Steps Versatile One Time Steps Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 14. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 <configure xmlns=quot;http://namespaces.zope.org/zopequot; xmlns:genericsetup=quot;http://namespaces.zope.org/genericsetupquot; i18n_domain=quot;plonequot;> <genericsetup:registerProfile name=quot;defaultquot; title=quot;AdvancedDocument Profilequot; directory=quot;profiles/defaultquot; description=quot;Extension profile for the AdvancedDocument Productquot; provides=quot;Products.GenericSetup.interfaces.EXTENSIONquot; /> <genericsetup:upgradeStep title=quot;Update Catalogquot; description=quot;Update the Catalogquot; source=quot;0.4quot; destination=quot;0.5quot; handler=quot;Products.AdvancedDocument.upgrades.updatecatalog.updateCatalogquot; sortkey=quot;1quot; profile=quot;Products.AdvancedDocument:defaultquot; /> </configure> Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 15. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 16. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Setting up Versioning • GenericSetup export/import broken • Setup via a setup handler • Register via your product Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 17. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 <?xml version=quot;1.0quot;?> <import-steps> <import-step id=quot;versioningsetupquot; version=quot;20070828-01quot; handler=quot;Products.AdvancedDocument.exportimport.versioningsetup.versioningSetupquot; title=quot;Versioning Setupquot;> <dependency step=quot;contentquot;/> Add versioning on our selected content types </import-step> </import-steps> Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 18. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 def versioningSetup(context): quot;quot;quot;Setup portal_factory quot;quot;quot; site = context.getSite() portal_repository = getToolByName(site, 'portal_repository') portal_diff = getToolByName(site, 'portal_diff') versionable_types = list(portal_repository.getVersionableContentTypes()) type_ids = ['AdvancedDocument', ] for type_id in type_ids: if type_id not in versionable_types: versionable_types.append(type_id) for policy_id in DEFAULT_POLICIES: portal_repository.addPolicyForContentType(type_id, policy_id) diff_res = portal_diff.getDiffForPortalType(type_id) if not diff_res: portal_diff.manage_addDiffField(type_id, 'any', 'Compound Diff for AT types') portal_repository.setVersionableContentTypes(versionable_types) Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 19. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 People Skills Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 20. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 GRUF and PAS • PAS added as default in 2.5 • GRUF completely removed in 3.0 • User and Group Searching Done via PAS directly Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 21. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 New Roles • Reader • Editor • Contributor Add your custom add permissions to this role Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 22. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Portlets • Viewlets • Viewlet Manager • Classic Portlet Performance Issues left and right slots properties gone Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 23. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 <configure xmlns=quot;http://namespaces.zope.org/zopequot; xmlns:plone=quot;http://namespaces.plone.org/plonequot;> <plone:portlet name=quot;portlets.Adsquot; interface=quot;.portlets.ads.IAdPortletquot; assignment=quot;.portlets.ads.Assignmentquot; renderer=quot;.portlets.ads.Rendererquot; addview=quot;.portlets.ads.AddFormquot; editview=quot;.portlets.ads.EditFormquot; /> </configure> Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 24. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Leverage Other New Features Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 25. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Additional Markup and Field Support • textile • markdown • wiki style linking Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 26. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Don’t Forget the Basics Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 27. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Catalog Enhancements • ExtendedPathIndex • New Date Indexes Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 28. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Leverage the Registries • CSS • Javascript Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest
  • 29. Tips for Migrating Apps to Plone 3 - Calvin Hendryx-Parker 10.11.2007 Questions? Six Feet Up, Inc. • http://www.sixfeetup.com Silicon Valley • Midwest