SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Lipstick on a Pig
                 Dynamically re-skinning a
                 legacy .NET portal with python

                 Matt Hamilton
                 matth@netsight.co.uk




30th June 2009    Europython 2009, Birmingham, UK   1
Introduction
 Dynamically re-skinning a .NET portal site
 Can't name the client
 Portal for teachers in the UK
 Aggregating content across legacy portal, Plone
  and Moodle




30th June 2009   Europython 2009, Birmingham, UK   2
Who Am I
 Technical Director of Netsight
      Web development firm in Bristol, UK




 10 years experience with Zope/Plone
 More of an integrator than core developer
      I get involved in all those sticky projects of merging
         Plone in with other systems in an enterprise

30th June 2009         Europython 2009, Birmingham, UK         3
Where Were We?




30th June 2009      Europython 2009, Birmingham, UK   4
Existing Portal (1.0)
 Five years old by November 2009
 User registrations: 46,681
 Course enrolments: 33,664
 Resource Bank views: 247,911




30th June 2009   Europython 2009, Birmingham, UK   5
Existing Portal (1.0)




30th June 2009   Europython 2009, Birmingham, UK   6
Problems with Current Portal
 Look-and-feel
      Not very compelling
 Usability
      Challenging in places
 A poor content management system
      Can't really edit general content, so use a separate FTP server
        and Dreamweaver
 Vendor lock-in
      Even small changes, very expensive


30th June 2009           Europython 2009, Birmingham, UK            7
The Future - Portal 2.0
 Usability, Design and Content Review April 2008
 Strategic Review August 2008
 Feasibility Studies Jan 2009
 Pilot Demonstrator (“Portal V1.5”) March 2009




30th June 2009   Europython 2009, Birmingham, UK   8
Design Review




30th June 2009   Europython 2009, Birmingham, UK   9
Architecture Review
 Portal 1.0 - Monolithic, tightly coupled, poor
  separation of skin




30th June 2009    Europython 2009, Birmingham, UK   10
Architecture Review
 Portal 2.0 - Extensible, loosely coupled, good
  separation of skin




30th June 2009    Europython 2009, Birmingham, UK   11
How Do We Get There?
                 Remember: We Can't Touch the Existing System!




30th June 2009              Europython 2009, Birmingham, UK      12
The Cunning Plan


                       Browser


                                                                Portal
                                                                1.0


            Existing   Skin 1.0
             Portal                 Module of functionality e.g. portfolio




30th June 2009            Europython 2009, Birmingham, UK                    13
Total Skin Graft!
                            Browser



                           web server
                                            New skin via xpath and xslt
            Skin 2.0                             transformation.        Portal
                       transformation proxy                             1.5
                                         Web server needs to handle SSL.

                                        Together they give us nice URLs.


                            Skin 1.0




30th June 2009                 Europython 2009, Birmingham, UK                   14
Deliverance
 Several Different Projects
      xdv
      Deliverance 0.3



                 To learn more on specifics of Deliverance go
                      to http://deliverance.openplans.org




30th June 2009              Europython 2009, Birmingham, UK     15
WSGI
 WSGI allows you to write small modules chained
  together in a 'pipeline'
 Many small filters combined together as you
  need
 Lots of existing components out there
 Very easy to write new ones




30th June 2009   Europython 2009, Birmingham, UK   16
WSGI Power - The Pipeline
[pipeline:portal]          [filter:theme.portal]
pipeline =                 use = egg:dv.xdvserver#xdv
    theme.portal           theme_uri = file://%(here)s/theme/theme.html
    ploneinterceptor       rules = %(here)s/rules/content.xml
    xslt                   [filter:ploneinterceptor]
    linkrewrite            use = egg:ns.ploneinterceptor#ploneinterceptor
    htmlcleaner
    source.portal          [filter:xslt]
                           use = egg:dv.xdvserver#xslt
                           xslt_file = %(here)s/rules/transform.xsl

                           [filter:linkrewrite]
                           use = egg:ns.linkrewrite#linkrewrite

                           [filter:htmlcleaner]
                           use = egg:ns.htmlcleaner#htmlcleaner

                           [app:source.portal]
                           use = egg:Paste#proxy
                           address = http://www.theexistingsite.org.uk/

