SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
ONE PAGE APP WITH


adam.stipak@gmail.com | @new_POPE
WTF, WHICH TOOL I NEED ???
   Backbone.js
   Ember.js
   Google Closure
   Spine
   jQuery (non FW)
   Este.js (Is it not dead? ;-))
   ...
   No thanks, AngularJS is cool ;-)
WHY ?
Bootstrapping
Module based
Templates
2-way data binding (It's fucking good)
Dependency Injection
Routing
Directives
BOOTSTRAPPING
                     Step 1:
<citsc"i/saglrmnj"<srp>
 srp r=lbj/nua.i.s>/cit


                     Step 2:
<tln-p>
 hm gap


                     Result:
{12}i 3
 {+} s


          I'm using this way (RequireJS)
vrap=aglrmdl(ap,[*dp *];
 a p  nua.oue'p' / es /)
aglrbosrpdcmn,[ap];
 nua.otta(ouet 'p')
MODULE BASED
               HTML
<tln-p=mAp>
 hm gap"yp"


                JS
vrmAp=aglrmdl(mAp,[) / N dp.
 a yp nua.oue'yp' ]; / o es

/ Cleto o U drcie.
 / olcin f I ietvs
aglrmdl(uDrcie' [*.*];
 nua.oue'iietvs, /../)

vrmAp=aglrmdl(mAp,[uDrcie')
 a yp nua.oue'yp' 'iietvs];
TEMPLATES
<l
 u>
 <in-eet"tmi [wb,'lmn' '1'"
 l grpa=ie n 'e' eeet, #4]>
 {ie}
  {tm}
 <l>
 /i
<dv
 /i>


               web
               element
               #14
WITH CONTROLLERS
                    JS
mApcnrle(Tmltsotolr,fnto(soe {
 yp.otolr'epaeCnrle' ucin$cp)
    $cp.tm =[wb,'lmn' '1';
     soeies 'e' eeet, #4]
};
 )

                 Template
<i n-otolr"epaeCnrle"
 dv gcnrle=Tmltsotolr>
     <pnn-eet"tmi ies>
      sa grpa=ie n tm"
          {ie}<ml>{idx}/ml>
           {tm}sal{$ne}<sal
     <sa>
      /pn
<dv
 /i>


                   Result
         web 0   element 1 #14 2
ASYNC TEMPLATES
<i n-iw <- Ol oeo tepg ->
 dv gve> !- ny n n h ae -


             But, you can use this
<i n-nld=tmltsfohm"
 dv gicue"epae/o.tl>

             with nested levels ;-)

 AngularJS loads the templates asynchronously.
2-WAY DATA BINDING
              Controller
$cp.nu =";
 soeipt  "
$cp.laIpt=fnto( {
 soecernu   ucin)
    $cp.nu =";
     soeipt  "
};


              Template
<nu n-oe=ipt>
 ipt gmdl"nu"
<nu n-lc=cernu("tp=bto"vle"la!>
 ipt gcik"laIpt) ye"utn au=Cer"


                Result
                         Clear!


           $scope.input = ""
HOW IT WORKS?
  ONE WAY DATA BINGING
HOW IT WORKS?
 TWO IS MORE THAN ONE, BRO
HOW IT WORKS?
     SCOPES
DEPENDENCY INJECTION
  Dependecny injector is better than Chuck N.
mApsrie'yevc' fnto( {*.*};
 yp.evc(mSrie, ucin) /../)

mApcnrle(SmIesotolr,fnto(yevc){
 yp.otolr'oetmCnrle' ucinmSrie
 / mSriewsatmtclyijce
  / yevc a uoaial netd

  mSriegt'oept'.ucs(ucindt){
   yevc.e(sm/ah)scesfnto(aa
    $cp.tm =dt.tm;
     soeies aaies
  };
   )
};
 )
HOW IT WORKS?
ROUTING
           $routeProvider
mApcni('ruervdr,fnto(r){
 yp.ofg[$otPoie' ucin$p
 $p
  r
   .hn'fo,{
    we(/o'
     tmltUl 'p/o.tl,
      epaer: tlfohm'
     cnrle:Footolr
      otolr oCnrle
   })
   .tews(rdrcT:'br};
    ohrie{eieto /a')
})
 ];
DIRECTIVES
          It's all about directives.
mApdrcie'ldr,fnto( {
 yp.ietv(sie' ucin)
  rtr {
   eun
    ln:fnto(cp,eeet ats {
     ik ucinsoe lmn, tr)
      $eeet.ldr)
       (lmn)sie(;
    }
  }
};
 )




             Value of slider: 5
and so much more on angularjs.org
        Thanks for coming

   @new_POPE | newpope.org

Weitere ähnliche Inhalte

Was ist angesagt?

Bestpractices nl
Bestpractices nlBestpractices nl
Bestpractices nlWilfred Nas
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & ToolsIan Barber
 
Four Ways to add Features to Ext JS
Four Ways to add Features to Ext JSFour Ways to add Features to Ext JS
Four Ways to add Features to Ext JSShea Frederick
 
Increase productivity with doctrine2 extensions
Increase productivity with doctrine2 extensionsIncrease productivity with doctrine2 extensions
Increase productivity with doctrine2 extensionsGediminas Morkevicius
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitmfrost503
 
Ejercicio 3
Ejercicio 3Ejercicio 3
Ejercicio 3ismaxmax
 
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015Rafael Specht da Silva
 
JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooYasuharu Nakano
 
Capture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reportingCapture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reportingmartin-pitt
 

Was ist angesagt? (19)

Mysql:Operators
Mysql:OperatorsMysql:Operators
Mysql:Operators
 
Bestpractices nl
Bestpractices nlBestpractices nl
Bestpractices nl
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Kumpulan script jahil
Kumpulan script jahilKumpulan script jahil
Kumpulan script jahil
 
Four Ways to add Features to Ext JS
Four Ways to add Features to Ext JSFour Ways to add Features to Ext JS
Four Ways to add Features to Ext JS
 
Ext oo
Ext ooExt oo
Ext oo
 
Sencha Touch Intro
Sencha Touch IntroSencha Touch Intro
Sencha Touch Intro
 
Starting out with Ember.js
Starting out with Ember.jsStarting out with Ember.js
Starting out with Ember.js
 
Increase productivity with doctrine2 extensions
Increase productivity with doctrine2 extensionsIncrease productivity with doctrine2 extensions
Increase productivity with doctrine2 extensions
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
 
Wso2 esb-rest-integration
Wso2 esb-rest-integrationWso2 esb-rest-integration
Wso2 esb-rest-integration
 
Introduction to lua
Introduction to luaIntroduction to lua
Introduction to lua
 
Ejercicio 3
Ejercicio 3Ejercicio 3
Ejercicio 3
 
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
 
Introdução a worker 2.0
Introdução a worker 2.0Introdução a worker 2.0
Introdução a worker 2.0
 
JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring Roo
 
Algoritma 5 november wiwik p.l
Algoritma 5 november wiwik p.lAlgoritma 5 november wiwik p.l
Algoritma 5 november wiwik p.l
 
Send mail-oracle11g-det
Send mail-oracle11g-detSend mail-oracle11g-det
Send mail-oracle11g-det
 
Capture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reportingCapture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reporting
 

Ähnlich wie One page app with AngularJS

Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony componentsMichael Peacock
 
Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Corley S.r.l.
 
A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1jsalonen Salonen
 
Angular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental FeatureAngular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental FeatureJonathan Magen
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and mythsWojciech Sznapka
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSPat Cito
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingLars Thorup
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleAri Lerner
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSJoe Sepi
 
Learn Frontend Testing
Learn Frontend TestingLearn Frontend Testing
Learn Frontend TestingRyan Roemer
 
Drupal 8 in action, the route to the method
Drupal 8 in action, the route to the methodDrupal 8 in action, the route to the method
Drupal 8 in action, the route to the methodjuanolalla
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidSomenath Mukhopadhyay
 
PhpUnit Best Practices
PhpUnit Best PracticesPhpUnit Best Practices
PhpUnit Best PracticesEdorian
 
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...Ari Lerner
 
Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?tvaleev
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)Kritika910
 
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011John Ford
 
Quality Use Of Plugin
Quality Use Of PluginQuality Use Of Plugin
Quality Use Of PluginYasuo Harada
 

Ähnlich wie One page app with AngularJS (20)

Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
 
Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)
 
A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1
 
Angular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental FeatureAngular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental Feature
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and myths
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit Testing
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at Google
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJS
 
Javascript: The Important Bits
Javascript: The Important BitsJavascript: The Important Bits
Javascript: The Important Bits
 
Learn Frontend Testing
Learn Frontend TestingLearn Frontend Testing
Learn Frontend Testing
 
Drupal 8 in action, the route to the method
Drupal 8 in action, the route to the methodDrupal 8 in action, the route to the method
Drupal 8 in action, the route to the method
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in Android
 
PhpUnit Best Practices
PhpUnit Best PracticesPhpUnit Best Practices
PhpUnit Best Practices
 
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
 
PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!
 
Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)
 
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
 
Quality Use Of Plugin
Quality Use Of PluginQuality Use Of Plugin
Quality Use Of Plugin
 

Mehr von Adam Štipák

Techforce #5 es in 2018
Techforce #5   es in 2018Techforce #5   es in 2018
Techforce #5 es in 2018Adam Štipák
 
Rubyslava #66 (container edition)
Rubyslava #66 (container edition) Rubyslava #66 (container edition)
Rubyslava #66 (container edition) Adam Štipák
 
FEI Bratislava 2017 - Docker
FEI Bratislava 2017 - DockerFEI Bratislava 2017 - Docker
FEI Bratislava 2017 - DockerAdam Štipák
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Adam Štipák
 
Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)Adam Štipák
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAdam Štipák
 
