SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Pamela
bringing back the pleasure
  of hand-written HTML

         Sébastien Pierre, Datalicious
         @Montréal Python 8, Jul. 2009
www.datalicious.ca | github.com/sebastien/pamela
Less
 Is
More
Less Typing
      Is
More Thinking
 (and faster prototyping)
As designers
we need to turn an idea
    into a prototype
         FAST !
Plain HTML



Too Many Typos
     with
Big documents
Plain HTML



Too Much Typing
     with
 Modern HTML
Modern HTML
                               <html>
                                <body>
                                 <div class="section">
<html>                            <div class="header">
 <body>                             <h1 class="title">My First
  <h1>My First HTML Page<h1>   HTML Page</h1>
  Hello, World !                  </div>
 </body>                          <div class="content">
</html>                             Hello, World !
                                  </div>
                                 </div>
                                </body>
                               </html>
Modern HTML               We add a lot more
                                              <div>s and <span>s
                                               to hook CSS rules

                               <html>
                                <body>
                                 <div class="section">
<html>                            <div class="header">
 <body>                             <h1 class="title">My First
  <h1>My First HTML Page<h1>   HTML Page</h1>
  Hello, World !                  </div>
 </body>                          <div class="content">
</html>                             Hello, World !
                                  </div>
                                 </div>
                                </body>
                               </html>
Modern HTML
                                              <html>
                                               <body>
                                                <div class="section">
<html>                                           <div class="header">
 <body>                                            <h1 class="title">My First
  <h1>My First HTML Page<h1>                  HTML Page</h1>
  Hello, World !                                 </div>
 </body>              Which means
                                                 <div class="content">
</html>              more chances of               Hello, World !
                        forgetting to close      </div>
                        a <div> or <span>
                                                </div>
                                               </body>
                                              </html>
Pamela :
simply syntax sugar for html
       (not a templating language)
Feature 1: Indentation-based

  Python does it well
  No more oops, I forget to close my <div>


