SlideShare a Scribd company logo
DAVVY

DJANGO,WEBDAV E

(PESSIMO) STATO DELL'ARTE
Adriano Di Luzio
Sabato 18 Aprile 2015 - Firenze - PYCONSEI
ABOUT ME
Software Developer - Unbit, Roma
Studente - Informatica Magistrale @ Sapienza
www.github.com/aldur
www.twitter.com/AdrianoDiLuzio
2
DAVVY: IL SOGNO
3
WebDAV
WEBDAV:WHAT?
• Web Distributed Authoring and Versioning [1]
• Estensione di HTTP
• Il web - medium per lettura e scrittura
4
[1] rfc4918
WEBDAV:WHO?
Apple (OS X & iOS clients)
Google (Android Calendars, Contacts)
E molte altre implementazioni.
5
WEBDAV: HOW?
6
HTTP / WebDAV Request
PROPFIND (XML)
HTTP / WebDAV Response
PROPFIND (XML)
HTTP / WebDAV Request
MKCOL
…
HAI DETTO XML?
<D:prop	
  xmlns:D='DAV:'><author	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  xml:lang='en'	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  xmlns:x='http://example.com/ns'	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  xmlns='http://example.com/ns'	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  xmlns:h='http://www.w3.org/1999/xhtml'>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  <x:name>Jane	
  Doe</x:name>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  <x:uri	
  added="2005-­‐11-­‐26"	
  type="email"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  >mailto:jane.doe@example.com</x:uri>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  <x:uri	
  added="2005-­‐11-­‐27"	
  type="web"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  >http://www.example.com</x:uri>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  <x:notes>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Jane	
  has	
  been	
  working	
  way	
  <h:em>too</h:em>	
  long	
  on	
  the	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  long-­‐awaited	
  revision	
  of	
  &lt;RFC2518&gt;.	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  </x:notes>	
  
	
  	
  	
  	
  	
  	
  	
  </author>	
  
	
  	
  	
  	
  	
  </D:prop>
7
XML & HTTP: RICHIESTA
PROPFIND	
  /container/	
  HTTP/1.1	
  
Host:	
  www.example.com	
  
Content-­‐Type:	
  application/xml;	
  charset="utf-­‐8"	
  
Content-­‐Length:	
  xxxx	
  
<?xml	
  version="1.0"	
  encoding="utf-­‐8"	
  ?>	
  
<propfind	
  xmlns="DAV:">	
  
	
  	
  	
  	
  <propname/>	
  
</propfind>
8
XML & HTTP: RISPOSTA
HTTP/1.1	
  207	
  Multi-­‐Status	
  
Content-­‐Type:	
  application/xml;	
  charset="utf-­‐8"	
  
Content-­‐Length:	
  xxxx	
  
<?xml	
  version="1.0"	
  encoding="utf-­‐8"	
  ?>	
  
<multistatus	
  xmlns="DAV:">	
  
	
  	
  <response>	
  
	
  	
  	
  	
  <href>http://www.example.com/container/</href>	
  
	
  	
  	
  	
  <propstat>	
  
	
  	
  	
  	
  	
  	
  <prop	
  xmlns:R="http://ns.example.com/boxschema/">	
  
	
  	
  	
  	
  	
  	
  	
  	
  <R:author/>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <creationdate/>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <displayname/>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <resourcetype/>	
  
	
  	
  	
  	
  	
  	
  </prop>	
  
	
  	
  	
  	
  	
  	
  <status>HTTP/1.1	
  200	
  OK</status>	
  
	
  	
  	
  	
  </propstat>	
  
	
  	
  </response>	
  
<!-­‐-­‐	
  ...	
  -­‐-­‐>	
  	
  
</multistatus>
9
Template
DJANGO & DAVVY
Architettura e paradigmi
10
Model
View
DJANGO & DAVVY
Architettura e paradigmi
10
Model
View
Storage
DJANGO & DAVVY
Architettura e paradigmi
10
Model
View
Storage
DJANGO & DAVVY
Architettura e paradigmi
10
Model
View
Properties
XML → WebDAV
Model → XML
Resources
Collections
DAVVY: DETTAGLI
• Python 2 / Python 3.
• Estendibile a piacimento (Class-View based)
• Condivisione / protezione delle risorse.
11
DAVVY: SET-UP
#	
  settings.py	
  
DAVVY_STORAGE_PATH	
  =	
  '/var/www/davvy'
12
#	
  urls.py	
  
from	
  davvy.base	
  import	
  WebDAV	
  
from	
  davvy.addressbook	
  import	
  CardDAV	
  
from	
  davvy.calendar	
  import	
  CalDAV	
  