from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)Adam Štipák
 
Docker for local development
Docker for local developmentDocker for local development
Docker for local developmentAdam Štipák
 
Improve your workflow
Improve your workflowImprove your workflow
Improve your workflowAdam Štipák
 
Docker on OSX without pain
Docker on OSX without painDocker on OSX without pain
Docker on OSX without painAdam Štipák
 
Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Adam Štipák
 
How to be a full stack developer
How to be a full stack developerHow to be a full stack developer
How to be a full stack developerAdam Štipák
 
Independent components in Nette Framework
Independent components in Nette FrameworkIndependent components in Nette Framework
Independent components in Nette FrameworkAdam Štipák
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)Adam Štipák
 
Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Adam Štipák
 
FEI 2013 - Nette framework
FEI 2013 - Nette frameworkFEI 2013 - Nette framework
FEI 2013 - Nette frameworkAdam Štipák
 
FEI - Nette framework
FEI - Nette frameworkFEI - Nette framework
FEI - Nette frameworkAdam Štipák
 

Mehr von Adam Štipák (19)

Techforce #5 es in 2018
Techforce #5   es in 2018Techforce #5   es in 2018
Techforce #5 es in 2018
 
Rubyslava #66 (container edition)
Rubyslava #66 (container edition) Rubyslava #66 (container edition)
Rubyslava #66 (container edition)
 