30th June 2009         Europython 2009, Birmingham, UK                17
Link Rewriting
 Old URL:
      http://www.theclient.org.uk/WebPortal.aspx?
        page=1&module=DB920A53-01EA-4886-8878-
        F2CDF5FA8CFD&mode=101&IsNonNewsDB920A53_01EA
        _4886_8878_F2CDF5FA8CFD=True&newsIdDB920A53_
        01EA_4886_8878_F2CDF5FA8CFD=11208#10
   205 characters!
 New URL:
      http://www.theclient.org.uk/news/11208#10
      41 characters!



30th June 2009         Europython 2009, Birmingham, UK   18
HTML Cleanup
 LXML rules!
      from lxml.html.clean import Cleaner
        cleaner = Cleaner(...)
        # Pretty print the HTML
        dom = document_fromstring(body)
        body = etree.tostring(dom, pretty_print=True)
        # Clean the HTML
        body = cleaner.clean_html(body)




30th June 2009      Europython 2009, Birmingham, UK   19
Result
 Old
      70kb of HTML
      120 Validation errors, 61 warnings
 New
      40Kb of HTML
      27 Errors, 1 warning (mainly xhtml/html conflicts)
      No significant performance impact




30th June 2009         Europython 2009, Birmingham, UK     20
Putting all together
                                       Composite:main




                 pipeline:portal        pipeline:plone           pipeline:moodle


                 theme.content          theme.content                theme.content

                      xslt                navmerger                   navmerger

                   linkrewrite           plonecontent                moodlecontent

                  htmlcleaner            source.plone                source.moodle

                 source.portal

30th June 2009                     Europython 2009, Birmingham, UK                   21
End Result                                     New Style




                                                   Portal content
30th June 2009   Europython 2009, Birmingham, UK                    22
Complications
 Navigation
      One page, two content sources, how is the navigation
       built?
 Search
      Search needs to go across multiple systems
      Will soon be looking at Solr, Xapian, Google Mini
 .NET viewstate postback
      Massive hidden state variable, form wraps entire site!


30th June 2009        Europython 2009, Birmingham, UK      23
Questions?
                    matth@netsight.co.uk




30th June 2009   Europython 2009, Birmingham, UK   24
We are looking for Developers!

                     Come chat to me
                           or
                     drop an email to

                 careers@netsight.co.uk


30th June 2009        Europython 2009, Birmingham, UK   25

Mais conteúdo relacionado

Semelhante a Lipstick On a Pig (+Audio)

Acceleo MTL Code Generation
Acceleo MTL Code GenerationAcceleo MTL Code Generation
Acceleo MTL Code GenerationJonathan Musset
 
OpenNTF - UKLUG 2009 Edinburgh
OpenNTF - UKLUG 2009 EdinburghOpenNTF - UKLUG 2009 Edinburgh
OpenNTF - UKLUG 2009 EdinburghOpenNTF
 
Emerging Technologies and Business Processes – Anders Grangard & Adrian Mueller
Emerging Technologies and Business Processes – Anders Grangard & Adrian MuellerEmerging Technologies and Business Processes – Anders Grangard & Adrian Mueller
Emerging Technologies and Business Processes – Anders Grangard & Adrian MuellerDanny Gaethofs
 
Tg 4 Adrian Mueller Cen 18 06 2009
Tg 4 Adrian Mueller Cen 18 06 2009Tg 4 Adrian Mueller Cen 18 06 2009
Tg 4 Adrian Mueller Cen 18 06 2009Friso de Jong
 
Migrating Belgium's Largest Telecommunication Company to Magnolia
Migrating Belgium's Largest Telecommunication Company to Magnolia Migrating Belgium's Largest Telecommunication Company to Magnolia
Migrating Belgium's Largest Telecommunication Company to Magnolia Magnolia
 
OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010mfrancis
 
HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09mihaiionescu
 
EBEW2001 econstruct summary
EBEW2001 econstruct summaryEBEW2001 econstruct summary
EBEW2001 econstruct summaryReinout van Rees
 
Barcamp London 7 Tracksonamap Google App Engine
Barcamp London 7 Tracksonamap Google App EngineBarcamp London 7 Tracksonamap Google App Engine
Barcamp London 7 Tracksonamap Google App EngineJohan
 
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with KamaeliaTimeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaeliakamaelian
 
