SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Building Modern
Web Apps with
HTML5, JS, and
      Java
 ... and how to stay productive
        with Alex Gyoshev / @alex_gyoshev
{{Insert clever quote}}
“ The secret to building large apps is NEVER build
large apps. Break up your applications into small
 pieces. Then, assemble those testable, bite-sized
         pieces into your big application. ”
          Justin Meyer, JavaScriptMVC
Managing complexity
       Templates
       Data binding
       Data sync
       Widgets
Templates
Why?
separate data and rendering
Template engines
 Underscore             Kendo
 Resig Micro templates doT
 Mustache               jQuery.tmpl
 Handlebars             PURE
 EJS                    Hogan
         ...and many more
Which templates are best?
      Hint: it depends!
Different template engines
     Logic-less vs logic-full
Logic-less example: Mustache
                     Template
 {#tm}
  {ies}
   {#is}
    {frt}
     <i<tog{nm}<srn>/i
      l>srn>{ae}/tog<l>
   {/is}
    {frt}
   {#ik}
    {ln}
     <i< he={ul}>{ae}/>/i
      l>a rf"{r}"{nm}<a<l>
   {/ik}
    {ln}
 {/tm}
  {ies}


                        JSON
 {
     "tm" [
      ies:
        {nm" "e" "is" tu,"r" "Rd}
         "ae: rd, frt: re ul: #e",
        {nm" "re" "ik:tu,"r" "Gen}
         "ae: gen, ln" re ul: #re",
        {nm" "le,"ik:tu,"r" "Bu"
         "ae: bu" ln" re ul: #le}
     ]
 }


                       Usage
 vrhm =Msah.ohm(epae jo)
  a tl  utcet_tltmlt, sn;
Logic-full example: _ and
              Kendo
                     Template
#fr(a i=0 i<ieslnt;i+ {#
  o vr     ;   tm.egh +)
   #i ( = 0 {#
     f i = )
      <i<tog# iesi.ae#/tog<l>
       l>srn>= tm[]nm <srn>/i
   #}es {#
       le
      <i< he=# iesi.r #>=iesi.ae#/>/i
       l>a rf"= tm[]ul "# tm[]nm <a<l>
   #}#
#}#


                       JSON
{
    "tm" [
     ies:
       {nm" "e" "r" "Rd}
        "ae: rd, ul: #e",
       {nm" "re" "r" "Gen}
        "ae: gen, ul: #re",
       {nm" "le,"r" "Bu"
        "ae: bu" ul: #le}
    ]
}


                       Usage
vrhm =tmlt(sn;
 a tl  epaejo)
#protip
Use precompiled templates
   As easy as v r t = _ t m l t ( f o )
               a       .epae"o";
#protip
Get away from the w t
                   ih
       blocks!
  # n m #becomes # i e . a e #
   = ae                  = tmnm
  Speed gains: 10x. Or 1000%.
  Available in most template engines
Data binding
Why?
separate data and logic
Example
           Tightly coupled code
fnto adotps){
 ucin dPs(ot
   / cag dt
    / hne aa
   pssps(ot;
    ot.uhps)

    / eeuecd
     / xct oe
    rnePsspss;
     edrot(ot)

    udtMn(ot)
     paeeupss;
}


                 Decoupled code
/ iiilz
 / ntaie
pssbn(cag" rnePss;
 ot.id"hne, edrot)
pssbn(cag" udtMn)
 ot.id"hne, paeeu;

/ adn nwdt wl atmtclyeeuetecd
 / dig e aa il uoaial xct h oe
pssps( tte " nwps! };
 ot.uh{ il: A e ot" )
Frameworks that provide this
          Backbone
          Kendo (Observable)
          Knockout
          Reactive
          Rivet
          AngularJS
          Flight
          Dojo (Observable)
Data sync
Why?
   separate data and storage
bonus: decouple client and server
  bonus x2: testing gets easier
Example
        Traditional fetching of data
$gt"pss,fnto(aa sau){
 .e(/ot" ucindt, tts
   i (tts= 44 {
    f sau = 0)
      rtr soErr)
       eun hwro(;
   }

     vrpss=dt.ot;
      a ot  aapss

     rnePsspss;
      edrot(ot)
};
 )


      Fetching data with data source
vrdtSuc =nwDtSuc(
 a aaore   e aaore{
   tasot {ra:"pss }
    rnpr:  ed /ot" ,

     shm:{dt:"ot"}
      cea  aa pss
};
 )

dtSuc.id"hne,rnePss;
 aaorebn(cag" edrot)
dtSuc.id"ro" soErr;
 aaorebn(err, hwro)
Frameworks that provide this
         Backbone (Collection)
         Kendo (DataSource)
         AngularJS
         Dojo (Store)
         Y.DataSource
Java
OMG, he said the J word!
DESIGN.
TECHNOLOGY.
 COOL SHIT.
   JAVA?
We have to admit that the
        JVM is...
        Very scalable (Twitter)
        Ubiquitous
Problems with Java for web
      development
     Slow workflow (involves deploy)
     Requires lots of code for simple things
Problems with Java for web
      development
... solved by frameworks and languages
                      Play
                      Scala
                      Lift
                      Wicket

         Refreshing lack of XML included!
Bringing it all together
     Tech demo, yay!
        No livecoding, don't yawn
Has anyone done SCUBA lately?
Share your SCUBA experiences with...
              Bubbles!
      Like smoke signals without the smoke
Tech stack
Play + Kendo
Wrap-up
Modern applications are like jigsaw
              puzzles —
  frameworks give you the pieces,
you fit them into a beautiful picture.
          The above statement is less than 140 chars!
Questions. You has them.
   slides: slideshare.net/alexandergyoshev
 project: github.com/gyoshev/fitc-am13-demo
               @alex_gyoshev
             alex@gyoshev.net

Mais conteúdo relacionado

Mais procurados

ZCA: A component architecture for Python
ZCA: A component architecture for PythonZCA: A component architecture for Python
ZCA: A component architecture for Python
Timo Stollenwerk
 

Mais procurados (17)

The Power of CSS
The Power of CSSThe Power of CSS
The Power of CSS
 
C++の話(本当にあった怖い話)
C++の話(本当にあった怖い話)C++の話(本当にあった怖い話)
C++の話(本当にあった怖い話)
 
Javascript: The Important Bits
Javascript: The Important BitsJavascript: The Important Bits
Javascript: The Important Bits
 
Theme Development and Customization
Theme Development and CustomizationTheme Development and Customization
Theme Development and Customization
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and myths
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
 
Introduction to jRuby
Introduction to jRubyIntroduction to jRuby
Introduction to jRuby
 
Vcs28
Vcs28Vcs28
Vcs28
 
Hom Class
Hom ClassHom Class
Hom Class
 
Hom Class
Hom ClassHom Class
Hom Class
 
מודלים חישוביים - תרגול מס 2 - אוניברסיטת חיפה
   מודלים חישוביים - תרגול מס 2 - אוניברסיטת חיפה    מודלים חישוביים - תרגול מס 2 - אוניברסיטת חיפה
מודלים חישוביים - תרגול מס 2 - אוניברסיטת חיפה
 
C++ and Assembly: Debugging and Reverse Engineering
C++ and Assembly: Debugging and Reverse EngineeringC++ and Assembly: Debugging and Reverse Engineering
C++ and Assembly: Debugging and Reverse Engineering
 
DeepLearning ハンズオン資料 20161220
DeepLearning ハンズオン資料 20161220DeepLearning ハンズオン資料 20161220
DeepLearning ハンズオン資料 20161220
 
Txjs
TxjsTxjs
Txjs
 
Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit
 
Python and sysadmin I
Python and sysadmin IPython and sysadmin I
Python and sysadmin I
 
ZCA: A component architecture for Python
ZCA: A component architecture for PythonZCA: A component architecture for Python
ZCA: A component architecture for Python
 

Destaque

Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development Technologies
Vignesh Prajapati
 
How to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-applicationHow to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-application
lverb
 
Intro to modern web technology
Intro to modern web technologyIntro to modern web technology
Intro to modern web technology
Chris Love
 
Architecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsArchitecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web Apps
Rasheed Waraich
 

Destaque (20)

JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGap
 
Top 10 HTML5 frameworks for effective development in 2016
Top 10 HTML5 frameworks for effective development in 2016Top 10 HTML5 frameworks for effective development in 2016
Top 10 HTML5 frameworks for effective development in 2016
 
Delivering HTML5 and Modern Apps
Delivering HTML5 and Modern AppsDelivering HTML5 and Modern Apps
Delivering HTML5 and Modern Apps
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App Architectures
 
Web app architecture
Web app architectureWeb app architecture
Web app architecture
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development Technologies
 
Structuring web applications with Backbone.js
Structuring web applications with Backbone.jsStructuring web applications with Backbone.js
Structuring web applications with Backbone.js
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAE
 
How to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-applicationHow to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-application
 
Introduction To Building Enterprise Web Application With Spring Mvc
Introduction To Building Enterprise Web Application With Spring MvcIntroduction To Building Enterprise Web Application With Spring Mvc
Introduction To Building Enterprise Web Application With Spring Mvc
 
Quick Application Development with Web Frameworks
Quick Application Development with Web FrameworksQuick Application Development with Web Frameworks
Quick Application Development with Web Frameworks
 
Ning presentation
Ning presentationNing presentation
Ning presentation
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)
 
Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)
 
Intro to modern web technology
Intro to modern web technologyIntro to modern web technology
Intro to modern web technology
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot
 
Web Application Development
Web Application DevelopmentWeb Application Development
Web Application Development
 
Architecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsArchitecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web Apps
 

Semelhante a Building modern web apps with html5, javascript, and java

Making Mongo realtime - oplog tailing in Meteor
Making Mongo realtime - oplog tailing in MeteorMaking Mongo realtime - oplog tailing in Meteor
Making Mongo realtime - oplog tailing in Meteor
yaliceme
 
Java Intro
Java IntroJava Intro
Java Intro
backdoor
 

Semelhante a Building modern web apps with html5, javascript, and java (20)

Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineering
 
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
 
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNEGenerating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
 
Lambdas myths-and-mistakes
Lambdas myths-and-mistakesLambdas myths-and-mistakes
Lambdas myths-and-mistakes
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
Learn Frontend Testing
Learn Frontend TestingLearn Frontend Testing
Learn Frontend Testing
 
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
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 
Making Mongo realtime - oplog tailing in Meteor
Making Mongo realtime - oplog tailing in MeteorMaking Mongo realtime - oplog tailing in Meteor
Making Mongo realtime - oplog tailing in Meteor
 
Batteries included: Advantages of an End-to-end solution
Batteries included: Advantages of an End-to-end solutionBatteries included: Advantages of an End-to-end solution
Batteries included: Advantages of an End-to-end solution
 
Hazelcast - In-Memory DataGrid
Hazelcast - In-Memory DataGridHazelcast - In-Memory DataGrid
Hazelcast - In-Memory DataGrid
 
Making the most of 2.2
Making the most of 2.2Making the most of 2.2
Making the most of 2.2
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
Java Intro
Java IntroJava Intro
Java Intro
 
Scalaxb preso
Scalaxb presoScalaxb preso
Scalaxb preso
 
Starting out with Ember.js
Starting out with Ember.jsStarting out with Ember.js
Starting out with Ember.js
 
Einführung in TypeScript
Einführung in TypeScriptEinführung in TypeScript
Einführung in TypeScript
 
Making JavaScript Libraries More Approachable
Making JavaScript Libraries More ApproachableMaking JavaScript Libraries More Approachable
Making JavaScript Libraries More Approachable
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
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?
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Building modern web apps with html5, javascript, and java