urlpatterns	
  =	
  patterns('',	
  
	
  	
  	
  	
  url(r'^principals/(w+)/(.*)',	
  WebDAV.as_view(root='storage')),	
  
	
  	
  	
  	
  url(r'^storage/(w+)/(.*)',	
  WebDAV.as_view(root='storage')),	
  
	
  	
  	
  	
  url(r'^addressbook/(w+)/(.*)',	
  CardDAV.as_view(root='addressbook001')),	
  
	
  	
  	
  	
  url(r'^calendars/(w+)/(.*)',	
  CalDAV.as_view(root='calendars')),	
  
	
  	
  	
  	
  url(r'^admin/',	
  include(admin.site.urls)),	
  
)
DAVVY: CUSTOMDAV
13
class	
  CustomDAV(WebDAV):	
  
	
  	
  	
  def	
  __init__(self,	
  **kwargs):	
  
	
  	
  	
  	
  	
  	
  	
  	
  self.http_method_names	
  =	
  WebDAV.http_method_names	
  +	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ['custom']	
  
	
  	
  	
  	
  	
  	
  	
  	
  super(CalDAV,	
  self).__init__(**kwargs)	
  


	
  	
  	
  def	
  propfind(self,	
  request,	
  user,	
  resource_name):	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  super(CalDAV,	
  self).propfind(	
  
request,	
  user,	
  resource_name,	
  shared=True)	
  
	
  	
  	
  def	
  put(self,	
  request,	
  user,	
  resource_name):	
  
	
  	
  	
  	
  	
  	
  	
  return	
  super(CalDAV,	
  self).put(request,	
  user,	
  resource_name)	
  
	
  	
  	
  #	
  […]	
  
	
  	
  	
  def	
  custom(self,	
  request,	
  user,	
  resource_name):	
  
	
  	
  	
  	
  	
  	
  	
  #	
  A	
  custom	
  HTTP/WebDAV	
  method!	
  
	
  	
  	
  	
  	
  	
  	
  pass	
  
LO STATO DELL’ARTE
L’INCUBO: I CLIENT
14
OS X Calendar MozillaThunderbird
OS X CALENDAR
• Homesets Autodiscovery
• Richieste volanti (PROPFIND /)
• .well-known/{caldav, carddav}
15
MOZILLATHUNDERBIRD
1. Nessun supporto out-of-the-box.
2. Lightning Calendar Extension.
3. Nessun supporto i’ll-build-the-box.
16
I CLIENT: ROUND II
17
OS X Contacts
MozillaThunderbird

+

SOGo
I CLIENT: ROUND III
18
OS X Finder Transmit
SENZA FINE!
19
E NON SIAMO GLI UNICI!
sabre/dav
20
owncloudradicale
milton
L’ALTERNATIVA
https://github.com/unbit/spockfs
21
CONCLUSIONI
• Abbiamo imparato molto…
• …soprattutto a stare lontani da WebDAV!
• Nonostante questo, Davvy funziona!
• Almeno fino al prossimo giro di client.
22
GRAZIE PER L’ATTENZIONE.

DOMANDE?
23
https://github.com/unbit/davvy/
CREDITI RISORSE GRAFICHE
• http://www.kameleon.pics/
• http://icons8.com/
24

More Related Content

PDF
RESTful Web Services in Drupal7
PPT
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
PDF
Services in Drupal 8
KEY
Doing Things the WordPress Way
PPTX
File upload for the 21st century
PPTX
PDF
CORS review
PDF
Your rest api using laravel
RESTful Web Services in Drupal7
Hanoi php day 2008 - 05. nguyen hai nhat huy - building-restful-web-service-w...
Services in Drupal 8
Doing Things the WordPress Way
File upload for the 21st century
CORS review
Your rest api using laravel

What's hot (20)

PPT
Php basic for vit university
ODP
PHP BASIC PRESENTATION
PPT
PHP file
PPT
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PPT
File Upload
PPTX
Php basics
PPTX
Uploading a file with php
PDF
Mengembalikan data yang terhapus atau rusak pada hardisk menggunakan ubuntu
PPTX
Rits Brown Bag - PHP & PHPMyAdmin
PPT
Php File Operations
ODP
REST API Laravel
ODP
Php File Upload
PDF
The A to Z of developing for the web
PPT
eZ Publish Cluster Unleashed
DOC
ZH爱丽丝梦游仙境
PDF
JSOP in 60 seconds
PDF
Laporan setting dns
PDF
Apache2 BootCamp : Using Apache to Serve Static Content
PDF
Reactをproductionに導入して変わったこと
KEY
いろいろ
Php basic for vit university
PHP BASIC PRESENTATION
PHP file
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
File Upload
Php basics
Uploading a file with php
Mengembalikan data yang terhapus atau rusak pada hardisk menggunakan ubuntu
Rits Brown Bag - PHP & PHPMyAdmin
Php File Operations
REST API Laravel
Php File Upload
The A to Z of developing for the web
eZ Publish Cluster Unleashed
ZH爱丽丝梦游仙境
JSOP in 60 seconds
Laporan setting dns
Apache2 BootCamp : Using Apache to Serve Static Content
Reactをproductionに導入して変わったこと
いろいろ
Ad