CS5229 09/10 Lecture 6: Simulation
CS5229 09/10 Lecture 6: SimulationCS5229 09/10 Lecture 6: Simulation
CS5229 09/10 Lecture 6: SimulationWei Tsang Ooi
 
Symfony - modern technology in practice, Webexpo Prague
Symfony - modern technology in practice, Webexpo PragueSymfony - modern technology in practice, Webexpo Prague
Symfony - modern technology in practice, Webexpo PraguePavel Campr
 
ETSI Hell's Kitchen Debate, Nice 2009
ETSI Hell's Kitchen Debate, Nice 2009ETSI Hell's Kitchen Debate, Nice 2009
ETSI Hell's Kitchen Debate, Nice 2009Paul Downey
 
Bugtracking on the Web 2.5
Bugtracking on the Web 2.5Bugtracking on the Web 2.5
Bugtracking on the Web 2.5olberger
 
Towards Collaborative Portable Web Spaces
Towards Collaborative Portable Web SpacesTowards Collaborative Portable Web Spaces
Towards Collaborative Portable Web Spacesstsire
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-finalChristian Posta
 

Semelhante a Lipstick On a Pig (+Audio) (20)

Spring Integration
Spring IntegrationSpring Integration
Spring Integration
 
Acceleo MTL Code Generation
Acceleo MTL Code GenerationAcceleo MTL Code Generation
Acceleo MTL Code Generation
 
OpenNTF - UKLUG 2009 Edinburgh
OpenNTF - UKLUG 2009 EdinburghOpenNTF - UKLUG 2009 Edinburgh
OpenNTF - UKLUG 2009 Edinburgh
 
Emerging Technologies and Business Processes – Anders Grangard & Adrian Mueller
Emerging Technologies and Business Processes – Anders Grangard & Adrian MuellerEmerging Technologies and Business Processes – Anders Grangard & Adrian Mueller
Emerging Technologies and Business Processes – Anders Grangard & Adrian Mueller
 
Tg 4 Adrian Mueller Cen 18 06 2009
Tg 4 Adrian Mueller Cen 18 06 2009Tg 4 Adrian Mueller Cen 18 06 2009
Tg 4 Adrian Mueller Cen 18 06 2009
 
Migrating Belgium's Largest Telecommunication Company to Magnolia
Migrating Belgium's Largest Telecommunication Company to Magnolia Migrating Belgium's Largest Telecommunication Company to Magnolia
Migrating Belgium's Largest Telecommunication Company to Magnolia
 
OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010
 
HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09
 
EBEW2001 econstruct summary
EBEW2001 econstruct summaryEBEW2001 econstruct summary
EBEW2001 econstruct summary
 
Barcamp London 7 Tracksonamap Google App Engine
Barcamp London 7 Tracksonamap Google App EngineBarcamp London 7 Tracksonamap Google App Engine
Barcamp London 7 Tracksonamap Google App Engine
 
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with KamaeliaTimeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
 
CS5229 09/10 Lecture 6: Simulation
CS5229 09/10 Lecture 6: SimulationCS5229 09/10 Lecture 6: Simulation
CS5229 09/10 Lecture 6: Simulation
 
Symfony - modern technology in practice, Webexpo Prague
Symfony - modern technology in practice, Webexpo PragueSymfony - modern technology in practice, Webexpo Prague
Symfony - modern technology in practice, Webexpo Prague
 
Fatwire Conference
Fatwire ConferenceFatwire Conference
Fatwire Conference
 
ETSI Hell's Kitchen Debate, Nice 2009
ETSI Hell's Kitchen Debate, Nice 2009ETSI Hell's Kitchen Debate, Nice 2009
ETSI Hell's Kitchen Debate, Nice 2009
 
Arneb
ArnebArneb
Arneb
 
Bugtracking on the Web 2.5
Bugtracking on the Web 2.5Bugtracking on the Web 2.5
Bugtracking on the Web 2.5
 
Towards Collaborative Portable Web Spaces
Towards Collaborative Portable Web SpacesTowards Collaborative Portable Web Spaces
Towards Collaborative Portable Web Spaces
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-final
 
Daley7 ppt 07
Daley7 ppt 07Daley7 ppt 07
Daley7 ppt 07
 

Mais de Matt Hamilton

