SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
Leo i s t i mej
i p lgy e n b .
v ln sm E rs
@YoranBrondsema
A uY a
b to n
o r
Moved to Boston 5 days ago
CTO of Hstry (hiring btw!)
Organizer of Brussels Ember.js meetups
Leo i s t
i p lgy e
v ln sm
For periodic updates in a single-page app
No real-time updates
Used in Hstry because user stays for long time on
same Route
H d smeh p
o o Eb e?
w e rl
Add models to the store and templates update
themselves
E ml
xp
a e
We have P s 's and C m e t
ot
o m n 's
We want to periodically update the new comments
to a post
S w ehc e
h mt o
o
ed
Pollster object
Responsible for setting an interval that periodically
calls an o P l function
nol
ApPlse =EbrOjc.xed{
p.oltr
me.betetn(
sat fnto( {
tr: ucin)
/ PL_NEVLi frisac 3 scns
/ OLITRA s o ntne 0 eod
ti.ie =stnevlti.nolbn(hs,PL_NEVL;
hstmr
eItra(hsoPl.idti) OLITRA)
}
,
so:fnto( {
tp ucin)
cernevlti.ie)
laItra(hstmr;
}
,
oPl:fnto( {
nol ucin)
/ IseJO rqetadaddt t tesoe
/ su SN eus n d aa o h tr
}
};
)
Setup this pollster in the route
ApPsRue=EbrRueetn(
p.otot
me.ot.xed{
stpotolr fnto(otolr mdl {
euCnrle: ucincnrle, oe)
i (me.soeti.e(plse') {
f EbriNn(hsgt'oltr))
ti.e(plse' ApPltrcet(
hsst'oltr, p.ose.rae{
oPl:fnto( {
nol ucin)
/ Dfndo tenx sie
/ eie n h et ld
}
})
);
}
ti.e(plse'.tr(;
hsgt'oltr)sat)
}
,
/ Ti i cle uo eiigteRue
/ hs s ald pn xtn h ot
datvt:fnto( {
eciae ucin)
ti.e(plse'.tp)
hsgt'oltr)so(;
}
};
)
The o P l function
nol
/ Ti cd i eeue i te'euCnrle'ho o teRue
/ hs oe s xctd n h stpotolr ok f h ot
vrrue=ti;
a ot
hs
oPl:fnto( {
nol ucin)
/ AA rqet
/ JX eus
Ebr$gtSN'udts,'E'.hnfnto(snoj {
me..eJO(/pae' GT)te(ucinjo_b)
/ TeJO srcuei a flos
/ h SN tutr s s olw:
/ {
/
/
/ cmet:[
omns
/
/
{..}
. ,
/
/
{..}
. ,
/
/ ]
/ }
/

}

/ Ieaetruhtecmet (OE `me.oEc`cosbosrcmail?
/ trt hog h omns NT: Ebrfrah rs-rwe optbe)
Ebr$ec(snojcmet,fnto(ne,cmet {
me..ahjo_b.omns ucinidx omn)
/ Mk sr ta tecmeti ntarayi tesoe
/ ae ue ht h omn s o led n h tr
i ( ruegt'tr'.eodsoddApCmet cmeti) {
f ! ot.e(soe)rcrILae(p.omn, omn.d)
ruegt'tr'.uh'omn' cmet;
ot.e(soe)ps(cmet, omn)
}
};
)
};
)
Now we have added the data to the store
But the view is not necessarily updated
Need to use the f l e API function
itr
Filters, on the other hand, perform a live search of all of the
records in the store’s cache.
Takes a type and filter function, and returns a live RecordArray
that remains up to date as new records are loaded into the
store or created locally.
Our template
<ril cas"ot>
atce ls=ps"
<2{tte}/2
h>{il}<h>
<>{otn}<p
p{cnet}/>
<sd>{edr"omns cmet}<aie
aie{rne cmet" omns}/sd>
<atce
/ril>
Our controller for the template
ApPsCnrle =EbrOjcCnrle.xed{
p.ototolr
me.betotolretn(
cmet:fnto( {
omns ucin)
vrpsI =ti.e(i';
a otd
hsgt'd)
/ Gtaltecmet ta bln t ti ps
/ e l h omns ht eog o hs ot
rtr ti.e(soe)fle(cmet,fnto(omn){
eun hsgt'tr'.itr'omn' ucincmet
rtr cmetgt'oti' = psI;
eun omn.e(ps.d) = otd
};
)
}poet(
.rpry)
};
)

Each C m e tadded to the Store is automatically
omn
shown
Q so ?
u tn
eis
Based on yoranbrondsema.com/live-polling-system-ember-js
@YoranBrondsema
yoran@hstry.org

Más contenido relacionado

Último

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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 Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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 DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[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.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

A Live Polling System in Ember.js

  • 1. Leo i s t i mej i p lgy e n b . v ln sm E rs @YoranBrondsema
  • 2. A uY a b to n o r Moved to Boston 5 days ago CTO of Hstry (hiring btw!) Organizer of Brussels Ember.js meetups
  • 3. Leo i s t i p lgy e v ln sm For periodic updates in a single-page app No real-time updates Used in Hstry because user stays for long time on same Route
  • 4. H d smeh p o o Eb e? w e rl Add models to the store and templates update themselves
  • 5. E ml xp a e We have P s 's and C m e t ot o m n 's We want to periodically update the new comments to a post
  • 6. S w ehc e h mt o o ed Pollster object Responsible for setting an interval that periodically calls an o P l function nol ApPlse =EbrOjc.xed{ p.oltr me.betetn( sat fnto( { tr: ucin) / PL_NEVLi frisac 3 scns / OLITRA s o ntne 0 eod ti.ie =stnevlti.nolbn(hs,PL_NEVL; hstmr eItra(hsoPl.idti) OLITRA) } , so:fnto( { tp ucin) cernevlti.ie) laItra(hstmr; } , oPl:fnto( { nol ucin) / IseJO rqetadaddt t tesoe / su SN eus n d aa o h tr } }; )
  • 7. Setup this pollster in the route ApPsRue=EbrRueetn( p.otot me.ot.xed{ stpotolr fnto(otolr mdl { euCnrle: ucincnrle, oe) i (me.soeti.e(plse') { f EbriNn(hsgt'oltr)) ti.e(plse' ApPltrcet( hsst'oltr, p.ose.rae{ oPl:fnto( { nol ucin) / Dfndo tenx sie / eie n h et ld } }) ); } ti.e(plse'.tr(; hsgt'oltr)sat) } , / Ti i cle uo eiigteRue / hs s ald pn xtn h ot datvt:fnto( { eciae ucin) ti.e(plse'.tp) hsgt'oltr)so(; } }; )
  • 8. The o P l function nol / Ti cd i eeue i te'euCnrle'ho o teRue / hs oe s xctd n h stpotolr ok f h ot vrrue=ti; a ot hs oPl:fnto( { nol ucin) / AA rqet / JX eus Ebr$gtSN'udts,'E'.hnfnto(snoj { me..eJO(/pae' GT)te(ucinjo_b) / TeJO srcuei a flos / h SN tutr s s olw: / { / / / cmet:[ omns / / {..} . , / / {..} . , / / ] / } / } / Ieaetruhtecmet (OE `me.oEc`cosbosrcmail? / trt hog h omns NT: Ebrfrah rs-rwe optbe) Ebr$ec(snojcmet,fnto(ne,cmet { me..ahjo_b.omns ucinidx omn) / Mk sr ta tecmeti ntarayi tesoe / ae ue ht h omn s o led n h tr i ( ruegt'tr'.eodsoddApCmet cmeti) { f ! ot.e(soe)rcrILae(p.omn, omn.d) ruegt'tr'.uh'omn' cmet; ot.e(soe)ps(cmet, omn) } }; ) }; )
  • 9. Now we have added the data to the store But the view is not necessarily updated Need to use the f l e API function itr Filters, on the other hand, perform a live search of all of the records in the store’s cache. Takes a type and filter function, and returns a live RecordArray that remains up to date as new records are loaded into the store or created locally.
  • 10. Our template <ril cas"ot> atce ls=ps" <2{tte}/2 h>{il}<h> <>{otn}<p p{cnet}/> <sd>{edr"omns cmet}<aie aie{rne cmet" omns}/sd> <atce /ril>
  • 11. Our controller for the template ApPsCnrle =EbrOjcCnrle.xed{ p.ototolr me.betotolretn( cmet:fnto( { omns ucin) vrpsI =ti.e(i'; a otd hsgt'd) / Gtaltecmet ta bln t ti ps / e l h omns ht eog o hs ot rtr ti.e(soe)fle(cmet,fnto(omn){ eun hsgt'tr'.itr'omn' ucincmet rtr cmetgt'oti' = psI; eun omn.e(ps.d) = otd }; ) }poet( .rpry) }; ) Each C m e tadded to the Store is automatically omn shown
  • 12. Q so ? u tn eis Based on yoranbrondsema.com/live-polling-system-ember-js @YoranBrondsema yoran@hstry.org