FEI Bratislava 2017 - Docker
FEI Bratislava 2017 - DockerFEI Bratislava 2017 - Docker
FEI Bratislava 2017 - Docker
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?
 
Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)
 
Docker for local development
Docker for local developmentDocker for local development
Docker for local development
 
Improve your workflow
Improve your workflowImprove your workflow
Improve your workflow
 
Docker on OSX without pain
Docker on OSX without painDocker on OSX without pain
Docker on OSX without pain
 
Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)
 
How to be a full stack developer
How to be a full stack developerHow to be a full stack developer
How to be a full stack developer
 
Independent components in Nette Framework
Independent components in Nette FrameworkIndependent components in Nette Framework
Independent components in Nette Framework
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)
 
Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)
 
FEI 2013 - Nette framework
FEI 2013 - Nette frameworkFEI 2013 - Nette framework
FEI 2013 - Nette framework
 
Why PhpStorm?
Why PhpStorm?Why PhpStorm?
Why PhpStorm?
 
FEI - Nette framework
FEI - Nette frameworkFEI - Nette framework
FEI - Nette framework
 
DP1
DP1DP1
DP1
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

One page app with AngularJS

  • 1. ONE PAGE APP WITH adam.stipak@gmail.com | @new_POPE
  • 2. WTF, WHICH TOOL I NEED ??? Backbone.js Ember.js Google Closure Spine jQuery (non FW) Este.js (Is it not dead? ;-)) ... No thanks, AngularJS is cool ;-)
  • 3. WHY ? Bootstrapping Module based Templates 2-way data binding (It's fucking good) Dependency Injection Routing Directives
  • 4. BOOTSTRAPPING Step 1: <citsc"i/saglrmnj"<srp> srp r=lbj/nua.i.s>/cit Step 2: <tln-p> hm gap Result: {12}i 3 {+} s I'm using this way (RequireJS) vrap=aglrmdl(ap,[*dp *]; a p nua.oue'p' / es /) aglrbosrpdcmn,[ap]; nua.otta(ouet 'p')
  • 5. MODULE BASED HTML <tln-p=mAp> hm gap"yp" JS vrmAp=aglrmdl(mAp,[) / N dp. a yp nua.oue'yp' ]; / o es / Cleto o U drcie. / olcin f I ietvs aglrmdl(uDrcie' [*.*]; nua.oue'iietvs, /../) vrmAp=aglrmdl(mAp,[uDrcie') a yp nua.oue'yp' 'iietvs];
  • 6. TEMPLATES <l u> <in-eet"tmi [wb,'lmn' '1'" l grpa=ie n 'e' eeet, #4]> {ie} {tm} <l> /i <dv /i> web element #14
  • 7. WITH CONTROLLERS JS mApcnrle(Tmltsotolr,fnto(soe { yp.otolr'epaeCnrle' ucin$cp) $cp.tm =[wb,'lmn' '1'; soeies 'e' eeet, #4] }; ) Template <i n-otolr"epaeCnrle" dv gcnrle=Tmltsotolr> <pnn-eet"tmi ies> sa grpa=ie n tm" {ie}<ml>{idx}/ml> {tm}sal{$ne}<sal <sa> /pn <dv /i> Result web 0 element 1 #14 2
  • 8. ASYNC TEMPLATES <i n-iw <- Ol oeo tepg -> dv gve> !- ny n n h ae - But, you can use this <i n-nld=tmltsfohm" dv gicue"epae/o.tl> with nested levels ;-) AngularJS loads the templates asynchronously.
  • 9. 2-WAY DATA BINDING Controller $cp.nu ="; soeipt " $cp.laIpt=fnto( { soecernu ucin) $cp.nu ="; soeipt " }; Template <nu n-oe=ipt> ipt gmdl"nu" <nu n-lc=cernu("tp=bto"vle"la!> ipt gcik"laIpt) ye"utn au=Cer" Result Clear! $scope.input = ""
  • 10. HOW IT WORKS? ONE WAY DATA BINGING
  • 11. HOW IT WORKS? TWO IS MORE THAN ONE, BRO
  • 12. HOW IT WORKS? SCOPES
  • 13. DEPENDENCY INJECTION Dependecny injector is better than Chuck N. mApsrie'yevc' fnto( {*.*}; yp.evc(mSrie, ucin) /../) mApcnrle(SmIesotolr,fnto(yevc){ yp.otolr'oetmCnrle' ucinmSrie / mSriewsatmtclyijce / yevc a uoaial netd mSriegt'oept'.ucs(ucindt){ yevc.e(sm/ah)scesfnto(aa $cp.tm =dt.tm; soeies aaies }; ) }; )
  • 15. ROUTING $routeProvider mApcni('ruervdr,fnto(r){ yp.ofg[$otPoie' ucin$p $p r .hn'fo,{ we(/o' tmltUl 'p/o.tl, epaer: tlfohm' cnrle:Footolr otolr oCnrle }) .tews(rdrcT:'br}; ohrie{eieto /a') }) ];
  • 16. DIRECTIVES It's all about directives. mApdrcie'ldr,fnto( { yp.ietv(sie' ucin) rtr { eun ln:fnto(cp,eeet ats { ik ucinsoe lmn, tr) $eeet.ldr) (lmn)sie(; } } }; ) Value of slider: 5
  • 17. and so much more on angularjs.org Thanks for coming @new_POPE | newpope.org