SlideShare a Scribd company logo
1 of 118
Download to read offline
Connecting web and desktop: WebDAV
              ConFoo 2011


     Tobias Schlitt <toby@qafoo.com>


             March 10, 2011
Connecting web and desktop: WebDAV   2 / 49


    Outline


    Introduction

    HTTP & WebDAV

    Development challenges

    Zeta Webdav component
Connecting web and desktop: WebDAV     3 / 49


    About me



        Degree in computer sience
        More than 10 years of
        professional PHP
        Open source enthusiast
              Apache Zeta Components
              Arbit
              PHPUnit
              ...
Connecting web and desktop: WebDAV     3 / 49


    About me



        Degree in computer sience
        More than 10 years of
        professional PHP
        Open source enthusiast
              Apache Zeta Components
              Arbit
              PHPUnit
              ...
Connecting web and desktop: WebDAV     3 / 49


    About me



        Degree in computer sience
        More than 10 years of
        professional PHP
        Open source enthusiast
              Apache Zeta Components
              Arbit
              PHPUnit
              ...
Connecting web and desktop: WebDAV                                      3 / 49


    About me



        Degree in computer sience
                                         Co-Founder of
        More than 10 years of            Qafoo GmbH
        professional PHP               http://qafoo.com
        Open source enthusiast
              Apache Zeta Components     Qafoo
                                         passion for software quality

              Arbit
              PHPUnit
              ...
Connecting web and desktop: WebDAV                                          3 / 49


    About me



        Degree in computer sience
                                            Co-Founder of
        More than 10 years of               Qafoo GmbH
        professional PHP                  http://qafoo.com
        Open source enthusiast
              Apache Zeta Components         Qafoo
                                             passion for software quality

              Arbit
                                       We help people to produce
              PHPUnit
              ...
                                        high quality PHP code.
Connecting web and desktop: WebDAV   4 / 49


    Outline


    Introduction

    HTTP & WebDAV

    Development challenges

    Zeta Webdav component
Connecting web and desktop: WebDAV                5 / 49


    The concept


                             GET /some/resource
Connecting web and desktop: WebDAV                      5 / 49


    The concept


                            POST /some/resource
                                                  ???
Connecting web and desktop: WebDAV                      5 / 49


    The concept


                             PUT /some/resource
                                                  ???
Connecting web and desktop: WebDAV                    5 / 49


    The concept


                           Please file that document
                            under /some/resource




                                     Done.
Connecting web and desktop: WebDAV                     5 / 49


    The concept


                            Please create a new col-
                             lection of documents
                               under /some/more




                                     Done.
Connecting web and desktop: WebDAV            6 / 49


    HTTP

         Network protocol driving the web
         Current version: 1.1
         RFC 2616 (June 1999)
         http://tools.ietf.org/html/rfc2616

         Inventor: Sir Tim Berners-Lee
         Client / server based
         Stateless communication
         Defines
               Request / response
               Headers / body
               Formats / actions
Connecting web and desktop: WebDAV            6 / 49


    HTTP

         Network protocol driving the web
         Current version: 1.1
         RFC 2616 (June 1999)
         http://tools.ietf.org/html/rfc2616

         Inventor: Sir Tim Berners-Lee
         Client / server based
         Stateless communication
         Defines
               Request / response
               Headers / body
               Formats / actions
Connecting web and desktop: WebDAV            6 / 49


    HTTP

         Network protocol driving the web
         Current version: 1.1
         RFC 2616 (June 1999)
         http://tools.ietf.org/html/rfc2616

         Inventor: Sir Tim Berners-Lee
         Client / server based
         Stateless communication
         Defines
               Request / response
               Headers / body
               Formats / actions
Connecting web and desktop: WebDAV            6 / 49


    HTTP

         Network protocol driving the web
         Current version: 1.1
         RFC 2616 (June 1999)
         http://tools.ietf.org/html/rfc2616

         Inventor: Sir Tim Berners-Lee
         Client / server based
         Stateless communication
         Defines
               Request / response
               Headers / body
               Formats / actions
Connecting web and desktop: WebDAV                           7 / 49


    WebDAV

         HTTP Extensions for Distributed Authoring
               RFC 2518 (February 1999)
               http://tools.ietf.org/html/rfc2518
         HTTP Extensions for Web Distributed Authoring and
         Versioning
               RFC 4918 (June 2007)
               http://tools.ietf.org/html/rfc4918
         IETF Standard
         Extension to HTTP
         Allows distributed editing
Connecting web and desktop: WebDAV                           7 / 49


    WebDAV

         HTTP Extensions for Distributed Authoring
               RFC 2518 (February 1999)
               http://tools.ietf.org/html/rfc2518
         HTTP Extensions for Web Distributed Authoring and
         Versioning
               RFC 4918 (June 2007)
               http://tools.ietf.org/html/rfc4918
         IETF Standard
         Extension to HTTP
         Allows distributed editing
Connecting web and desktop: WebDAV                           7 / 49


    WebDAV

         HTTP Extensions for Distributed Authoring
               RFC 2518 (February 1999)
               http://tools.ietf.org/html/rfc2518
         HTTP Extensions for Web Distributed Authoring and
         Versioning
               RFC 4918 (June 2007)
               http://tools.ietf.org/html/rfc4918
         IETF Standard
         Extension to HTTP
         Allows distributed editing
Connecting web and desktop: WebDAV                           7 / 49


    WebDAV

         HTTP Extensions for Distributed Authoring
               RFC 2518 (February 1999)
               http://tools.ietf.org/html/rfc2518
         HTTP Extensions for Web Distributed Authoring and
         Versioning
               RFC 4918 (June 2007)
               http://tools.ietf.org/html/rfc4918
         IETF Standard
         Extension to HTTP
         Allows distributed editing
Connecting web and desktop: WebDAV                             7 / 49


    WebDAV

         HTTP Extensions for Distributed Authoring
               RFC 2518 (February 1999)
               http://tools.ietf.org/html/rfc2518
         HTTP Extensions for Web Distributed Authoring and
         Versioning
               RFC 4918 (June 2007)
               http://tools.ietf.org/html/rfc4918
         IETF Standard
         Extension to HTTP
         Allows distributed editing
        WebDAV allows your users to edit web content easily.
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                  8 / 49


    Request methods

         HTTP                        WebDAV
               GET                      MKCOL
               POST                     COPY
               HEAD                     MOVE
               PUT                      PROPFIND
               DELETE                   PROPPATCH
               OPTIONS                  LOCK
               TRACE                    UNLOCK
               CONNECT
Connecting web and desktop: WebDAV                              8 / 49


    Request methods

         HTTP                                WebDAV
               GET                                  MKCOL
               POST                                 COPY
               HEAD                                 MOVE
               PUT                                  PROPFIND
               DELETE                               PROPPATCH
               OPTIONS                              LOCK
               TRACE                                UNLOCK
               CONNECT



                            Significant for WebDAV
Connecting web and desktop: WebDAV                     9 / 49


    Request headers


         HTTP                         WebDAV
               Accept[-*]                Depth
               Authorization             Destination
               If-[None-]Match           If
               If-[Un]Modified-Since      Overwrite
               User-Agent                Timeout
               ...
Connecting web and desktop: WebDAV                     9 / 49


    Request headers


         HTTP                         WebDAV
               Accept[-*]                Depth
               Authorization             Destination
               If-[None-]Match           If
               If-[Un]Modified-Since      Overwrite
               User-Agent                Timeout
               ...
Connecting web and desktop: WebDAV                                9 / 49


    Request headers


         HTTP                                WebDAV
               Accept[-*]                           Depth
               Authorization                        Destination
               If-[None-]Match                      If
               If-[Un]Modified-Since                 Overwrite
               User-Agent                           Timeout
               ...



                            Significant for WebDAV
Connecting web and desktop: WebDAV                   10 / 49


    Response headers

         HTTP                        WebDAV
               Accept-Ranges            DAV
               Content-Length           Lock-Token
               Content-Type             Timeout
               ETag
               Location
               Retry-After
               Server
               WWW-Authenticate
               ...
Connecting web and desktop: WebDAV                   10 / 49


    Response headers

         HTTP                        WebDAV
               Accept-Ranges            DAV
               Content-Length           Lock-Token
               Content-Type             Timeout
               ETag
               Location
               Retry-After
               Server
               WWW-Authenticate
               ...
Connecting web and desktop: WebDAV                               10 / 49


    Response headers

         HTTP                                WebDAV
               Accept-Ranges                        DAV
               Content-Length                       Lock-Token
               Content-Type                         Timeout
               ETag
               Location
               Retry-After
               Server
               WWW-Authenticate
               ...



                            Significant for WebDAV
Connecting web and desktop: WebDAV                                     11 / 49


    Request / response bodies




         HTTP
               Request body mostly not significant
               Only PUT method needs body (to be stored)
               Response body usually content to deliver (unspecified)
               Error responses may contain arbitrary content
Connecting web and desktop: WebDAV                                    11 / 49


    Request / response bodies

         WebDAV
               Bodies are significant
               Many methods require XML bodies

       Request                            Response
            PROPFIND                             PROPFIND
            PROPPATCH                            PROPPATCH
            COPY (optional)                      LOCK
            MOVE (optional)                      Potentially others
            LOCK                                 (multi-status)
Connecting web and desktop: WebDAV                                    11 / 49


    Request / response bodies

         WebDAV
               Bodies are significant
               Many methods require XML bodies

       Request                            Response
            PROPFIND                             PROPFIND
            PROPPATCH                            PROPPATCH
            COPY (optional)                      LOCK
            MOVE (optional)                      Potentially others
            LOCK                                 (multi-status)
Connecting web and desktop: WebDAV                                    11 / 49


    Request / response bodies

         WebDAV
               Bodies are significant
               Many methods require XML bodies

       Request                            Response
            PROPFIND                             PROPFIND
            PROPPATCH                            PROPPATCH
            COPY (optional)                      LOCK
            MOVE (optional)                      Potentially others
            LOCK                                 (multi-status)
Connecting web and desktop: WebDAV                              12 / 49


    Properties


         Concept introduced by WebDAV
         Store meta information about content
         Usually not directly visible to the user


         Live properties                Dead properties
               creationdate                  Arbitrary data
               displayname                   Custom namespace
               get*                          XML favored
               lockdiscovery
               ...
