SlideShare uma empresa Scribd logo
1 de 13
Baixar para ler offline
tabulatr2 
Index Pages for Lazy People… 
Florian Thomas 
ft@tickettoaster.de 
@crunch09 
Peter Horn 
ph@tickettoaster.de 
@n0dashes 
Lightning Talk 
Oct 3rd 2014
Classic Index Page 
index.html.slim 
simple ‘nuf 
tr 
th Firstname 
th Lastname 
th Balance 
@customers.each do |customer| 
tr 
td= customer.firstname 
td= customer.lastname 
td= customer.balance 
customer_controller.rb 
def index 
@customers = Customer.all 
end
Classic Index Page 
Lovely! 
Just quickly add 
• Pagination 
• Filtering 
• Sorting 
• Searching 
index.html.slim 
simple ‘nuf 
tr 
th Firstname 
th Lastname 
th Balance 
@customers.each do |customer| 
tr 
td= customer.firstname 
td= customer.lastname 
td= customer.balance 
customer_controller.rb 
def index 
@customers = Customer.all 
end 
• Batch Actions 
…and we’re done.
Classic Index Page 
Lovely! 
Just quickly add 
• Pagination 
• Filtering 
• Sorting 
• Searching 
index.html.slim 
simple ‘nuf 
tr 
th Firstname 
th Lastname 
th Balance 
@customers.each do |customer| 
tr 
td= customer.firstname 
td= customer.lastname 
td= customer.balance 
customer_controller.rb 
def index 
@customers = Customer.all 
end 
• Batch Actions 
…and we’re done.
That can’t be! 
• ActiveRecord is so simple (and even adequate) 
• SimpleForm is so simple! 
Why need tables to be such a hazzle?
That can’t be! 
Because a friggin’ lot of stuff 
is involved. 
…but now 
• ActiveRecord is so simple (and even adequate) 
• SimpleForm is so simple! 
…there’s tabulatr2! 
Why need tables to be such a hazzle?
Tabulatr Index Page 
index.html.slim 
= table_for Customer 
customer_controller.rb 
def index 
tabulatr_for Customer 
end 
customer_tabulatr_data.rb 
class CustomerTabulatrData < 
Tabulatr::Data 
! 
search :firstname, :lastname 
column :firstname 
column :lastname 
column :balance, 
format: :currency, 
align: :right 
end
Tabulatr Index Page 
index.html.slim 
= table_for Customer 
customer_controller.rb 
def index 
tabulatr_for Customer 
end 
customer_tabulatr_data.rb 
class CustomerTabulatrData < 
Tabulatr::Data 
! 
search :firstname, :lastname 
column :firstname 
column :lastname 
column :balance, 
format: :currency, 
align: :right 
end
There’s so much more 
• All data is fetched via ajax 
• Custom SQL for sorting, filtering, sorting, no N + 1 
• Tables are (by default) stateful 
• Infinite scrolling, if you so wish 
• Shortcuts to create ‘action’ buttons 
• Support for static tables (non-ajax) 
• Batch actions 
• …
How Does That Work? 
(rough concept only) 
Controller 
Renderer 
DSL 
Javascript 
View 
TabulatrData
122.54% Cooler!* 
✴ Based on a study with 4 developers that took place 
between October 1st and October 2rd 2014 in 
some pubs in Ghent. There definitely was too much 
alcohol involved, and the number is made up 
anyway, but things look so much more professional 
with a footnote.
Sparklelord demands: 
Give it a try! 
Talk to us! 
@n0dashes / no-dashes! 
@crunch09 / Crunch09 
github.com/provideal/tabulatr2

Mais conteúdo relacionado

Semelhante a tabulatr2 – Index Tables for Lazy People

Checklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptxChecklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptx
DexterityDev
 

Semelhante a tabulatr2 – Index Tables for Lazy People (20)

VSSML18. Data Transformations
VSSML18. Data TransformationsVSSML18. Data Transformations
VSSML18. Data Transformations
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
 
Checklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptxChecklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptx
 
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptx
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptx
 
