SlideShare una empresa de Scribd logo
1 de 23
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Hello world
Hello worldHello world
Hello world
hemi46h
 

La actualidad más candente (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
 

Destacado (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入門
 

Similar a 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
 

Similar a 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
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

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