Connecting web and desktop: WebDAV                              12 / 49


    Properties


         Concept introduced by WebDAV
         Store meta information about content
         Usually not directly visible to the user


         Live properties                Dead properties
               creationdate                  Arbitrary data
               displayname                   Custom namespace
               get*                          XML favored
               lockdiscovery
               ...
Connecting web and desktop: WebDAV                              12 / 49


    Properties


         Concept introduced by WebDAV
         Store meta information about content
         Usually not directly visible to the user


         Live properties                Dead properties
               creationdate                  Arbitrary data
               displayname                   Custom namespace
               get*                          XML favored
               lockdiscovery
               ...
Connecting web and desktop: WebDAV   13 / 49


    Outline


    Introduction

    HTTP & WebDAV

    Development challenges

    Zeta Webdav component
Connecting web and desktop: WebDAV             14 / 49


    Development challenges


       Server development in general
       WebDAV RFCs are a BBOM
            Unstructured
            Ambiguous
            Design fails
       Misbehaving clients
            Ignore the specification
            Different interpretations of RFCs
            Proprietary BS
       Exchangeable back ends
Connecting web and desktop: WebDAV   15 / 49


    Outline



    Development challenges
       RFC problems
       Client problems
       Back end flexibility
Connecting web and desktop: WebDAV                                         16 / 49


    COPY / MOVE methods

         Errors on COPY
         “[...] if an error occurs while copying an internal collection,
         the server MUST NOT copy any resources identified by
         members of this collection (i.e., the server must skip this
         subtree) [...]” [?]
         MOVE
         “[...] is the logical equivalent of a copy (COPY), followed by
         consistency maintenance processing, followed by a delete of
         the source,[...]” [?]
         MOVE errors
         “[...] after detecting the error, the move operation SHOULD
         try to finish as much of the original move as possible [...]” [?]
Connecting web and desktop: WebDAV                                         16 / 49


    COPY / MOVE methods

         Errors on COPY
         “[...] if an error occurs while copying an internal collection,
         the server MUST NOT copy any resources identified by
         members of this collection (i.e., the server must skip this
         subtree) [...]” [?]
         MOVE
         “[...] is the logical equivalent of a copy (COPY), followed by
         consistency maintenance processing, followed by a delete of
         the source,[...]” [?]
         MOVE errors
         “[...] after detecting the error, the move operation SHOULD
         try to finish as much of the original move as possible [...]” [?]
Connecting web and desktop: WebDAV                                         16 / 49


    COPY / MOVE methods

         Errors on COPY
         “[...] if an error occurs while copying an internal collection,
         the server MUST NOT copy any resources identified by
         members of this collection (i.e., the server must skip this
         subtree) [...]” [?]
         MOVE
         “[...] is the logical equivalent of a copy (COPY), followed by
         consistency maintenance processing, followed by a delete of
         the source,[...]” [?]
         MOVE errors
         “[...] after detecting the error, the move operation SHOULD
         try to finish as much of the original move as possible [...]” [?]
Connecting web and desktop: WebDAV                                                                17 / 49


     The If header

         Makes operations conditional.
         Apply operation only if
                all conditions are met
                no condition is met

 1        No−tag − l i s t = L i s t
 2        Tagged− l i s t = R e s o u r c e 1∗ L i s t
 3        Resource             = Coded−URL
 4        List                 = ”(”
 5                1 ∗ ( [ ” Not ” ] ( S t a t e −t o k e n | ” [ ” e n t i t y −t a g ” ] ” ) )
 6        ”)”
 7        S t a t e −t o k e n = Coded−URL
 8        Coded−URL            = ”<” a b s o l u t e U R I ”>”
Connecting web and desktop: WebDAV                                        18 / 49


     The If header



         Can contain
               lock tokens
               entity tags

 1       I f : (< l o c k t o k e n : a−w r i t e −l o c k −t o k e n >
 2             [ ” I am an ETag” ] ) ( [ ” I am a n o t h e r ETag” ] )
Connecting web and desktop: WebDAV                                                               19 / 49


     The If header


         Conditions can apply to
                single resources
                sets of resources
                all affected resources

 1       <h t t p : // e x a m p l e . com/ r e s o u r c e 1 >
 2              (< l o c k t o k e n : a−w r i t e −l o c k −t o k e n > [W/ ”A weak ETag” ] )
 3              ( Not [ ” s t r o n g ETag” ] )

         Required own parser implementation
         Parser is about 150 LOC
Connecting web and desktop: WebDAV                                   20 / 49


    Locking

         2 different types of locks
               Exclusive
               Shared
         Lock conditions must be validated before anything else
         Timeout refresh on every lock use (successful or not)
         (Fixed in RCF 4918)

         Not specified how to associate principles with lock tokens
         Lock-Null-Resources
         (Partly fixed in RFC 4918)
               Do not behave like real resources
               Must vanish when the lock is released
               A collection can be created on them
Connecting web and desktop: WebDAV                                   20 / 49


    Locking

         2 different types of locks
               Exclusive
               Shared
         Lock conditions must be validated before anything else
         Timeout refresh on every lock use (successful or not)
         (Fixed in RCF 4918)

         Not specified how to associate principles with lock tokens
         Lock-Null-Resources
         (Partly fixed in RFC 4918)
               Do not behave like real resources
               Must vanish when the lock is released
               A collection can be created on them
Connecting web and desktop: WebDAV                                   20 / 49


    Locking

         2 different types of locks
               Exclusive
               Shared
         Lock conditions must be validated before anything else
         Timeout refresh on every lock use (successful or not)
         (Fixed in RCF 4918)

         Not specified how to associate principles with lock tokens
         Lock-Null-Resources
         (Partly fixed in RFC 4918)
               Do not behave like real resources
               Must vanish when the lock is released
               A collection can be created on them
Connecting web and desktop: WebDAV                                   20 / 49


    Locking

         2 different types of locks
               Exclusive
               Shared
         Lock conditions must be validated before anything else
         Timeout refresh on every lock use (successful or not)
         (Fixed in RCF 4918)

         Not specified how to associate principles with lock tokens
         Lock-Null-Resources
         (Partly fixed in RFC 4918)
               Do not behave like real resources
               Must vanish when the lock is released
               A collection can be created on them
Connecting web and desktop: WebDAV                                   20 / 49


    Locking

         2 different types of locks
               Exclusive
               Shared
         Lock conditions must be validated before anything else
         Timeout refresh on every lock use (successful or not)
         (Fixed in RCF 4918)

         Not specified how to associate principles with lock tokens
         Lock-Null-Resources
         (Partly fixed in RFC 4918)
               Do not behave like real resources
               Must vanish when the lock is released
               A collection can be created on them
Connecting web and desktop: WebDAV   21 / 49


    Outline



    Development challenges
       RFC problems
       Client problems
       Back end flexibility
Connecting web and desktop: WebDAV                                 22 / 49


    Konqueror / Nautilus



         Konqueror (KDE)
               Does not decode URLs properly
               Requires Apache like error messages for 404
         Nautilus (Gnome)
               Cannot cope with charset="..." info in MIME types
Connecting web and desktop: WebDAV                                 22 / 49


    Konqueror / Nautilus



         Konqueror (KDE)
               Does not decode URLs properly
               Requires Apache like error messages for 404
         Nautilus (Gnome)
               Cannot cope with charset="..." info in MIME types
Connecting web and desktop: WebDAV                                     23 / 49


    Windows / InternetExplorer



         At least 3 different WebDAV user agents in Windows
               Loaded depending on how you initialize connection
               Transparently switched occasionally
         Requires custom header MS-Author-Via on every response
         Requires custom namespaces set on live properties
               Requires special namespace shortcut to be used (sic!)
               Requires different shortcuts for DAV: namespace
Connecting web and desktop: WebDAV                                     23 / 49


    Windows / InternetExplorer



         At least 3 different WebDAV user agents in Windows
               Loaded depending on how you initialize connection
               Transparently switched occasionally
         Requires custom header MS-Author-Via on every response
         Requires custom namespaces set on live properties
               Requires special namespace shortcut to be used (sic!)
               Requires different shortcuts for DAV: namespace
Connecting web and desktop: WebDAV                                     23 / 49


    Windows / InternetExplorer



         At least 3 different WebDAV user agents in Windows
               Loaded depending on how you initialize connection
               Transparently switched occasionally
         Requires custom header MS-Author-Via on every response
         Requires custom namespaces set on live properties
               Requires special namespace shortcut to be used (sic!)
               Requires different shortcuts for DAV: namespace
Connecting web and desktop: WebDAV                                24 / 49


    Windows / InternetExplorer II




         Cannot cope with non-significant white spaces in XML bodies
         Requires newline at the end of every XML body
         Occasionally sends invalid PROPFIND requests
Connecting web and desktop: WebDAV                                24 / 49


    Windows / InternetExplorer II




         Cannot cope with non-significant white spaces in XML bodies
         Requires newline at the end of every XML body
         Occasionally sends invalid PROPFIND requests
Connecting web and desktop: WebDAV                                24 / 49


    Windows / InternetExplorer II




         Cannot cope with non-significant white spaces in XML bodies
         Requires newline at the end of every XML body
         Occasionally sends invalid PROPFIND requests
Connecting web and desktop: WebDAV   25 / 49


    Outline



    Development challenges
       RFC problems
       Client problems
       Back end flexibility
Connecting web and desktop: WebDAV                    26 / 49


    Back end flexibility


         Exchangeable back end
               File system
               Memory (testing)
               SQL Database?
               Subversion?
         Independent of client issues
         Protocol enhancements back end independent
         Easy implementation
Connecting web and desktop: WebDAV                    26 / 49


    Back end flexibility


         Exchangeable back end
               File system
               Memory (testing)
               SQL Database?
               Subversion?
         Independent of client issues
         Protocol enhancements back end independent
         Easy implementation
Connecting web and desktop: WebDAV                    26 / 49


    Back end flexibility


         Exchangeable back end
               File system
               Memory (testing)
               SQL Database?
               Subversion?
         Independent of client issues
         Protocol enhancements back end independent
         Easy implementation
Connecting web and desktop: WebDAV                    26 / 49


    Back end flexibility


         Exchangeable back end
               File system
               Memory (testing)
               SQL Database?
               Subversion?
         Independent of client issues
         Protocol enhancements back end independent
         Easy implementation