Relational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptxRelational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptx
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming
 
Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
 
Deep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDBDeep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDB
 
Dbms &amp; oracle
Dbms &amp; oracleDbms &amp; oracle
Dbms &amp; oracle
 
60 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 201860 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 2018
 
SQL intro.pptx
SQL intro.pptxSQL intro.pptx
SQL intro.pptx
 
Data Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingData Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional Modeling
 
Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecord
 
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowHands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
 

Último

Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
David Celestin
 
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven CuriosityUnlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Hung Le
 
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
ZurliaSoop
 

Último (17)

in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait Cityin kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 
Zone Chairperson Role and Responsibilities New updated.pptx
Zone Chairperson Role and Responsibilities New updated.pptxZone Chairperson Role and Responsibilities New updated.pptx
Zone Chairperson Role and Responsibilities New updated.pptx
 
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven CuriosityUnlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
 
Introduction to Artificial intelligence.
Introduction to Artificial intelligence.Introduction to Artificial intelligence.
Introduction to Artificial intelligence.
 
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 

tabulatr2 – Index Tables for Lazy People

  • 1. tabulatr2 Index Pages for Lazy People… Florian Thomas ft@tickettoaster.de @crunch09 Peter Horn ph@tickettoaster.de @n0dashes Lightning Talk Oct 3rd 2014
  • 2.
  • 3. Classic Index Page index.html.slim simple ‘nuf tr th Firstname th Lastname th Balance @customers.each do |customer| tr td= customer.firstname td= customer.lastname td= customer.balance customer_controller.rb def index @customers = Customer.all end
  • 4. Classic Index Page Lovely! Just quickly add • Pagination • Filtering • Sorting • Searching index.html.slim simple ‘nuf tr th Firstname th Lastname th Balance @customers.each do |customer| tr td= customer.firstname td= customer.lastname td= customer.balance customer_controller.rb def index @customers = Customer.all end • Batch Actions …and we’re done.
  • 5. Classic Index Page Lovely! Just quickly add • Pagination • Filtering • Sorting • Searching index.html.slim simple ‘nuf tr th Firstname th Lastname th Balance @customers.each do |customer| tr td= customer.firstname td= customer.lastname td= customer.balance customer_controller.rb def index @customers = Customer.all end • Batch Actions …and we’re done.
  • 6. That can’t be! • ActiveRecord is so simple (and even adequate) • SimpleForm is so simple! Why need tables to be such a hazzle?
  • 7. That can’t be! Because a friggin’ lot of stuff is involved. …but now • ActiveRecord is so simple (and even adequate) • SimpleForm is so simple! …there’s tabulatr2! Why need tables to be such a hazzle?
  • 8. Tabulatr Index Page index.html.slim = table_for Customer customer_controller.rb def index tabulatr_for Customer end customer_tabulatr_data.rb class CustomerTabulatrData < Tabulatr::Data ! search :firstname, :lastname column :firstname column :lastname column :balance, format: :currency, align: :right end
  • 9. Tabulatr Index Page index.html.slim = table_for Customer customer_controller.rb def index tabulatr_for Customer end customer_tabulatr_data.rb class CustomerTabulatrData < Tabulatr::Data ! search :firstname, :lastname column :firstname column :lastname column :balance, format: :currency, align: :right end
  • 10. There’s so much more • All data is fetched via ajax • Custom SQL for sorting, filtering, sorting, no N + 1 • Tables are (by default) stateful • Infinite scrolling, if you so wish • Shortcuts to create ‘action’ buttons • Support for static tables (non-ajax) • Batch actions • …
  • 11. How Does That Work? (rough concept only) Controller Renderer DSL Javascript View TabulatrData
  • 12. 122.54% Cooler!* ✴ Based on a study with 4 developers that took place between October 1st and October 2rd 2014 in some pubs in Ghent. There definitely was too much alcohol involved, and the number is made up anyway, but things look so much more professional with a footnote.
  • 13. Sparklelord demands: Give it a try! Talk to us! @n0dashes / no-dashes! @crunch09 / Crunch09 github.com/provideal/tabulatr2