Viewers also liked (13)

PPTX
Bracelets & Bangles by Kunwar Danish (Dan)
PPTX
Valdez multimedia project_11
PPTX
CMHF powerpoint
PDF
Guillermo_Rodriguez-Portfolio-2015
PDF
How Much E-Waste Do We Produce Globally?
DOCX
Immanuel Leduaba cv Latest
PPTX
Oportunidades para el empleo y el emprendimiento verde
PDF
Smart phone based robotic control for surveillance applications
PPTX
Diadeem roodstaart powerpoint
PDF
Catálogo Nectar Sunglasses
PDF
นิทรรศการพระสิทธิธาดา
PDF
Dps crime
Bracelets & Bangles by Kunwar Danish (Dan)
Valdez multimedia project_11
CMHF powerpoint
Guillermo_Rodriguez-Portfolio-2015
How Much E-Waste Do We Produce Globally?
Immanuel Leduaba cv Latest
Oportunidades para el empleo y el emprendimiento verde
Smart phone based robotic control for surveillance applications
Diadeem roodstaart powerpoint
Catálogo Nectar Sunglasses
นิทรรศการพระสิทธิธาดา
Dps crime
Ad

Similar to Adriano Di Luzio - Davvy - PyconSEI Talk (9)

PPT
WebDAV and DeltaV: Collaborative Authoring, Versioning, and Configuration Man...
PDF
REST Introduction (PHP London)
PDF
WordPress APIs
PDF
Connecting web Applications with Desktop, confoo 2011
PDF
Connecting Web Application and Desktop, confoo 2011, qafoo
PPT
What is WebDAV - uploaded by Murali Krishna Nookella
PDF
JugTAAS ReSTful
PDF
WebDAV - April 15 2008
PPTX
Rapi::Blog talk - TPC 2017
WebDAV and DeltaV: Collaborative Authoring, Versioning, and Configuration Man...
REST Introduction (PHP London)
WordPress APIs
Connecting web Applications with Desktop, confoo 2011
Connecting Web Application and Desktop, confoo 2011, qafoo
What is WebDAV - uploaded by Murali Krishna Nookella
JugTAAS ReSTful
WebDAV - April 15 2008
Rapi::Blog talk - TPC 2017

Recently uploaded (20)

PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPT
Introduction Database Management System for Course Database
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
ai tools demonstartion for schools and inter college
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
medical staffing services at VALiNTRY
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
top salesforce developer skills in 2025.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
CHAPTER 2 - PM Management and IT Context
wealthsignaloriginal-com-DS-text-... (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Introduction Database Management System for Course Database
Digital Systems & Binary Numbers (comprehensive )
ai tools demonstartion for schools and inter college
Odoo Companies in India – Driving Business Transformation.pdf
medical staffing services at VALiNTRY
VVF-Customer-Presentation2025-Ver1.9.pptx
Operating system designcfffgfgggggggvggggggggg
2025 Textile ERP Trends: SAP, Odoo & Oracle
top salesforce developer skills in 2025.pdf
How to Migrate SBCGlobal Email to Yahoo Easily

Adriano Di Luzio - Davvy - PyconSEI Talk

  • 1. DAVVY
 DJANGO,WEBDAV E
 (PESSIMO) STATO DELL'ARTE Adriano Di Luzio Sabato 18 Aprile 2015 - Firenze - PYCONSEI
  • 2. ABOUT ME Software Developer - Unbit, Roma Studente - Informatica Magistrale @ Sapienza www.github.com/aldur www.twitter.com/AdrianoDiLuzio 2
  • 4. WEBDAV:WHAT? • Web Distributed Authoring and Versioning [1] • Estensione di HTTP • Il web - medium per lettura e scrittura 4 [1] rfc4918
  • 5. WEBDAV:WHO? Apple (OS X & iOS clients) Google (Android Calendars, Contacts) E molte altre implementazioni. 5
  • 6. WEBDAV: HOW? 6 HTTP / WebDAV Request PROPFIND (XML) HTTP / WebDAV Response PROPFIND (XML) HTTP / WebDAV Request MKCOL …
  • 7. HAI DETTO XML? <D:prop  xmlns:D='DAV:'><author                            xml:lang='en'                            xmlns:x='http://example.com/ns'                            xmlns='http://example.com/ns'                            xmlns:h='http://www.w3.org/1999/xhtml'>                    <x:name>Jane  Doe</x:name>                    <x:uri  added="2005-­‐11-­‐26"  type="email"                        >mailto:jane.doe@example.com</x:uri>                    <x:uri  added="2005-­‐11-­‐27"  type="web"                        >http://www.example.com</x:uri>                    <x:notes>                        Jane  has  been  working  way  <h:em>too</h:em>  long  on  the                        long-­‐awaited  revision  of  &lt;RFC2518&gt;.                    </x:notes>                </author>            </D:prop> 7
  • 8. XML & HTTP: RICHIESTA PROPFIND  /container/  HTTP/1.1   Host:  www.example.com   Content-­‐Type:  application/xml;  charset="utf-­‐8"   Content-­‐Length:  xxxx   <?xml  version="1.0"  encoding="utf-­‐8"  ?>   <propfind  xmlns="DAV:">          <propname/>   </propfind> 8
  • 9. XML & HTTP: RISPOSTA HTTP/1.1  207  Multi-­‐Status   Content-­‐Type:  application/xml;  charset="utf-­‐8"   Content-­‐Length:  xxxx   <?xml  version="1.0"  encoding="utf-­‐8"  ?>   <multistatus  xmlns="DAV:">      <response>          <href>http://www.example.com/container/</href>          <propstat>              <prop  xmlns:R="http://ns.example.com/boxschema/">                  <R:author/>                  <creationdate/>                  <displayname/>                  <resourcetype/>              </prop>              <status>HTTP/1.1  200  OK</status>          </propstat>      </response>   <!-­‐-­‐  ...  -­‐-­‐>     </multistatus> 9
  • 10. Template DJANGO & DAVVY Architettura e paradigmi 10 Model View
  • 11. DJANGO & DAVVY Architettura e paradigmi 10 Model View
  • 12. Storage DJANGO & DAVVY Architettura e paradigmi 10 Model View
  • 13. Storage DJANGO & DAVVY Architettura e paradigmi 10 Model View Properties XML → WebDAV Model → XML Resources Collections
  • 14. DAVVY: DETTAGLI • Python 2 / Python 3. • Estendibile a piacimento (Class-View based) • Condivisione / protezione delle risorse. 11
  • 15. DAVVY: SET-UP #  settings.py   DAVVY_STORAGE_PATH  =  '/var/www/davvy' 12 #  urls.py   from  davvy.base  import  WebDAV   from  davvy.addressbook  import  CardDAV   from  davvy.calendar  import  CalDAV   urlpatterns  =  patterns('',          url(r'^principals/(w+)/(.*)',  WebDAV.as_view(root='storage')),          url(r'^storage/(w+)/(.*)',  WebDAV.as_view(root='storage')),          url(r'^addressbook/(w+)/(.*)',  CardDAV.as_view(root='addressbook001')),          url(r'^calendars/(w+)/(.*)',  CalDAV.as_view(root='calendars')),          url(r'^admin/',  include(admin.site.urls)),   )
  • 16. DAVVY: CUSTOMDAV 13 class  CustomDAV(WebDAV):        def  __init__(self,  **kwargs):                  self.http_method_names  =  WebDAV.http_method_names  +                            ['custom']                  super(CalDAV,  self).__init__(**kwargs)   
      def  propfind(self,  request,  user,  resource_name):                  return  super(CalDAV,  self).propfind(   request,  user,  resource_name,  shared=True)        def  put(self,  request,  user,  resource_name):                return  super(CalDAV,  self).put(request,  user,  resource_name)        #  […]        def  custom(self,  request,  user,  resource_name):                #  A  custom  HTTP/WebDAV  method!                pass  
  • 17. LO STATO DELL’ARTE L’INCUBO: I CLIENT 14 OS X Calendar MozillaThunderbird
  • 18. OS X CALENDAR • Homesets Autodiscovery • Richieste volanti (PROPFIND /) • .well-known/{caldav, carddav} 15
  • 19. MOZILLATHUNDERBIRD 1. Nessun supporto out-of-the-box. 2. Lightning Calendar Extension. 3. Nessun supporto i’ll-build-the-box. 16
  • 20. I CLIENT: ROUND II 17 OS X Contacts MozillaThunderbird
 +
 SOGo
  • 21. I CLIENT: ROUND III 18 OS X Finder Transmit
  • 23. E NON SIAMO GLI UNICI! sabre/dav 20 owncloudradicale milton
  • 25. CONCLUSIONI • Abbiamo imparato molto… • …soprattutto a stare lontani da WebDAV! • Nonostante questo, Davvy funziona! • Almeno fino al prossimo giro di client. 22
  • 27. CREDITI RISORSE GRAFICHE • http://www.kameleon.pics/ • http://icons8.com/ 24