Connecting web and desktop: WebDAV   27 / 49


    Outline


    Introduction

    HTTP & WebDAV

    Development challenges

    Zeta Webdav component
Connecting web and desktop: WebDAV   28 / 49


    Outline



    Zeta Webdav component
       Background
       Usage
       Customization
       End note
Connecting web and desktop: WebDAV   29 / 49


    eZ Components
Connecting web and desktop: WebDAV           29 / 49


    Apache Zeta Components




                                apache

                                Zeta
                                Components
Connecting web and desktop: WebDAV                            30 / 49


    History: eZ Components

         Developed since 2004 by eZ Systems AS
               Makers of enterprise OSS CMS eZ Publish
               http://ez.no
         Initial goal
               Refactor and cleanup core libs of eZ Publish
               Pull out standalone, general purpose library
         Objectives
               High quality code
               Well thought out API
               Backwards compatibility
               Extensive documentation
Connecting web and desktop: WebDAV                            31 / 49


    History: The break

    March 2010
         All eZ Components developers left eZ Systems
         Still, we wanted to . . .
               put voluntary efforts into the project
               push it further
               ensure it is not broken
         Discussion with eZ Systems
               Spin off the project to become independent
               Look for or create a foundation
         Result: Propose code to Apache Software Foundation
Connecting web and desktop: WebDAV    32 / 49


    Apache Software Foundation




         http://apache.org
         Well knwon OSS foundation
         Home of OSS projects like
               Apache HTTP server
               Subversion
               CouchDB
         http://zeta-components.org
Connecting web and desktop: WebDAV            33 / 49


    The Webdav component




         General purpose WebDAV server
         Easy integration and customization
         Work around client issues
Connecting web and desktop: WebDAV                                            34 / 49


    Zeta Webdav architecture
            Transport layer                                  Plugins

                                   Microsoft      Nautilus
              RFC conform                       compatible     Lock plugin
                                  compatible
               transport                         transport
                                   transport



                                                                   Your
                                                              custom plugin
            Server layer

                              Your
                         authentication /      Plugin API
                          authorization




            Back end layer

             Simple backend (base class)


               File system        eZ Publish   Your custom
                back end          back end      back end
Connecting web and desktop: WebDAV   35 / 49


    Outline



    Zeta Webdav component
       Background
       Usage
       Customization
       End note
Connecting web and desktop: WebDAV                                     36 / 49


     Setup a simple WebDAV server




 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
 3         dirname (      FILE        ) . ’ / backend ’
 4   );
 5
 6   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                     36 / 49


     Setup a simple WebDAV server




 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
 3         dirname (      FILE        ) . ’ / backend ’
 4   );
 5
 6   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                     36 / 49


     Setup a simple WebDAV server




 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
 3         dirname (      FILE        ) . ’ / backend ’
 4   );
 5
 6   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                     36 / 49


     Setup a simple WebDAV server




 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
 3         dirname (      FILE        ) . ’ / backend ’
 4   );
 5
 6   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                 37 / 49


     WebDAV server with locking


 1   require once           ’ c u s t o m l o c k a u t h . php ’ ;
 2
 3   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 4
 5   $ s e r v e r − u t h = new myCustomLockAuth (
                    >a
 6           // Some c o n f i g u r a t i o n d i r e c t o r y h e r e
 7           dirname (      FILE         ) . ’ / t o k e n s . php ’
 8   );
 9
10   $server− luginRegistry− e g i s t e r P l u g i n (
             >p                           >r
11       new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( )
12   );
13
14   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
15           // Your WebDAV d i r e c t o r y h e r e
16           dirname (     FILE         ) . ’ / backend ’
17   );
18
19   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                 37 / 49


     WebDAV server with locking


 1   require once           ’ c u s t o m l o c k a u t h . php ’ ;
 2
 3   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 4
 5   $ s e r v e r − u t h = new myCustomLockAuth (
                    >a
 6           // Some c o n f i g u r a t i o n d i r e c t o r y h e r e
 7           dirname (      FILE         ) . ’ / t o k e n s . php ’
 8   );
 9
10   $server− luginRegistry− e g i s t e r P l u g i n (
             >p                           >r
11       new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( )
12   );
13
14   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
15           // Your WebDAV d i r e c t o r y h e r e
16           dirname (     FILE         ) . ’ / backend ’
17   );
18
19   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                 37 / 49


     WebDAV server with locking


 1   require once           ’ c u s t o m l o c k a u t h . php ’ ;
 2
 3   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 4
 5   $ s e r v e r − u t h = new myCustomLockAuth (
                    >a
 6           // Some c o n f i g u r a t i o n d i r e c t o r y h e r e
 7           dirname (      FILE         ) . ’ / t o k e n s . php ’
 8   );
 9
10   $server− luginRegistry− e g i s t e r P l u g i n (
             >p                           >r
11       new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( )
12   );
13
14   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
15           // Your WebDAV d i r e c t o r y h e r e
16           dirname (     FILE         ) . ’ / backend ’
17   );
18
19   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                 37 / 49


     WebDAV server with locking


 1   require once           ’ c u s t o m l o c k a u t h . php ’ ;
 2
 3   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 4
 5   $ s e r v e r − u t h = new myCustomLockAuth (
                    >a
 6           // Some c o n f i g u r a t i o n d i r e c t o r y h e r e
 7           dirname (      FILE         ) . ’ / t o k e n s . php ’
 8   );
 9
10   $server− luginRegistry− e g i s t e r P l u g i n (
             >p                           >r
11       new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( )
12   );
13
14   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
15           // Your WebDAV d i r e c t o r y h e r e
16           dirname (     FILE         ) . ’ / backend ’
17   );
18
19   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                                                          38 / 49


     Authentication


 1   i n t e r f a c e ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ;
 4   }


 1   i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ;
 4   }


 1   i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ;
 4   }
Connecting web and desktop: WebDAV                                                                                          38 / 49


     Authentication


 1   i n t e r f a c e ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ;
 4   }


 1   i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ;
 4   }


 1   i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ;
 4   }
Connecting web and desktop: WebDAV                                                                                          38 / 49


     Authentication


 1   i n t e r f a c e ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ;
 4   }


 1   i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ;
 4   }


 1   i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ;
 4   }
Connecting web and desktop: WebDAV                                                                                          38 / 49


     Authentication


 1   i n t e r f a c e ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ;
 4   }


 1   i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ;
 4   }


 1   i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator
 2   {
 3           p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ;
 4   }
Connecting web and desktop: WebDAV                                                                                          39 / 49


     Authorization


 1   i n t e r f a c e ezcWebdavAuthorizer
 2   {
 3           c o n s t ACCESS READ = 1 ;
 4           c o n s t ACCESS WRITE = 2 ;
 5
 6        p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ;
 7   }


 1   i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer
 2   {
 3           p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ;
 4
 5        p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ;
 6
 7        p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ;
 8   }
Connecting web and desktop: WebDAV                                                                                          39 / 49


     Authorization


 1   i n t e r f a c e ezcWebdavAuthorizer
 2   {
 3           c o n s t ACCESS READ = 1 ;
 4           c o n s t ACCESS WRITE = 2 ;
 5
 6        p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ;
 7   }


 1   i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer
 2   {
 3           p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ;
 4
 5        p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ;
 6
 7        p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ;
 8   }
Connecting web and desktop: WebDAV                                                                                          39 / 49


     Authorization


 1   i n t e r f a c e ezcWebdavAuthorizer
 2   {
 3           c o n s t ACCESS READ = 1 ;
 4           c o n s t ACCESS WRITE = 2 ;
 5
 6        p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ;
 7   }


 1   i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer
 2   {
 3           p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ;
 4
 5        p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ;
 6
 7        p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ;
 8   }
Connecting web and desktop: WebDAV                                                                                          39 / 49


     Authorization


 1   i n t e r f a c e ezcWebdavAuthorizer
 2   {
 3           c o n s t ACCESS READ = 1 ;
 4           c o n s t ACCESS WRITE = 2 ;
 5
 6        p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ;
 7   }


 1   i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer
 2   {
 3           p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ;
 4
 5        p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ;
 6
 7        p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ;
 8   }
Connecting web and desktop: WebDAV                                                                                          39 / 49


     Authorization


 1   i n t e r f a c e ezcWebdavAuthorizer
 2   {
 3           c o n s t ACCESS READ = 1 ;
 4           c o n s t ACCESS WRITE = 2 ;
 5
 6        p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ;
 7   }


 1   i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer
 2   {
 3           p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ;
 4
 5        p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ;
 6
 7        p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ;
 8   }
Connecting web and desktop: WebDAV                                                                                          39 / 49


     Authorization


 1   i n t e r f a c e ezcWebdavAuthorizer
 2   {
 3           c o n s t ACCESS READ = 1 ;
 4           c o n s t ACCESS WRITE = 2 ;
 5
 6        p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ;
 7   }


 1   i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer
 2   {
 3           p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ;
 4
 5        p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ;
 6
 7        p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ;
 8   }
Connecting web and desktop: WebDAV   40 / 49


    Outline



    Zeta Webdav component
       Background
       Usage
       Customization
       End note
Connecting web and desktop: WebDAV                                                       41 / 49


     Path handling


 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2
 3   $ p a t h F a c t o r y = new e z c W e b d a v B a s i c P a t h F a c t o r y (
 4           ’ h t t p : / / e x a m p l e . com/ webdav / i n d e x . php ’
 5   );
 6
 7   foreach ( $server− o n f i g u r a t i o n s as $conf )
                              >c
 8   {
 9       $ c o n f− a t h F a c t o r y = $ p a t h F a c t o r y ;
                   >p
10   }
11
12   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
13         dirname (      FILE        ) . ’ / backend ’
14   );
15
16   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                       41 / 49


     Path handling


 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2
 3   $ p a t h F a c t o r y = new e z c W e b d a v B a s i c P a t h F a c t o r y (
 4           ’ h t t p : / / e x a m p l e . com/ webdav / i n d e x . php ’
 5   );
 6
 7   foreach ( $server− o n f i g u r a t i o n s as $conf )
                              >c
 8   {
 9       $ c o n f− a t h F a c t o r y = $ p a t h F a c t o r y ;
                   >p
10   }
11
12   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
13         dirname (      FILE        ) . ’ / backend ’
14   );
15
16   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                                                       41 / 49


     Path handling


 1   $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ;
 2
 3   $ p a t h F a c t o r y = new e z c W e b d a v B a s i c P a t h F a c t o r y (
 4           ’ h t t p : / / e x a m p l e . com/ webdav / i n d e x . php ’
 5   );
 6
 7   foreach ( $server− o n f i g u r a t i o n s as $conf )
                              >c
 8   {
 9       $ c o n f− a t h F a c t o r y = $ p a t h F a c t o r y ;
                   >p
10   }
11
12   $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d (
13         dirname (      FILE        ) . ’ / backend ’
14   );
15
16   $ s e r v e r − andle ( $backend ) ;
                    >h