Ceci n’est pas un canard - Machine Learning and Generative Adversarial Networks
Ceci n’est pas un canard - Machine Learning and Generative Adversarial NetworksCeci n’est pas un canard - Machine Learning and Generative Adversarial Networks
Ceci n’est pas un canard - Machine Learning and Generative Adversarial NetworksMatt Hamilton
 
Ceci N'est Pas Un Canard – and Other Machine Learning Stories
Ceci N'est Pas Un Canard – and Other Machine Learning StoriesCeci N'est Pas Un Canard – and Other Machine Learning Stories
Ceci N'est Pas Un Canard – and Other Machine Learning StoriesMatt Hamilton
 
Intro to Machine Learning and AI
Intro to Machine Learning and AIIntro to Machine Learning and AI
Intro to Machine Learning and AIMatt Hamilton
 
Adventures in Wonderland - A Plone Developer's Year in iOS
Adventures in Wonderland - A Plone Developer's Year in iOSAdventures in Wonderland - A Plone Developer's Year in iOS
Adventures in Wonderland - A Plone Developer's Year in iOSMatt Hamilton
 
A Journey Through Open Source
A Journey Through Open SourceA Journey Through Open Source
A Journey Through Open SourceMatt Hamilton
 
Plone Intranet talk at Plone Open Garden 2014, Sorrento
Plone Intranet talk at Plone Open Garden 2014, SorrentoPlone Intranet talk at Plone Open Garden 2014, Sorrento
Plone Intranet talk at Plone Open Garden 2014, SorrentoMatt Hamilton
 
Open Source, The Natural Fit for Content Management in the Enterprise
Open Source, The Natural Fit for Content Management in the EnterpriseOpen Source, The Natural Fit for Content Management in the Enterprise
Open Source, The Natural Fit for Content Management in the EnterpriseMatt Hamilton
 
Supercharge Your Career with Open Source
Supercharge Your Career with Open SourceSupercharge Your Career with Open Source
Supercharge Your Career with Open SourceMatt Hamilton
 
Plone and Sharepoint
Plone and SharepointPlone and Sharepoint
Plone and SharepointMatt Hamilton
 
How to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication SystemHow to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication SystemMatt Hamilton
 
Plone and Single-Sign On - Active Directory and the Holy Grail
Plone and Single-Sign On - Active Directory and the Holy GrailPlone and Single-Sign On - Active Directory and the Holy Grail
Plone and Single-Sign On - Active Directory and the Holy GrailMatt Hamilton
 
The Flexibility of Open Source - Plone in the Public Sector
The Flexibility of Open Source - Plone in the Public SectorThe Flexibility of Open Source - Plone in the Public Sector
The Flexibility of Open Source - Plone in the Public SectorMatt Hamilton
 
Lipstick on a Pig - European Plone Symposium 2009
Lipstick on a Pig - European Plone Symposium 2009Lipstick on a Pig - European Plone Symposium 2009
Lipstick on a Pig - European Plone Symposium 2009Matt Hamilton
 
Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...
Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...
Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...Matt Hamilton
 
NextGen Roadshow Bmex Case Study
NextGen Roadshow Bmex Case StudyNextGen Roadshow Bmex Case Study
NextGen Roadshow Bmex Case StudyMatt Hamilton
 
Open Source and Content Management (+audio)
Open Source and Content Management (+audio)Open Source and Content Management (+audio)
Open Source and Content Management (+audio)Matt Hamilton
 

Mais de Matt Hamilton (16)

Ceci n’est pas un canard - Machine Learning and Generative Adversarial Networks
Ceci n’est pas un canard - Machine Learning and Generative Adversarial NetworksCeci n’est pas un canard - Machine Learning and Generative Adversarial Networks
Ceci n’est pas un canard - Machine Learning and Generative Adversarial Networks
 
Ceci N'est Pas Un Canard – and Other Machine Learning Stories
Ceci N'est Pas Un Canard – and Other Machine Learning StoriesCeci N'est Pas Un Canard – and Other Machine Learning Stories
Ceci N'est Pas Un Canard – and Other Machine Learning Stories
 
Intro to Machine Learning and AI
Intro to Machine Learning and AIIntro to Machine Learning and AI
Intro to Machine Learning and AI
 