<html
| <body
| | <h1:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela <a(href=http://github.com/sebastien/pamela):here>
Feature 1: Indentation-based

  Python does it well
  No more oops, I forget to close my <div>

    Here the Python-style indentation

<html
| <body
| | <h1:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela <a(href=http://github.com/sebastien/pamela):here>
Feature 1: Indentation-based

  Python does it well
  No more oops, I forget to close my <div>

                                    We use a
                                  small variant
<html                      of the HTML element syntax
| <body
| | <h1:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela <a(href=http://github.com/sebastien/pamela):here>
                      <a href=http://github.com/sebastien/pamela>here</a>
Feature 1: Indentation-based

  Python does it well
  No more oops, I forget to close my <div>


<html
| <body
| | <h1:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela <a(href=http://github.com/sebastien/pamela):here>
                                 <a href=http://github.com/sebastien/pamela>here</a>

             # EOF
  No explicit closing needed !
Feature 2 : ID and CSS shorthands

  Classes and IDs used a lot by JS libs (jQuery, Prototype,          )

  We use them a lot with CSS frameworks (Blueprint, 960,...)


<div#content
| <div.section
| | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela
| | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>
Feature 2 : ID and CSS shorthands

  Classes and IDs used a lot by JS libs (jQuery, Prototype,          )

  We use them a lot with CSS frameworks (Blueprint, 960,...)
                      IDs are denoted
                     as in CSS selectors
                       #<ID_NAME>
<div#content
| <div.section
| | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela
| | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>
Feature 2 : ID and CSS shorthands

  Classes and IDs used a lot by JS libs (jQuery, Prototype,          )

  We use them a lot with CSS frameworks (Blueprint, 960,...)

                    Same for classes
<div#content        .<CLASS_NAME>
| <div.section
| | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela
| | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>
Feature 2 : ID and CSS shorthands

  Classes and IDs used a lot by JS libs (jQuery, Prototype,          )

  We use them a lot with CSS frameworks (Blueprint, 960,...)


<div#content
| <div.section
| | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML !
| | Check out Pamela
| | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>


    You can mix classes and ID,
      ID always comes first
Pamela in Practice
Pamela in Practice
Pamela in Practice
Pamela in a Nutshell

Faithful to HTML/CSS
  Syntax is a variant of HTML, using CSS selector conventions

Less errors, more time
  Python-style indentation and shorthands make you safer and faster

Flexible
  Can be used as a command-line processor or as a Python module

Powerful
  Manage whitespace, include files, add variables   and more !
The end



     Thank you !
www.github.com/sebastien/pamela
         www.datalicious.ca
       sebastien@datalicious.ca

Contenu connexe

Tendances

Hello world
Hello worldHello world
Hello world
hemi46h
 

Tendances (19)

Please dont touch-3.6-jsday
Please dont touch-3.6-jsdayPlease dont touch-3.6-jsday
Please dont touch-3.6-jsday
 
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
 
Intro to Web Development
Intro to Web DevelopmentIntro to Web Development
Intro to Web Development
 
Teaching Web Frontend Technologies To A Toddler
Teaching Web Frontend Technologies To A ToddlerTeaching Web Frontend Technologies To A Toddler
Teaching Web Frontend Technologies To A Toddler
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
 
Html5 shubelal
Html5 shubelalHtml5 shubelal
Html5 shubelal
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
 
CSS pattern libraries
CSS pattern librariesCSS pattern libraries
CSS pattern libraries
 
Grok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateGrok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb update
 
Hello world
Hello worldHello world
Hello world
 
Up & Running with Polymer
Up & Running with PolymerUp & Running with Polymer
Up & Running with Polymer
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
 
The web context
The web contextThe web context
The web context
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
Nanoc
NanocNanoc
Nanoc
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) Theming
 

En vedette (7)

State Corporations_2009_SF
State Corporations_2009_SFState Corporations_2009_SF
State Corporations_2009_SF
 
Sample research by S.Fomin_PIK_rus
Sample research by S.Fomin_PIK_rusSample research by S.Fomin_PIK_rus
Sample research by S.Fomin_PIK_rus
 
Вводное занятие_СФ_для загрузки
Вводное занятие_СФ_для загрузкиВводное занятие_СФ_для загрузки
Вводное занятие_СФ_для загрузки
 
Turkey
TurkeyTurkey
Turkey
 
Bulletin_2 2009_SF
Bulletin_2 2009_SFBulletin_2 2009_SF
Bulletin_2 2009_SF
 
Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009
 
Java Script入門
Java Script入門Java Script入門
Java Script入門
 

Similaire à Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8

LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
Amanda Case
 
How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
vathur
 

Similaire à Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8 (20)

Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
HTML & CSS 2017
HTML & CSS 2017HTML & CSS 2017
HTML & CSS 2017
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
Web Day-01.pptx
Web Day-01.pptxWeb Day-01.pptx
Web Day-01.pptx
 
Club website demo
Club website demoClub website demo
Club website demo
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Html coding
Html codingHtml coding
Html coding
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
Intermediate Web Design
Intermediate Web DesignIntermediate Web Design
Intermediate Web Design
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html5
Html5Html5
Html5
 
Html intro
Html introHtml intro
Html intro
 
How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8

  • 1. Pamela bringing back the pleasure of hand-written HTML Sébastien Pierre, Datalicious @Montréal Python 8, Jul. 2009 www.datalicious.ca | github.com/sebastien/pamela
  • 3. Less Typing Is More Thinking (and faster prototyping)
  • 4. As designers we need to turn an idea into a prototype FAST !
  • 5. Plain HTML Too Many Typos with Big documents
  • 6. Plain HTML Too Much Typing with Modern HTML
  • 7. Modern HTML <html> <body> <div class="section"> <html> <div class="header"> <body> <h1 class="title">My First <h1>My First HTML Page<h1> HTML Page</h1> Hello, World ! </div> </body> <div class="content"> </html> Hello, World ! </div> </div> </body> </html>
  • 8. Modern HTML We add a lot more <div>s and <span>s to hook CSS rules <html> <body> <div class="section"> <html> <div class="header"> <body> <h1 class="title">My First <h1>My First HTML Page<h1> HTML Page</h1> Hello, World ! </div> </body> <div class="content"> </html> Hello, World ! </div> </div> </body> </html>
  • 9. Modern HTML <html> <body> <div class="section"> <html> <div class="header"> <body> <h1 class="title">My First <h1>My First HTML Page<h1> HTML Page</h1> Hello, World ! </div> </body> Which means <div class="content"> </html> more chances of Hello, World ! forgetting to close </div> a <div> or <span> </div> </body> </html>
  • 10. Pamela : simply syntax sugar for html (not a templating language)
  • 11. Feature 1: Indentation-based Python does it well No more oops, I forget to close my <div> <html | <body | | <h1:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela <a(href=http://github.com/sebastien/pamela):here>
  • 12. Feature 1: Indentation-based Python does it well No more oops, I forget to close my <div> Here the Python-style indentation <html | <body | | <h1:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela <a(href=http://github.com/sebastien/pamela):here>
  • 13. Feature 1: Indentation-based Python does it well No more oops, I forget to close my <div> We use a small variant <html of the HTML element syntax | <body | | <h1:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela <a(href=http://github.com/sebastien/pamela):here> <a href=http://github.com/sebastien/pamela>here</a>
  • 14. Feature 1: Indentation-based Python does it well No more oops, I forget to close my <div> <html | <body | | <h1:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela <a(href=http://github.com/sebastien/pamela):here> <a href=http://github.com/sebastien/pamela>here</a> # EOF No explicit closing needed !
  • 15. Feature 2 : ID and CSS shorthands Classes and IDs used a lot by JS libs (jQuery, Prototype, ) We use them a lot with CSS frameworks (Blueprint, 960,...) <div#content | <div.section | | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela | | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>
  • 16. Feature 2 : ID and CSS shorthands Classes and IDs used a lot by JS libs (jQuery, Prototype, ) We use them a lot with CSS frameworks (Blueprint, 960,...) IDs are denoted as in CSS selectors #<ID_NAME> <div#content | <div.section | | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela | | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>
  • 17. Feature 2 : ID and CSS shorthands Classes and IDs used a lot by JS libs (jQuery, Prototype, ) We use them a lot with CSS frameworks (Blueprint, 960,...) Same for classes <div#content .<CLASS_NAME> | <div.section | | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela | | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here>
  • 18. Feature 2 : ID and CSS shorthands Classes and IDs used a lot by JS libs (jQuery, Prototype, ) We use them a lot with CSS frameworks (Blueprint, 960,...) <div#content | <div.section | | <h1.title:Pamela : Bringing back the pleasure of hand-written HTML ! | | Check out Pamela | | <a#pid.pamela.link(href=http://github.com/sebastien/pamela):here> You can mix classes and ID, ID always comes first
  • 22. Pamela in a Nutshell Faithful to HTML/CSS Syntax is a variant of HTML, using CSS selector conventions Less errors, more time Python-style indentation and shorthands make you safer and faster Flexible Can be used as a command-line processor or as a Python module Powerful Manage whitespace, include files, add variables and more !
  • 23. The end Thank you ! www.github.com/sebastien/pamela www.datalicious.ca sebastien@datalicious.ca