Connecting web and desktop: WebDAV                   42 / 49


    The back end


         ezcWebdavFileBackend
         ezcWebdavMemoryBackend
         Write your own
               ezcWebdavSimpleBackend
               ezcWebdavBackend
                    ezcWebdavBackendPut
                    ezcWebdavBackendChange
                    ezcWebdavBackendMakeCollection
                    ezcWebdavLockBackend
Connecting web and desktop: WebDAV                   42 / 49


    The back end


         ezcWebdavFileBackend
         ezcWebdavMemoryBackend
         Write your own
               ezcWebdavSimpleBackend
               ezcWebdavBackend
                    ezcWebdavBackendPut
                    ezcWebdavBackendChange
                    ezcWebdavBackendMakeCollection
                    ezcWebdavLockBackend
Connecting web and desktop: WebDAV                   42 / 49


    The back end


         ezcWebdavFileBackend
         ezcWebdavMemoryBackend
         Write your own
               ezcWebdavSimpleBackend
               ezcWebdavBackend
                    ezcWebdavBackendPut
                    ezcWebdavBackendChange
                    ezcWebdavBackendMakeCollection
                    ezcWebdavLockBackend
Connecting web and desktop: WebDAV                   42 / 49


    The back end


         ezcWebdavFileBackend
         ezcWebdavMemoryBackend
         Write your own
               ezcWebdavSimpleBackend
               ezcWebdavBackend
                    ezcWebdavBackendPut
                    ezcWebdavBackendChange
                    ezcWebdavBackendMakeCollection
                    ezcWebdavLockBackend
Connecting web and desktop: WebDAV                43 / 49


    ezcWebdavSimpleBackend



         Proper method handling
         Authorization
         Handling of If[-*] headers
         about 1600 LOC
         No deeper knowledge on WebDAV required
Connecting web and desktop: WebDAV        44 / 49


    New clients

         Adjust transport layer
         Needs some patience
               Use Wireshark!
         Extend one or more of
               ezcWebdavTransport
               ezcWebdavHeaderHandler
               ezcWebdavPropertyHandler
Connecting web and desktop: WebDAV                                                                 44 / 49


     New clients

               Adjust transport layer
               Needs some patience
                         Use Wireshark!
               Extend one or more of
                         ezcWebdavTransport
                         ezcWebdavHeaderHandler
                         ezcWebdavPropertyHandler

 1   $ n e w C l i e n t C o n f = new e z c W e b d a v S e r v e r C o n f i g u r a t i o n (
 2          ’ (My. ∗ Webdav s+C l i e n g t ) i ’ ,
 3          ’ myCustomTransportTransport ’
 4          // . . .
 5   );
 6
 7   $server− o n f i g u r a t i o n s − n s e r t B e f o r e ( $newClientConf , 0 ) ;
             >c                          >i
Connecting web and desktop: WebDAV                                                                 44 / 49


     New clients

               Adjust transport layer
               Needs some patience
                         Use Wireshark!
               Extend one or more of
                         ezcWebdavTransport
                         ezcWebdavHeaderHandler
                         ezcWebdavPropertyHandler

 1   $ n e w C l i e n t C o n f = new e z c W e b d a v S e r v e r C o n f i g u r a t i o n (
 2          ’ (My. ∗ Webdav s+C l i e n g t ) i ’ ,
 3          ’ myCustomTransportTransport ’
 4          // . . .
 5   );
 6
 7   $server− o n f i g u r a t i o n s − n s e r t B e f o r e ( $newClientConf , 0 ) ;
             >c                          >i
Connecting web and desktop: WebDAV        45 / 49


    Plugins




         Hook into requests / responses
         Handle unknown requests
         Issue unknown responses
         Send requests to the back end
Connecting web and desktop: WebDAV   46 / 49


    Outline



    Zeta Webdav component
       Background
       Usage
       Customization
       End note
Connecting web and desktop: WebDAV      47 / 49


    Join the team!



         Come and contribute!
         Highly technical discussions
         Open minded people
         Apache Software Foundation
         http://zeta-components.org
Connecting web and desktop: WebDAV                   48 / 49


    Q/A




                     Are there any questions left?
Connecting web and desktop: WebDAV                           49 / 49


    Thanks for listening
                             Please rate this talk at
                       http://joind.in/2808
                 and / or give me some feedback right now!
Connecting web and desktop: WebDAV                           49 / 49


    Thanks for listening
                             Please rate this talk at
                       http://joind.in/2808
                 and / or give me some feedback right now!

                       This is very important for . . .

         Speakers
         Organizers
         You!
Connecting web and desktop: WebDAV                           49 / 49


    Thanks for listening
                             Please rate this talk at
                       http://joind.in/2808
                 and / or give me some feedback right now!

                                Stay in touch

         Tobias Schlitt
         toby@qafoo.com
         @tobySen / @qafoo

                        Rent a PHP quality expert:
                            http://qafoo.com

More Related Content

What's hot

Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDYCotendo
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonPhilip Tellis
 
HTML5 를 이용한 하이브리드앱 제작
HTML5 를 이용한 하이브리드앱 제작HTML5 를 이용한 하이브리드앱 제작
HTML5 를 이용한 하이브리드앱 제작Zany Lee
 
Todd vatalaro oracle 2004
Todd vatalaro oracle 2004Todd vatalaro oracle 2004
Todd vatalaro oracle 2004Todd Vatalaro
 
Frontend Performance: Expert to Crazy Person
Frontend Performance: Expert to Crazy PersonFrontend Performance: Expert to Crazy Person
Frontend Performance: Expert to Crazy PersonPhilip Tellis
 
Open Mic on Sametime9 Install -Best Practices
Open Mic on Sametime9 Install  -Best PracticesOpen Mic on Sametime9 Install  -Best Practices
Open Mic on Sametime9 Install -Best PracticesVinayak Tavargeri
 
Perfectly Legal Illegal Resources In The Web Catching Slumdogs Using The Net
Perfectly Legal Illegal Resources In The Web   Catching Slumdogs Using The NetPerfectly Legal Illegal Resources In The Web   Catching Slumdogs Using The Net
Perfectly Legal Illegal Resources In The Web Catching Slumdogs Using The NetPlusOrMinusZero
 
my Assignment, on browsers | computer
my Assignment, on browsers | computermy Assignment, on browsers | computer
my Assignment, on browsers | computerNazish Jamali
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)Kevin Gill
 
Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?Leon Anavi
 
Frontend Performance: De débutant à Expert à Fou Furieux
Frontend Performance: De débutant à Expert à Fou FurieuxFrontend Performance: De débutant à Expert à Fou Furieux
Frontend Performance: De débutant à Expert à Fou FurieuxPhilip Tellis
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonPhilip Tellis
 
IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 LanJumping Bean
 
Ansible project-deploy (NomadPHP lightning talk)
Ansible project-deploy (NomadPHP lightning talk)Ansible project-deploy (NomadPHP lightning talk)
Ansible project-deploy (NomadPHP lightning talk)Ramon de la Fuente
 

What's hot (16)

Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDY
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy Person
 
HTML5 를 이용한 하이브리드앱 제작
HTML5 를 이용한 하이브리드앱 제작HTML5 를 이용한 하이브리드앱 제작
HTML5 를 이용한 하이브리드앱 제작
 
Todd vatalaro oracle 2004
Todd vatalaro oracle 2004Todd vatalaro oracle 2004
Todd vatalaro oracle 2004
 
Frontend Performance: Expert to Crazy Person
Frontend Performance: Expert to Crazy PersonFrontend Performance: Expert to Crazy Person
Frontend Performance: Expert to Crazy Person
 
Open Mic on Sametime9 Install -Best Practices
Open Mic on Sametime9 Install  -Best PracticesOpen Mic on Sametime9 Install  -Best Practices
Open Mic on Sametime9 Install -Best Practices
 
Perfectly Legal Illegal Resources In The Web Catching Slumdogs Using The Net
Perfectly Legal Illegal Resources In The Web   Catching Slumdogs Using The NetPerfectly Legal Illegal Resources In The Web   Catching Slumdogs Using The Net
Perfectly Legal Illegal Resources In The Web Catching Slumdogs Using The Net
 
my Assignment, on browsers | computer
my Assignment, on browsers | computermy Assignment, on browsers | computer
my Assignment, on browsers | computer
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
 
Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?Automotive Grade Linux on Raspberry Pi: How Does It Work?
Automotive Grade Linux on Raspberry Pi: How Does It Work?
 
Frontend Performance: De débutant à Expert à Fou Furieux
Frontend Performance: De débutant à Expert à Fou FurieuxFrontend Performance: De débutant à Expert à Fou Furieux
Frontend Performance: De débutant à Expert à Fou Furieux
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy Person
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
 
IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
 
Ansible project-deploy (NomadPHP lightning talk)
Ansible project-deploy (NomadPHP lightning talk)Ansible project-deploy (NomadPHP lightning talk)
Ansible project-deploy (NomadPHP lightning talk)
 

Similar to Connecting web Applications with Desktop, confoo 2011

Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Serverswebhostingguy
 
Adobe is from Mars, Microsoft is from Uranus. A look at two competing web st...
Adobe is from Mars, Microsoft is from Uranus.  A look at two competing web st...Adobe is from Mars, Microsoft is from Uranus.  A look at two competing web st...
Adobe is from Mars, Microsoft is from Uranus. A look at two competing web st...Eric Fickes
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2Vincent Mercier
 
Applied+Web+Development+[Autosaved].pptx
Applied+Web+Development+[Autosaved].pptxApplied+Web+Development+[Autosaved].pptx
Applied+Web+Development+[Autosaved].pptxvoot1
 