Adventures in Wonderland - A Plone Developer's Year in iOS
Adventures in Wonderland - A Plone Developer's Year in iOSAdventures in Wonderland - A Plone Developer's Year in iOS
Adventures in Wonderland - A Plone Developer's Year in iOS
 
A Journey Through Open Source
A Journey Through Open SourceA Journey Through Open Source
A Journey Through Open Source
 
Plone Intranet talk at Plone Open Garden 2014, Sorrento
Plone Intranet talk at Plone Open Garden 2014, SorrentoPlone Intranet talk at Plone Open Garden 2014, Sorrento
Plone Intranet talk at Plone Open Garden 2014, Sorrento
 
Open Source, The Natural Fit for Content Management in the Enterprise
Open Source, The Natural Fit for Content Management in the EnterpriseOpen Source, The Natural Fit for Content Management in the Enterprise
Open Source, The Natural Fit for Content Management in the Enterprise
 
Supercharge Your Career with Open Source
Supercharge Your Career with Open SourceSupercharge Your Career with Open Source
Supercharge Your Career with Open Source
 
Plone and Sharepoint
Plone and SharepointPlone and Sharepoint
Plone and Sharepoint
 
How to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication SystemHow to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication System
 
Plone and Single-Sign On - Active Directory and the Holy Grail
Plone and Single-Sign On - Active Directory and the Holy GrailPlone and Single-Sign On - Active Directory and the Holy Grail
Plone and Single-Sign On - Active Directory and the Holy Grail
 
The Flexibility of Open Source - Plone in the Public Sector
The Flexibility of Open Source - Plone in the Public SectorThe Flexibility of Open Source - Plone in the Public Sector
The Flexibility of Open Source - Plone in the Public Sector
 
Lipstick on a Pig - European Plone Symposium 2009
Lipstick on a Pig - European Plone Symposium 2009Lipstick on a Pig - European Plone Symposium 2009
Lipstick on a Pig - European Plone Symposium 2009
 
Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...
Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...
Kent Connects: Harnessing Open Source for Shared Services and Partnership Wor...
 
NextGen Roadshow Bmex Case Study
NextGen Roadshow Bmex Case StudyNextGen Roadshow Bmex Case Study
NextGen Roadshow Bmex Case Study
 
Open Source and Content Management (+audio)
Open Source and Content Management (+audio)Open Source and Content Management (+audio)
Open Source and Content Management (+audio)
 

