SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie tabulatr2 – Index Tables for Lazy People

VSSML18. Data Transformations
VSSML18. Data TransformationsVSSML18. Data Transformations
VSSML18. Data TransformationsBigML, Inc
 
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...Cathrine Wilhelmsen
 
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.pptxDexterityDev
 
(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...Amazon Web Services
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptxssuser58c23b
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptxssuser58c23b
 
Relational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptxRelational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptxClaudioCordova10
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven ProgrammingAmazon Web Services
 
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"Thomas Duff
 
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...Cathrine Wilhelmsen
 
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 2018Ike Ellis
 
SQL intro.pptx
SQL intro.pptxSQL intro.pptx
SQL intro.pptxRobNieves1
 
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 ModelingDunn Solutions Group
 
Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014StampedeCon
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecordMark Menard
 
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 WorkflowTreasure Data, Inc.
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfMicrosoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfSkillCertProExams
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnairebazilnaeem7
 
OC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaOC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaRahsaan L. Browne
 
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxDAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxFamilyWorshipCenterD
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.bazilnaeem7
 
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfKinben Innovation Private Limited
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxFamilyWorshipCenterD
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024SkillCertProExams
 
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxMogul Press
 
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfSkillCertProExams
 

Kürzlich hochgeladen (10)

Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfMicrosoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnaire
 
OC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaOC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa Ana
 
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxDAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.
 
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptx
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024
 
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
 
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
 

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