APACHE
APACHEAPACHE
APACHEARJUN
 
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015Van Phuc
 
Web Server Administration
Web Server AdministrationWeb Server Administration
Web Server Administrationwebhostingguy
 
Web Server Administration
Web Server AdministrationWeb Server Administration
Web Server Administrationwebhostingguy
 
Web Server Administration
Web Server AdministrationWeb Server Administration
Web Server Administrationwebhostingguy
 
WebRTC Overview by Dan Burnett
WebRTC Overview by Dan BurnettWebRTC Overview by Dan Burnett
WebRTC Overview by Dan BurnettMojo Lingo
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On WindowsJosh Holmes
 
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
A/B Linux updates with RAUC and meta-rauc-community: now & in the futureA/B Linux updates with RAUC and meta-rauc-community: now & in the future
A/B Linux updates with RAUC and meta-rauc-community: now & in the futureLeon Anavi
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2Ido Flatow
 

Similar to Connecting web Applications with Desktop, confoo 2011 (20)

Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
 
HDF Web Browser Plug-in
HDF Web Browser Plug-inHDF Web Browser Plug-in
HDF Web Browser Plug-in
 
URL Design
URL DesignURL Design
URL Design
 
Adobe is from Mars, Microsoft is from Uranus. A look at two competing web st...
Adobe is from Mars, Microsoft is from Uranus.  A look at two competing web st...Adobe is from Mars, Microsoft is from Uranus.  A look at two competing web st...
Adobe is from Mars, Microsoft is from Uranus. A look at two competing web st...
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2
 
Applied+Web+Development+[Autosaved].pptx
Applied+Web+Development+[Autosaved].pptxApplied+Web+Development+[Autosaved].pptx
Applied+Web+Development+[Autosaved].pptx
 
APACHE
APACHEAPACHE
APACHE
 
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015
 
Php On Windows
Php On WindowsPhp On Windows
Php On Windows
 
Web Server Administration
Web Server AdministrationWeb Server Administration
Web Server Administration
 
Web Server Administration
Web Server AdministrationWeb Server Administration
Web Server Administration
 
Web Server Administration
Web Server AdministrationWeb Server Administration
Web Server Administration
 
WebRTC Overview by Dan Burnett
WebRTC Overview by Dan BurnettWebRTC Overview by Dan Burnett
WebRTC Overview by Dan Burnett
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On Windows
 
Ws
WsWs
Ws
 
Websockets
WebsocketsWebsockets
Websockets
 
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
A/B Linux updates with RAUC and meta-rauc-community: now & in the futureA/B Linux updates with RAUC and meta-rauc-community: now & in the future
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
 
DevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTCDevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTC
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
 

More from Bachkoutou Toutou

Making php see, confoo 2011
Making php see, confoo 2011 Making php see, confoo 2011
Making php see, confoo 2011 Bachkoutou Toutou
 
Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011Bachkoutou Toutou
 
hacking your website with vega, confoo2011
hacking your website with vega, confoo2011hacking your website with vega, confoo2011
hacking your website with vega, confoo2011Bachkoutou Toutou
 
Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011
Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011
Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011Bachkoutou Toutou
 
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011Bachkoutou Toutou
 
Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011Bachkoutou Toutou
 
Connecting Web Application and Desktop, confoo 2011, qafoo
Connecting Web Application and Desktop, confoo 2011, qafooConnecting Web Application and Desktop, confoo 2011, qafoo
Connecting Web Application and Desktop, confoo 2011, qafooBachkoutou Toutou
 
99 problems but the search aint one, confoo 2011, andrei zmievski
99 problems but the search aint one, confoo 2011, andrei zmievski99 problems but the search aint one, confoo 2011, andrei zmievski
99 problems but the search aint one, confoo 2011, andrei zmievskiBachkoutou Toutou
 
Php Inside - confoo 2011 - Derick Rethans
Php Inside -  confoo 2011 - Derick RethansPhp Inside -  confoo 2011 - Derick Rethans
Php Inside - confoo 2011 - Derick RethansBachkoutou Toutou
 
WebShell - confoo 2011 - sean coates
WebShell - confoo 2011 - sean coatesWebShell - confoo 2011 - sean coates
WebShell - confoo 2011 - sean coatesBachkoutou Toutou
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
Confoo 2011 - Advanced OO Patterns
Confoo 2011 - Advanced OO PatternsConfoo 2011 - Advanced OO Patterns
Confoo 2011 - Advanced OO PatternsBachkoutou Toutou
 

More from Bachkoutou Toutou (14)

Making php see, confoo 2011
Making php see, confoo 2011 Making php see, confoo 2011
Making php see, confoo 2011
 
Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011Sean coates fifty things and tricks, confoo 2011
Sean coates fifty things and tricks, confoo 2011
 
hacking your website with vega, confoo2011
hacking your website with vega, confoo2011hacking your website with vega, confoo2011
hacking your website with vega, confoo2011
 
Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011
Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011
Premiers pas dans les extensions PHP, Pierrick Charron, Confoo 2011
 
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
 
Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011Zend Framework 2, What's new, Confoo 2011
Zend Framework 2, What's new, Confoo 2011
 
Connecting Web Application and Desktop, confoo 2011, qafoo
Connecting Web Application and Desktop, confoo 2011, qafooConnecting Web Application and Desktop, confoo 2011, qafoo
Connecting Web Application and Desktop, confoo 2011, qafoo
 
99 problems but the search aint one, confoo 2011, andrei zmievski
99 problems but the search aint one, confoo 2011, andrei zmievski99 problems but the search aint one, confoo 2011, andrei zmievski
99 problems but the search aint one, confoo 2011, andrei zmievski
 
Php Inside - confoo 2011 - Derick Rethans
Php Inside -  confoo 2011 - Derick RethansPhp Inside -  confoo 2011 - Derick Rethans
Php Inside - confoo 2011 - Derick Rethans
 
WebShell - confoo 2011 - sean coates
WebShell - confoo 2011 - sean coatesWebShell - confoo 2011 - sean coates
WebShell - confoo 2011 - sean coates
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
Apc Memcached Confoo 2011
Apc Memcached Confoo 2011Apc Memcached Confoo 2011
Apc Memcached Confoo 2011
 
Xdebug confoo11
Xdebug confoo11Xdebug confoo11
Xdebug confoo11
 
Confoo 2011 - Advanced OO Patterns
Confoo 2011 - Advanced OO PatternsConfoo 2011 - Advanced OO Patterns
Confoo 2011 - Advanced OO Patterns
 