Último

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Último (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

Lipstick On a Pig (+Audio)

  • 1. Lipstick on a Pig Dynamically re-skinning a legacy .NET portal with python Matt Hamilton matth@netsight.co.uk 30th June 2009 Europython 2009, Birmingham, UK 1
  • 2. Introduction Dynamically re-skinning a .NET portal site Can't name the client Portal for teachers in the UK Aggregating content across legacy portal, Plone and Moodle 30th June 2009 Europython 2009, Birmingham, UK 2
  • 3. Who Am I Technical Director of Netsight Web development firm in Bristol, UK 10 years experience with Zope/Plone More of an integrator than core developer I get involved in all those sticky projects of merging Plone in with other systems in an enterprise 30th June 2009 Europython 2009, Birmingham, UK 3
  • 4. Where Were We? 30th June 2009 Europython 2009, Birmingham, UK 4
  • 5. Existing Portal (1.0) Five years old by November 2009 User registrations: 46,681 Course enrolments: 33,664 Resource Bank views: 247,911 30th June 2009 Europython 2009, Birmingham, UK 5
  • 6. Existing Portal (1.0) 30th June 2009 Europython 2009, Birmingham, UK 6
  • 7. Problems with Current Portal Look-and-feel Not very compelling Usability Challenging in places A poor content management system Can't really edit general content, so use a separate FTP server and Dreamweaver Vendor lock-in Even small changes, very expensive 30th June 2009 Europython 2009, Birmingham, UK 7
  • 8. The Future - Portal 2.0 Usability, Design and Content Review April 2008 Strategic Review August 2008 Feasibility Studies Jan 2009 Pilot Demonstrator (“Portal V1.5”) March 2009 30th June 2009 Europython 2009, Birmingham, UK 8
  • 9. Design Review 30th June 2009 Europython 2009, Birmingham, UK 9
  • 10. Architecture Review Portal 1.0 - Monolithic, tightly coupled, poor separation of skin 30th June 2009 Europython 2009, Birmingham, UK 10
  • 11. Architecture Review Portal 2.0 - Extensible, loosely coupled, good separation of skin 30th June 2009 Europython 2009, Birmingham, UK 11
  • 12. How Do We Get There? Remember: We Can't Touch the Existing System! 30th June 2009 Europython 2009, Birmingham, UK 12
  • 13. The Cunning Plan Browser Portal 1.0 Existing Skin 1.0 Portal Module of functionality e.g. portfolio 30th June 2009 Europython 2009, Birmingham, UK 13
  • 14. Total Skin Graft! Browser web server New skin via xpath and xslt Skin 2.0 transformation. Portal transformation proxy 1.5 Web server needs to handle SSL. Together they give us nice URLs. Skin 1.0 30th June 2009 Europython 2009, Birmingham, UK 14
  • 15. Deliverance Several Different Projects xdv Deliverance 0.3 To learn more on specifics of Deliverance go to http://deliverance.openplans.org 30th June 2009 Europython 2009, Birmingham, UK 15
  • 16. WSGI WSGI allows you to write small modules chained together in a 'pipeline' Many small filters combined together as you need Lots of existing components out there Very easy to write new ones 30th June 2009 Europython 2009, Birmingham, UK 16
  • 17. WSGI Power - The Pipeline [pipeline:portal] [filter:theme.portal] pipeline = use = egg:dv.xdvserver#xdv theme.portal theme_uri = file://%(here)s/theme/theme.html ploneinterceptor rules = %(here)s/rules/content.xml xslt [filter:ploneinterceptor] linkrewrite use = egg:ns.ploneinterceptor#ploneinterceptor htmlcleaner source.portal [filter:xslt] use = egg:dv.xdvserver#xslt xslt_file = %(here)s/rules/transform.xsl [filter:linkrewrite] use = egg:ns.linkrewrite#linkrewrite [filter:htmlcleaner] use = egg:ns.htmlcleaner#htmlcleaner [app:source.portal] use = egg:Paste#proxy address = http://www.theexistingsite.org.uk/ 30th June 2009 Europython 2009, Birmingham, UK 17
  • 18. Link Rewriting Old URL: http://www.theclient.org.uk/WebPortal.aspx? page=1&module=DB920A53-01EA-4886-8878- F2CDF5FA8CFD&mode=101&IsNonNewsDB920A53_01EA _4886_8878_F2CDF5FA8CFD=True&newsIdDB920A53_ 01EA_4886_8878_F2CDF5FA8CFD=11208#10 205 characters! New URL: http://www.theclient.org.uk/news/11208#10 41 characters! 30th June 2009 Europython 2009, Birmingham, UK 18
  • 19. HTML Cleanup LXML rules! from lxml.html.clean import Cleaner cleaner = Cleaner(...) # Pretty print the HTML dom = document_fromstring(body) body = etree.tostring(dom, pretty_print=True) # Clean the HTML body = cleaner.clean_html(body) 30th June 2009 Europython 2009, Birmingham, UK 19
  • 20. Result Old 70kb of HTML 120 Validation errors, 61 warnings New 40Kb of HTML 27 Errors, 1 warning (mainly xhtml/html conflicts) No significant performance impact 30th June 2009 Europython 2009, Birmingham, UK 20
  • 21. Putting all together Composite:main pipeline:portal pipeline:plone pipeline:moodle theme.content theme.content theme.content xslt navmerger navmerger linkrewrite plonecontent moodlecontent htmlcleaner source.plone source.moodle source.portal 30th June 2009 Europython 2009, Birmingham, UK 21
  • 22. End Result New Style Portal content 30th June 2009 Europython 2009, Birmingham, UK 22
  • 23. Complications Navigation One page, two content sources, how is the navigation built? Search Search needs to go across multiple systems Will soon be looking at Solr, Xapian, Google Mini .NET viewstate postback Massive hidden state variable, form wraps entire site! 30th June 2009 Europython 2009, Birmingham, UK 23
  • 24. Questions? matth@netsight.co.uk 30th June 2009 Europython 2009, Birmingham, UK 24
  • 25. We are looking for Developers! Come chat to me or drop an email to careers@netsight.co.uk 30th June 2009 Europython 2009, Birmingham, UK 25