Connecting web Applications with Desktop, confoo 2011

  • 1. Connecting web and desktop: WebDAV ConFoo 2011 Tobias Schlitt <toby@qafoo.com> March 10, 2011
  • 2. Connecting web and desktop: WebDAV 2 / 49 Outline Introduction HTTP & WebDAV Development challenges Zeta Webdav component
  • 3. Connecting web and desktop: WebDAV 3 / 49 About me Degree in computer sience More than 10 years of professional PHP Open source enthusiast Apache Zeta Components Arbit PHPUnit ...
  • 4. Connecting web and desktop: WebDAV 3 / 49 About me Degree in computer sience More than 10 years of professional PHP Open source enthusiast Apache Zeta Components Arbit PHPUnit ...
  • 5. Connecting web and desktop: WebDAV 3 / 49 About me Degree in computer sience More than 10 years of professional PHP Open source enthusiast Apache Zeta Components Arbit PHPUnit ...
  • 6. Connecting web and desktop: WebDAV 3 / 49 About me Degree in computer sience Co-Founder of More than 10 years of Qafoo GmbH professional PHP http://qafoo.com Open source enthusiast Apache Zeta Components Qafoo passion for software quality Arbit PHPUnit ...
  • 7. Connecting web and desktop: WebDAV 3 / 49 About me Degree in computer sience Co-Founder of More than 10 years of Qafoo GmbH professional PHP http://qafoo.com Open source enthusiast Apache Zeta Components Qafoo passion for software quality Arbit We help people to produce PHPUnit ... high quality PHP code.
  • 8. Connecting web and desktop: WebDAV 4 / 49 Outline Introduction HTTP & WebDAV Development challenges Zeta Webdav component
  • 9. Connecting web and desktop: WebDAV 5 / 49 The concept GET /some/resource
  • 10. Connecting web and desktop: WebDAV 5 / 49 The concept POST /some/resource ???
  • 11. Connecting web and desktop: WebDAV 5 / 49 The concept PUT /some/resource ???
  • 12. Connecting web and desktop: WebDAV 5 / 49 The concept Please file that document under /some/resource Done.
  • 13. Connecting web and desktop: WebDAV 5 / 49 The concept Please create a new col- lection of documents under /some/more Done.
  • 14. Connecting web and desktop: WebDAV 6 / 49 HTTP Network protocol driving the web Current version: 1.1 RFC 2616 (June 1999) http://tools.ietf.org/html/rfc2616 Inventor: Sir Tim Berners-Lee Client / server based Stateless communication Defines Request / response Headers / body Formats / actions
  • 15. Connecting web and desktop: WebDAV 6 / 49 HTTP Network protocol driving the web Current version: 1.1 RFC 2616 (June 1999) http://tools.ietf.org/html/rfc2616 Inventor: Sir Tim Berners-Lee Client / server based Stateless communication Defines Request / response Headers / body Formats / actions
  • 16. Connecting web and desktop: WebDAV 6 / 49 HTTP Network protocol driving the web Current version: 1.1 RFC 2616 (June 1999) http://tools.ietf.org/html/rfc2616 Inventor: Sir Tim Berners-Lee Client / server based Stateless communication Defines Request / response Headers / body Formats / actions
  • 17. Connecting web and desktop: WebDAV 6 / 49 HTTP Network protocol driving the web Current version: 1.1 RFC 2616 (June 1999) http://tools.ietf.org/html/rfc2616 Inventor: Sir Tim Berners-Lee Client / server based Stateless communication Defines Request / response Headers / body Formats / actions
  • 18. Connecting web and desktop: WebDAV 7 / 49 WebDAV HTTP Extensions for Distributed Authoring RFC 2518 (February 1999) http://tools.ietf.org/html/rfc2518 HTTP Extensions for Web Distributed Authoring and Versioning RFC 4918 (June 2007) http://tools.ietf.org/html/rfc4918 IETF Standard Extension to HTTP Allows distributed editing
  • 19. Connecting web and desktop: WebDAV 7 / 49 WebDAV HTTP Extensions for Distributed Authoring RFC 2518 (February 1999) http://tools.ietf.org/html/rfc2518 HTTP Extensions for Web Distributed Authoring and Versioning RFC 4918 (June 2007) http://tools.ietf.org/html/rfc4918 IETF Standard Extension to HTTP Allows distributed editing
  • 20. Connecting web and desktop: WebDAV 7 / 49 WebDAV HTTP Extensions for Distributed Authoring RFC 2518 (February 1999) http://tools.ietf.org/html/rfc2518 HTTP Extensions for Web Distributed Authoring and Versioning RFC 4918 (June 2007) http://tools.ietf.org/html/rfc4918 IETF Standard Extension to HTTP Allows distributed editing
  • 21. Connecting web and desktop: WebDAV 7 / 49 WebDAV HTTP Extensions for Distributed Authoring RFC 2518 (February 1999) http://tools.ietf.org/html/rfc2518 HTTP Extensions for Web Distributed Authoring and Versioning RFC 4918 (June 2007) http://tools.ietf.org/html/rfc4918 IETF Standard Extension to HTTP Allows distributed editing
  • 22. Connecting web and desktop: WebDAV 7 / 49 WebDAV HTTP Extensions for Distributed Authoring RFC 2518 (February 1999) http://tools.ietf.org/html/rfc2518 HTTP Extensions for Web Distributed Authoring and Versioning RFC 4918 (June 2007) http://tools.ietf.org/html/rfc4918 IETF Standard Extension to HTTP Allows distributed editing WebDAV allows your users to edit web content easily.
  • 23. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 24. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 25. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 26. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 27. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 28. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 29. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT
  • 30. Connecting web and desktop: WebDAV 8 / 49 Request methods HTTP WebDAV GET MKCOL POST COPY HEAD MOVE PUT PROPFIND DELETE PROPPATCH OPTIONS LOCK TRACE UNLOCK CONNECT Significant for WebDAV
  • 31. Connecting web and desktop: WebDAV 9 / 49 Request headers HTTP WebDAV Accept[-*] Depth Authorization Destination If-[None-]Match If If-[Un]Modified-Since Overwrite User-Agent Timeout ...
  • 32. Connecting web and desktop: WebDAV 9 / 49 Request headers HTTP WebDAV Accept[-*] Depth Authorization Destination If-[None-]Match If If-[Un]Modified-Since Overwrite User-Agent Timeout ...
  • 33. Connecting web and desktop: WebDAV 9 / 49 Request headers HTTP WebDAV Accept[-*] Depth Authorization Destination If-[None-]Match If If-[Un]Modified-Since Overwrite User-Agent Timeout ... Significant for WebDAV
  • 34. Connecting web and desktop: WebDAV 10 / 49 Response headers HTTP WebDAV Accept-Ranges DAV Content-Length Lock-Token Content-Type Timeout ETag Location Retry-After Server WWW-Authenticate ...
  • 35. Connecting web and desktop: WebDAV 10 / 49 Response headers HTTP WebDAV Accept-Ranges DAV Content-Length Lock-Token Content-Type Timeout ETag Location Retry-After Server WWW-Authenticate ...
  • 36. Connecting web and desktop: WebDAV 10 / 49 Response headers HTTP WebDAV Accept-Ranges DAV Content-Length Lock-Token Content-Type Timeout ETag Location Retry-After Server WWW-Authenticate ... Significant for WebDAV
  • 37. Connecting web and desktop: WebDAV 11 / 49 Request / response bodies HTTP Request body mostly not significant Only PUT method needs body (to be stored) Response body usually content to deliver (unspecified) Error responses may contain arbitrary content
  • 38. Connecting web and desktop: WebDAV 11 / 49 Request / response bodies WebDAV Bodies are significant Many methods require XML bodies Request Response PROPFIND PROPFIND PROPPATCH PROPPATCH COPY (optional) LOCK MOVE (optional) Potentially others LOCK (multi-status)
  • 39. Connecting web and desktop: WebDAV 11 / 49 Request / response bodies WebDAV Bodies are significant Many methods require XML bodies Request Response PROPFIND PROPFIND PROPPATCH PROPPATCH COPY (optional) LOCK MOVE (optional) Potentially others LOCK (multi-status)
  • 40. Connecting web and desktop: WebDAV 11 / 49 Request / response bodies WebDAV Bodies are significant Many methods require XML bodies Request Response PROPFIND PROPFIND PROPPATCH PROPPATCH COPY (optional) LOCK MOVE (optional) Potentially others LOCK (multi-status)
  • 41. Connecting web and desktop: WebDAV 12 / 49 Properties Concept introduced by WebDAV Store meta information about content Usually not directly visible to the user Live properties Dead properties creationdate Arbitrary data displayname Custom namespace get* XML favored lockdiscovery ...
  • 42. Connecting web and desktop: WebDAV 12 / 49 Properties Concept introduced by WebDAV Store meta information about content Usually not directly visible to the user Live properties Dead properties creationdate Arbitrary data displayname Custom namespace get* XML favored lockdiscovery ...
  • 43. Connecting web and desktop: WebDAV 12 / 49 Properties Concept introduced by WebDAV Store meta information about content Usually not directly visible to the user Live properties Dead properties creationdate Arbitrary data displayname Custom namespace get* XML favored lockdiscovery ...
  • 44. Connecting web and desktop: WebDAV 13 / 49 Outline Introduction HTTP & WebDAV Development challenges Zeta Webdav component
  • 45. Connecting web and desktop: WebDAV 14 / 49 Development challenges Server development in general WebDAV RFCs are a BBOM Unstructured Ambiguous Design fails Misbehaving clients Ignore the specification Different interpretations of RFCs Proprietary BS Exchangeable back ends
  • 46. Connecting web and desktop: WebDAV 15 / 49 Outline Development challenges RFC problems Client problems Back end flexibility
  • 47. Connecting web and desktop: WebDAV 16 / 49 COPY / MOVE methods Errors on COPY “[...] if an error occurs while copying an internal collection, the server MUST NOT copy any resources identified by members of this collection (i.e., the server must skip this subtree) [...]” [?] MOVE “[...] is the logical equivalent of a copy (COPY), followed by consistency maintenance processing, followed by a delete of the source,[...]” [?] MOVE errors “[...] after detecting the error, the move operation SHOULD try to finish as much of the original move as possible [...]” [?]
  • 48. Connecting web and desktop: WebDAV 16 / 49 COPY / MOVE methods Errors on COPY “[...] if an error occurs while copying an internal collection, the server MUST NOT copy any resources identified by members of this collection (i.e., the server must skip this subtree) [...]” [?] MOVE “[...] is the logical equivalent of a copy (COPY), followed by consistency maintenance processing, followed by a delete of the source,[...]” [?] MOVE errors “[...] after detecting the error, the move operation SHOULD try to finish as much of the original move as possible [...]” [?]
  • 49. Connecting web and desktop: WebDAV 16 / 49 COPY / MOVE methods Errors on COPY “[...] if an error occurs while copying an internal collection, the server MUST NOT copy any resources identified by members of this collection (i.e., the server must skip this subtree) [...]” [?] MOVE “[...] is the logical equivalent of a copy (COPY), followed by consistency maintenance processing, followed by a delete of the source,[...]” [?] MOVE errors “[...] after detecting the error, the move operation SHOULD try to finish as much of the original move as possible [...]” [?]
  • 50. Connecting web and desktop: WebDAV 17 / 49 The If header Makes operations conditional. Apply operation only if all conditions are met no condition is met 1 No−tag − l i s t = L i s t 2 Tagged− l i s t = R e s o u r c e 1∗ L i s t 3 Resource = Coded−URL 4 List = ”(” 5 1 ∗ ( [ ” Not ” ] ( S t a t e −t o k e n | ” [ ” e n t i t y −t a g ” ] ” ) ) 6 ”)” 7 S t a t e −t o k e n = Coded−URL 8 Coded−URL = ”<” a b s o l u t e U R I ”>”
  • 51. Connecting web and desktop: WebDAV 18 / 49 The If header Can contain lock tokens entity tags 1 I f : (< l o c k t o k e n : a−w r i t e −l o c k −t o k e n > 2 [ ” I am an ETag” ] ) ( [ ” I am a n o t h e r ETag” ] )
  • 52. Connecting web and desktop: WebDAV 19 / 49 The If header Conditions can apply to single resources sets of resources all affected resources 1 <h t t p : // e x a m p l e . com/ r e s o u r c e 1 > 2 (< l o c k t o k e n : a−w r i t e −l o c k −t o k e n > [W/ ”A weak ETag” ] ) 3 ( Not [ ” s t r o n g ETag” ] ) Required own parser implementation Parser is about 150 LOC
  • 53. Connecting web and desktop: WebDAV 20 / 49 Locking 2 different types of locks Exclusive Shared Lock conditions must be validated before anything else Timeout refresh on every lock use (successful or not) (Fixed in RCF 4918) Not specified how to associate principles with lock tokens Lock-Null-Resources (Partly fixed in RFC 4918) Do not behave like real resources Must vanish when the lock is released A collection can be created on them
  • 54. Connecting web and desktop: WebDAV 20 / 49 Locking 2 different types of locks Exclusive Shared Lock conditions must be validated before anything else Timeout refresh on every lock use (successful or not) (Fixed in RCF 4918) Not specified how to associate principles with lock tokens Lock-Null-Resources (Partly fixed in RFC 4918) Do not behave like real resources Must vanish when the lock is released A collection can be created on them
  • 55. Connecting web and desktop: WebDAV 20 / 49 Locking 2 different types of locks Exclusive Shared Lock conditions must be validated before anything else Timeout refresh on every lock use (successful or not) (Fixed in RCF 4918) Not specified how to associate principles with lock tokens Lock-Null-Resources (Partly fixed in RFC 4918) Do not behave like real resources Must vanish when the lock is released A collection can be created on them
  • 56. Connecting web and desktop: WebDAV 20 / 49 Locking 2 different types of locks Exclusive Shared Lock conditions must be validated before anything else Timeout refresh on every lock use (successful or not) (Fixed in RCF 4918) Not specified how to associate principles with lock tokens Lock-Null-Resources (Partly fixed in RFC 4918) Do not behave like real resources Must vanish when the lock is released A collection can be created on them
  • 57. Connecting web and desktop: WebDAV 20 / 49 Locking 2 different types of locks Exclusive Shared Lock conditions must be validated before anything else Timeout refresh on every lock use (successful or not) (Fixed in RCF 4918) Not specified how to associate principles with lock tokens Lock-Null-Resources (Partly fixed in RFC 4918) Do not behave like real resources Must vanish when the lock is released A collection can be created on them
  • 58. Connecting web and desktop: WebDAV 21 / 49 Outline Development challenges RFC problems Client problems Back end flexibility
  • 59. Connecting web and desktop: WebDAV 22 / 49 Konqueror / Nautilus Konqueror (KDE) Does not decode URLs properly Requires Apache like error messages for 404 Nautilus (Gnome) Cannot cope with charset="..." info in MIME types
  • 60. Connecting web and desktop: WebDAV 22 / 49 Konqueror / Nautilus Konqueror (KDE) Does not decode URLs properly Requires Apache like error messages for 404 Nautilus (Gnome) Cannot cope with charset="..." info in MIME types
  • 61. Connecting web and desktop: WebDAV 23 / 49 Windows / InternetExplorer At least 3 different WebDAV user agents in Windows Loaded depending on how you initialize connection Transparently switched occasionally Requires custom header MS-Author-Via on every response Requires custom namespaces set on live properties Requires special namespace shortcut to be used (sic!) Requires different shortcuts for DAV: namespace
  • 62. Connecting web and desktop: WebDAV 23 / 49 Windows / InternetExplorer At least 3 different WebDAV user agents in Windows Loaded depending on how you initialize connection Transparently switched occasionally Requires custom header MS-Author-Via on every response Requires custom namespaces set on live properties Requires special namespace shortcut to be used (sic!) Requires different shortcuts for DAV: namespace
  • 63. Connecting web and desktop: WebDAV 23 / 49 Windows / InternetExplorer At least 3 different WebDAV user agents in Windows Loaded depending on how you initialize connection Transparently switched occasionally Requires custom header MS-Author-Via on every response Requires custom namespaces set on live properties Requires special namespace shortcut to be used (sic!) Requires different shortcuts for DAV: namespace
  • 64. Connecting web and desktop: WebDAV 24 / 49 Windows / InternetExplorer II Cannot cope with non-significant white spaces in XML bodies Requires newline at the end of every XML body Occasionally sends invalid PROPFIND requests
  • 65. Connecting web and desktop: WebDAV 24 / 49 Windows / InternetExplorer II Cannot cope with non-significant white spaces in XML bodies Requires newline at the end of every XML body Occasionally sends invalid PROPFIND requests
  • 66. Connecting web and desktop: WebDAV 24 / 49 Windows / InternetExplorer II Cannot cope with non-significant white spaces in XML bodies Requires newline at the end of every XML body Occasionally sends invalid PROPFIND requests
  • 67. Connecting web and desktop: WebDAV 25 / 49 Outline Development challenges RFC problems Client problems Back end flexibility
  • 68. Connecting web and desktop: WebDAV 26 / 49 Back end flexibility Exchangeable back end File system Memory (testing) SQL Database? Subversion? Independent of client issues Protocol enhancements back end independent Easy implementation
  • 69. Connecting web and desktop: WebDAV 26 / 49 Back end flexibility Exchangeable back end File system Memory (testing) SQL Database? Subversion? Independent of client issues Protocol enhancements back end independent Easy implementation
  • 70. Connecting web and desktop: WebDAV 26 / 49 Back end flexibility Exchangeable back end File system Memory (testing) SQL Database? Subversion? Independent of client issues Protocol enhancements back end independent Easy implementation
  • 71. Connecting web and desktop: WebDAV 26 / 49 Back end flexibility Exchangeable back end File system Memory (testing) SQL Database? Subversion? Independent of client issues Protocol enhancements back end independent Easy implementation
  • 72. Connecting web and desktop: WebDAV 27 / 49 Outline Introduction HTTP & WebDAV Development challenges Zeta Webdav component
  • 73. Connecting web and desktop: WebDAV 28 / 49 Outline Zeta Webdav component Background Usage Customization End note
  • 74. Connecting web and desktop: WebDAV 29 / 49 eZ Components
  • 75. Connecting web and desktop: WebDAV 29 / 49 Apache Zeta Components apache Zeta Components
  • 76. Connecting web and desktop: WebDAV 30 / 49 History: eZ Components Developed since 2004 by eZ Systems AS Makers of enterprise OSS CMS eZ Publish http://ez.no Initial goal Refactor and cleanup core libs of eZ Publish Pull out standalone, general purpose library Objectives High quality code Well thought out API Backwards compatibility Extensive documentation
  • 77. Connecting web and desktop: WebDAV 31 / 49 History: The break March 2010 All eZ Components developers left eZ Systems Still, we wanted to . . . put voluntary efforts into the project push it further ensure it is not broken Discussion with eZ Systems Spin off the project to become independent Look for or create a foundation Result: Propose code to Apache Software Foundation
  • 78. Connecting web and desktop: WebDAV 32 / 49 Apache Software Foundation http://apache.org Well knwon OSS foundation Home of OSS projects like Apache HTTP server Subversion CouchDB http://zeta-components.org
  • 79. Connecting web and desktop: WebDAV 33 / 49 The Webdav component General purpose WebDAV server Easy integration and customization Work around client issues
  • 80. Connecting web and desktop: WebDAV 34 / 49 Zeta Webdav architecture Transport layer Plugins Microsoft Nautilus RFC conform compatible Lock plugin compatible transport transport transport Your custom plugin Server layer Your authentication / Plugin API authorization Back end layer Simple backend (base class) File system eZ Publish Your custom back end back end back end
  • 81. Connecting web and desktop: WebDAV 35 / 49 Outline Zeta Webdav component Background Usage Customization End note
  • 82. Connecting web and desktop: WebDAV 36 / 49 Setup a simple WebDAV server 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 3 dirname ( FILE ) . ’ / backend ’ 4 ); 5 6 $ s e r v e r − andle ( $backend ) ; >h
  • 83. Connecting web and desktop: WebDAV 36 / 49 Setup a simple WebDAV server 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 3 dirname ( FILE ) . ’ / backend ’ 4 ); 5 6 $ s e r v e r − andle ( $backend ) ; >h
  • 84. Connecting web and desktop: WebDAV 36 / 49 Setup a simple WebDAV server 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 3 dirname ( FILE ) . ’ / backend ’ 4 ); 5 6 $ s e r v e r − andle ( $backend ) ; >h
  • 85. Connecting web and desktop: WebDAV 36 / 49 Setup a simple WebDAV server 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 3 dirname ( FILE ) . ’ / backend ’ 4 ); 5 6 $ s e r v e r − andle ( $backend ) ; >h
  • 86. Connecting web and desktop: WebDAV 37 / 49 WebDAV server with locking 1 require once ’ c u s t o m l o c k a u t h . php ’ ; 2 3 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 4 5 $ s e r v e r − u t h = new myCustomLockAuth ( >a 6 // Some c o n f i g u r a t i o n d i r e c t o r y h e r e 7 dirname ( FILE ) . ’ / t o k e n s . php ’ 8 ); 9 10 $server− luginRegistry− e g i s t e r P l u g i n ( >p >r 11 new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( ) 12 ); 13 14 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 15 // Your WebDAV d i r e c t o r y h e r e 16 dirname ( FILE ) . ’ / backend ’ 17 ); 18 19 $ s e r v e r − andle ( $backend ) ; >h
  • 87. Connecting web and desktop: WebDAV 37 / 49 WebDAV server with locking 1 require once ’ c u s t o m l o c k a u t h . php ’ ; 2 3 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 4 5 $ s e r v e r − u t h = new myCustomLockAuth ( >a 6 // Some c o n f i g u r a t i o n d i r e c t o r y h e r e 7 dirname ( FILE ) . ’ / t o k e n s . php ’ 8 ); 9 10 $server− luginRegistry− e g i s t e r P l u g i n ( >p >r 11 new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( ) 12 ); 13 14 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 15 // Your WebDAV d i r e c t o r y h e r e 16 dirname ( FILE ) . ’ / backend ’ 17 ); 18 19 $ s e r v e r − andle ( $backend ) ; >h
  • 88. Connecting web and desktop: WebDAV 37 / 49 WebDAV server with locking 1 require once ’ c u s t o m l o c k a u t h . php ’ ; 2 3 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 4 5 $ s e r v e r − u t h = new myCustomLockAuth ( >a 6 // Some c o n f i g u r a t i o n d i r e c t o r y h e r e 7 dirname ( FILE ) . ’ / t o k e n s . php ’ 8 ); 9 10 $server− luginRegistry− e g i s t e r P l u g i n ( >p >r 11 new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( ) 12 ); 13 14 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 15 // Your WebDAV d i r e c t o r y h e r e 16 dirname ( FILE ) . ’ / backend ’ 17 ); 18 19 $ s e r v e r − andle ( $backend ) ; >h
  • 89. Connecting web and desktop: WebDAV 37 / 49 WebDAV server with locking 1 require once ’ c u s t o m l o c k a u t h . php ’ ; 2 3 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 4 5 $ s e r v e r − u t h = new myCustomLockAuth ( >a 6 // Some c o n f i g u r a t i o n d i r e c t o r y h e r e 7 dirname ( FILE ) . ’ / t o k e n s . php ’ 8 ); 9 10 $server− luginRegistry− e g i s t e r P l u g i n ( >p >r 11 new e z c W e b d a v L o c k P l u g i n C o n f i g u r a t i o n ( ) 12 ); 13 14 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 15 // Your WebDAV d i r e c t o r y h e r e 16 dirname ( FILE ) . ’ / backend ’ 17 ); 18 19 $ s e r v e r − andle ( $backend ) ; >h
  • 90. Connecting web and desktop: WebDAV 38 / 49 Authentication 1 i n t e r f a c e ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ; 4 } 1 i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ; 4 } 1 i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ; 4 }
  • 91. Connecting web and desktop: WebDAV 38 / 49 Authentication 1 i n t e r f a c e ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ; 4 } 1 i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ; 4 } 1 i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ; 4 }
  • 92. Connecting web and desktop: WebDAV 38 / 49 Authentication 1 i n t e r f a c e ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ; 4 } 1 i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ; 4 } 1 i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ; 4 }
  • 93. Connecting web and desktop: WebDAV 38 / 49 Authentication 1 i n t e r f a c e ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e A n o n y m o u s ( ezcWebdavAnonymousAuth $ d a t a ) ; 4 } 1 i n t e r f a c e ezcWebdavBasicAuthenticator e x t e n d s ezcWebdavAnonymousAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e B a s i c ( ezcWebdavBasicAuth $data ) ; 4 } 1 i n t e r f a c e ezcWebdavDigestAuthenticator extends ezcWebdavBasicAuthenticator 2 { 3 p u b l i c f u n c t i o n a u t h e n t i c a t e D i g e s t ( ezcWebdavDigestAuth $data ) ; 4 }
  • 94. Connecting web and desktop: WebDAV 39 / 49 Authorization 1 i n t e r f a c e ezcWebdavAuthorizer 2 { 3 c o n s t ACCESS READ = 1 ; 4 c o n s t ACCESS WRITE = 2 ; 5 6 p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ; 7 } 1 i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer 2 { 3 p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ; 4 5 p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ; 6 7 p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ; 8 }
  • 95. Connecting web and desktop: WebDAV 39 / 49 Authorization 1 i n t e r f a c e ezcWebdavAuthorizer 2 { 3 c o n s t ACCESS READ = 1 ; 4 c o n s t ACCESS WRITE = 2 ; 5 6 p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ; 7 } 1 i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer 2 { 3 p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ; 4 5 p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ; 6 7 p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ; 8 }
  • 96. Connecting web and desktop: WebDAV 39 / 49 Authorization 1 i n t e r f a c e ezcWebdavAuthorizer 2 { 3 c o n s t ACCESS READ = 1 ; 4 c o n s t ACCESS WRITE = 2 ; 5 6 p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ; 7 } 1 i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer 2 { 3 p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ; 4 5 p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ; 6 7 p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ; 8 }
  • 97. Connecting web and desktop: WebDAV 39 / 49 Authorization 1 i n t e r f a c e ezcWebdavAuthorizer 2 { 3 c o n s t ACCESS READ = 1 ; 4 c o n s t ACCESS WRITE = 2 ; 5 6 p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ; 7 } 1 i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer 2 { 3 p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ; 4 5 p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ; 6 7 p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ; 8 }
  • 98. Connecting web and desktop: WebDAV 39 / 49 Authorization 1 i n t e r f a c e ezcWebdavAuthorizer 2 { 3 c o n s t ACCESS READ = 1 ; 4 c o n s t ACCESS WRITE = 2 ; 5 6 p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ; 7 } 1 i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer 2 { 3 p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ; 4 5 p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ; 6 7 p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ; 8 }
  • 99. Connecting web and desktop: WebDAV 39 / 49 Authorization 1 i n t e r f a c e ezcWebdavAuthorizer 2 { 3 c o n s t ACCESS READ = 1 ; 4 c o n s t ACCESS WRITE = 2 ; 5 6 p u b l i c f u n c t i o n a u t h o r i z e ( $ u s e r , $path , $ a c c e s s = s e l f : : ACCESS READ ) ; 7 } 1 i n t e r f a c e ezcWebdavLockAuthorizer extends ezcWebdavAuthorizer 2 { 3 p u b l i c f u n c t i o n assignLock ( $user , $lockToken ) ; 4 5 p u b l i c f u n c t i o n ownsLock ( $ u s e r , $ l o c k T o k e n ) ; 6 7 p u b l i c f u n c t i o n r e l e a s e L o c k ( $user , $lockToken ) ; 8 }
  • 100. Connecting web and desktop: WebDAV 40 / 49 Outline Zeta Webdav component Background Usage Customization End note
  • 101. Connecting web and desktop: WebDAV 41 / 49 Path handling 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 3 $ p a t h F a c t o r y = new e z c W e b d a v B a s i c P a t h F a c t o r y ( 4 ’ h t t p : / / e x a m p l e . com/ webdav / i n d e x . php ’ 5 ); 6 7 foreach ( $server− o n f i g u r a t i o n s as $conf ) >c 8 { 9 $ c o n f− a t h F a c t o r y = $ p a t h F a c t o r y ; >p 10 } 11 12 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 13 dirname ( FILE ) . ’ / backend ’ 14 ); 15 16 $ s e r v e r − andle ( $backend ) ; >h
  • 102. Connecting web and desktop: WebDAV 41 / 49 Path handling 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 3 $ p a t h F a c t o r y = new e z c W e b d a v B a s i c P a t h F a c t o r y ( 4 ’ h t t p : / / e x a m p l e . com/ webdav / i n d e x . php ’ 5 ); 6 7 foreach ( $server− o n f i g u r a t i o n s as $conf ) >c 8 { 9 $ c o n f− a t h F a c t o r y = $ p a t h F a c t o r y ; >p 10 } 11 12 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 13 dirname ( FILE ) . ’ / backend ’ 14 ); 15 16 $ s e r v e r − andle ( $backend ) ; >h
  • 103. Connecting web and desktop: WebDAV 41 / 49 Path handling 1 $ s e r v e r = ezcWebdavServer : : g e t I n s t a n c e ( ) ; 2 3 $ p a t h F a c t o r y = new e z c W e b d a v B a s i c P a t h F a c t o r y ( 4 ’ h t t p : / / e x a m p l e . com/ webdav / i n d e x . php ’ 5 ); 6 7 foreach ( $server− o n f i g u r a t i o n s as $conf ) >c 8 { 9 $ c o n f− a t h F a c t o r y = $ p a t h F a c t o r y ; >p 10 } 11 12 $ b a c k e n d = new e z c W e b d a v F i l e B a c k e n d ( 13 dirname ( FILE ) . ’ / backend ’ 14 ); 15 16 $ s e r v e r − andle ( $backend ) ; >h
  • 104. Connecting web and desktop: WebDAV 42 / 49 The back end ezcWebdavFileBackend ezcWebdavMemoryBackend Write your own ezcWebdavSimpleBackend ezcWebdavBackend ezcWebdavBackendPut ezcWebdavBackendChange ezcWebdavBackendMakeCollection ezcWebdavLockBackend
  • 105. Connecting web and desktop: WebDAV 42 / 49 The back end ezcWebdavFileBackend ezcWebdavMemoryBackend Write your own ezcWebdavSimpleBackend ezcWebdavBackend ezcWebdavBackendPut ezcWebdavBackendChange ezcWebdavBackendMakeCollection ezcWebdavLockBackend
  • 106. Connecting web and desktop: WebDAV 42 / 49 The back end ezcWebdavFileBackend ezcWebdavMemoryBackend Write your own ezcWebdavSimpleBackend ezcWebdavBackend ezcWebdavBackendPut ezcWebdavBackendChange ezcWebdavBackendMakeCollection ezcWebdavLockBackend
  • 107. Connecting web and desktop: WebDAV 42 / 49 The back end ezcWebdavFileBackend ezcWebdavMemoryBackend Write your own ezcWebdavSimpleBackend ezcWebdavBackend ezcWebdavBackendPut ezcWebdavBackendChange ezcWebdavBackendMakeCollection ezcWebdavLockBackend
  • 108. Connecting web and desktop: WebDAV 43 / 49 ezcWebdavSimpleBackend Proper method handling Authorization Handling of If[-*] headers about 1600 LOC No deeper knowledge on WebDAV required
  • 109. Connecting web and desktop: WebDAV 44 / 49 New clients Adjust transport layer Needs some patience Use Wireshark! Extend one or more of ezcWebdavTransport ezcWebdavHeaderHandler ezcWebdavPropertyHandler
  • 110. Connecting web and desktop: WebDAV 44 / 49 New clients Adjust transport layer Needs some patience Use Wireshark! Extend one or more of ezcWebdavTransport ezcWebdavHeaderHandler ezcWebdavPropertyHandler 1 $ n e w C l i e n t C o n f = new e z c W e b d a v S e r v e r C o n f i g u r a t i o n ( 2 ’ (My. ∗ Webdav s+C l i e n g t ) i ’ , 3 ’ myCustomTransportTransport ’ 4 // . . . 5 ); 6 7 $server− o n f i g u r a t i o n s − n s e r t B e f o r e ( $newClientConf , 0 ) ; >c >i
  • 111. Connecting web and desktop: WebDAV 44 / 49 New clients Adjust transport layer Needs some patience Use Wireshark! Extend one or more of ezcWebdavTransport ezcWebdavHeaderHandler ezcWebdavPropertyHandler 1 $ n e w C l i e n t C o n f = new e z c W e b d a v S e r v e r C o n f i g u r a t i o n ( 2 ’ (My. ∗ Webdav s+C l i e n g t ) i ’ , 3 ’ myCustomTransportTransport ’ 4 // . . . 5 ); 6 7 $server− o n f i g u r a t i o n s − n s e r t B e f o r e ( $newClientConf , 0 ) ; >c >i
  • 112. Connecting web and desktop: WebDAV 45 / 49 Plugins Hook into requests / responses Handle unknown requests Issue unknown responses Send requests to the back end
  • 113. Connecting web and desktop: WebDAV 46 / 49 Outline Zeta Webdav component Background Usage Customization End note
  • 114. Connecting web and desktop: WebDAV 47 / 49 Join the team! Come and contribute! Highly technical discussions Open minded people Apache Software Foundation http://zeta-components.org
  • 115. Connecting web and desktop: WebDAV 48 / 49 Q/A Are there any questions left?
  • 116. Connecting web and desktop: WebDAV 49 / 49 Thanks for listening Please rate this talk at http://joind.in/2808 and / or give me some feedback right now!
  • 117. Connecting web and desktop: WebDAV 49 / 49 Thanks for listening Please rate this talk at http://joind.in/2808 and / or give me some feedback right now! This is very important for . . . Speakers Organizers You!
  • 118. Connecting web and desktop: WebDAV 49 / 49 Thanks for listening Please rate this talk at http://joind.in/2808 and / or give me some feedback right now! Stay in touch Tobias Schlitt toby@qafoo.com @tobySen / @qafoo Rent a PHP quality expert: http://qafoo.com