SlideShare a Scribd company logo
1 of 43
Download to read offline
DAY 1 16 Dec 9am-5pm
about me
Clarence Ngoh
Year 2 SIS
Telegram: @clarencenpy
Having Fun
Web Applications
building
Previously…
what i hope to teach!
front end?
practice of producing HTML, CSS and Javascript for a
website or web application so that a user can see and
interact with them directly through the web browser
Why?
SE and beyond - you need an interface to your app
JS supports a great user experience that static pages can’t
Easy to get started with so many libraries to leverage
Web apps?a client-server software application in which the
client (or user interface) runs in a web browser.
Why?
> Write Once Run Anywhere
> Easy to reach a huge user base
> Browsers getting better and better
> BUT.. still many things we cant achieve like
access hardware and filesystem, a unified
payments platform, high performance

> Not better than native, but Good Enough for
increasing types of applications
web pages VS webapps
data on the wire
html on the wire
- no page refresh
- javascript driven
Responsive design
what we will be building
Concept / Value proposition
a matchmaking application
for students searching love
that allows the user to match interests with other users
(compatible or not?)
and facilitate their budding love
what we will be building
create and update personal profile
view all other users on platform
check compatibility with another user
matching interests
astrology?
send gifts
rank by popularity
Mock Up - Job to be done
what we will be building
Profile
Card CardCard
Notifications
Mock Up - Page Structure
what we will be building
Course overview
Day 1
Pure front end app - no
server backend
Page scaffolding
No database, we will
hardcode data
what we will be building
Course overview
Day 2
Intro to Meteor.
Port existing app over
Database
User accounts
Environment setup
You will need a text editor, use any you like,
something you are familiar with!
Suggested: Sublime Text, Notepad++,
WebStorm
Look out for features like:
Syntax/error highlighting
HTML tag expansion (Emmet)
Auto-reformatting
Auto-completion
Chrome Web Browser
Lets start
Using 3rd party code
we code some, we kope some
Web development
about composing
building blocks to
create something
Good programmers
reuse what is already
available
Using 3rd party code
we code some, we kope some Use HTML <script>
tag to import
src = use local copy or
Content Delivery
Network (CDN)
Benefits of CDN
include:
Distributed data centers
Browser caching
Faster page load
Exercise 1Import jQuery
Open your web app in Chrome (no errors)
css Frameworks
Get pretty components out of the box
Help us to resolve browser differences
Someone else do the hard work (eg browser
prefixes)
Don’t have to write your own CSS - only if you
want to customise
Usually come with good documentation
Good way to learn CSS best practices
Take your pick: Bootstrap, Foundation, Semantic
How css frameworks work
.cool {
rules …
}
.nice {
rules …
}
your css
.red {
rules …
}
.button {
rules …
}
Framework css
<div class=“cool red”>
</div>
your HTML
for styling
How css frameworks work
.cool-component {
rules…
}
Framework css
lots of code…
Framework JS
<div class=“cool-
component”>
</div>
your HTML
$(‘.cool-component)
.startPlugin()
your JS
for behaviour
Exercise 2Play with SemanticUI components
Play with Grid System
Exercise 3Create a 2 panel layout
Add card for user profile
lunch1130 - 1200pm
Exercise 4Scaffold UI to display cards of other people
jquerya must have library for working on the browser
Help us to resolve browser differences
Great documentation
Super easy way to manipulate page
(DOM elements)
http://www.sitepoint.com/jquery-vs-
raw-javascript-3-events-ajax/
Extensive plugin system
https://api.jquery.com
jquery
we need to know how to…
Select Elements Add Behaviour Change state
.on() .click()$(…) .class() .html()
$(‘.donebutton’).class(‘hidden’)
Exercise 5Create global object with application data
Use this to generate n number of cards
for other users
get organised
some tips
Encapsulate everything into an object (don’t
pollute the global namespace)
Group related code into functions, so we know
where to find/add our code
init()
bindEvents()
loadSomething()
refresh()
Initialise app when Document Ready 

$(function)
Templating engine
creating html strings manually is painful
https://mustache.github.io
so how?
Templating engine
<div class="entry">
<h1>{{name}}</h1>
<div class="body">
{{message}}
</div>
</div>
Template + Data = HTML
{
name: “John”
message: “hi”
}
<div class="entry">
<h1>John</h1>
<div class="body">
Hi
</div>
</div>
Mustache.render(template, data)
how it works
Templating engine
{{# }} {{# }}
template helpers
array boolean
{{/ }}
Loops Conditionals
html that is
displayed for every
element in array
html that is
displayed only if
boolean is true
array {{/ }}boolean
Exercise 6Use Mustache templating!
event handling
we use the .on() jQuery method to
attach a function to a DOM element
DOM element rendered DOM element not yet rendered
Attach callback
function to element
Attach callback to parent
element that is already
rendered, passing in
additional filter argument
passing data
when we attach the same event handler
for multiple DOM elements, we need a
way to uniquely identify each one
can be attached to these elements using
HTML5 Data Attributes
data-<name>
and retrieved with jQuery using .data(name)
Exercise 7Attach event handlers to Check Compatibility
button, and print the person id of the clicked
element to console
Javascript utilities
Perform common algorithms with
lesser pain
Find item in array, looping, sorting,
mapping etc.
We are using Underscore.js
sugary syntax for common algos
Exercise 8Implement check compatibility function
- Display modal on click
- Calculate number of common interests
- Display progress bars
APIs, our best friend
API is an agreement/contract between two people,
saying that if you give me this instruction, I will
execute this and do something for you.
This something could be anything:

sending an email, drawing a chart, fetching data etc
We need an API because we are relying on some
code someone else did
Look at the API documentation to see what data
they take in, and what is the corresponding result
Application programming interface
APIs, our best friendApplication programming interface
General Steps
Download the library (if required)
Get the API keys (if required)
Transform your data to match their
expected input
Call the API!
Exercise 9Follow the API documentation of Vedic API to
display Horoscope matching report!
Exercise 10Every time the Check Compatibility button is
clicked, increment the number of views of the
person by 1 and refresh UI
End of day 1https://clarencengoh.typeform.com/to/kqWcZb

More Related Content

What's hot

Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorialgjuljo
 
Cutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany ConroyCutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany ConroyCodemotion
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
J Query Presentation
J Query PresentationJ Query Presentation
J Query PresentationVishal Kumar
 
Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9breccan
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSFITC
 
Resources and relationships at front-end
Resources and relationships at front-endResources and relationships at front-end
Resources and relationships at front-endWingify Engineering
 
Building mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitBuilding mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitSami Ekblad
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementationdavejohnson
 
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 Cutting edge HTML5 API you can use today (by Bohdan Rusinka) Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)Binary Studio
 
Jessica Gantt Slide Show
Jessica Gantt Slide ShowJessica Gantt Slide Show
Jessica Gantt Slide ShowJessica Gantt
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasKubide
 
Groundspeed Presentation at the OWASP NY/NJ
Groundspeed Presentation at the OWASP NY/NJGroundspeed Presentation at the OWASP NY/NJ
Groundspeed Presentation at the OWASP NY/NJFelipe M
 
Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...
Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...
Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...99X Technology
 
Mobile web apps in pure Java
Mobile web apps in pure JavaMobile web apps in pure Java
Mobile web apps in pure JavaThomas Mattsson
 
jQuery basics
jQuery basicsjQuery basics
jQuery basicsKamal S
 
Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Steve Taylor
 
Google Apps for your Business
Google Apps for your BusinessGoogle Apps for your Business
Google Apps for your BusinessJennifer Bonnett
 

What's hot (20)

Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
 
Cutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany ConroyCutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany Conroy
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
J Query Presentation
J Query PresentationJ Query Presentation
J Query Presentation
 
Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
 
Resources and relationships at front-end
Resources and relationships at front-endResources and relationships at front-end
Resources and relationships at front-end
 
Building mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitBuilding mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKit
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementation
 
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 Cutting edge HTML5 API you can use today (by Bohdan Rusinka) Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 
Jessica Gantt Slide Show
Jessica Gantt Slide ShowJessica Gantt Slide Show
Jessica Gantt Slide Show
 
Selenium for-ops
Selenium for-opsSelenium for-ops
Selenium for-ops
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas Zakas
 
Groundspeed Presentation at the OWASP NY/NJ
Groundspeed Presentation at the OWASP NY/NJGroundspeed Presentation at the OWASP NY/NJ
Groundspeed Presentation at the OWASP NY/NJ
 
Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...
Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...
Colombo Mobile Developer MeetUp - Building Scalable Cloud Connected Mobile Ap...
 
Ajax
Ajax Ajax
Ajax
 
Mobile web apps in pure Java
Mobile web apps in pure JavaMobile web apps in pure Java
Mobile web apps in pure Java
 
jQuery basics
jQuery basicsjQuery basics
jQuery basics
 
Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?
 
Google Apps for your Business
Google Apps for your BusinessGoogle Apps for your Business
Google Apps for your Business
 

Viewers also liked

Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks Pactera_US
 
Creative education summit
Creative education summitCreative education summit
Creative education summitJack740
 
EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020Marcellus Drilling News
 
Birdwatching: an introduction
Birdwatching: an introduction Birdwatching: an introduction
Birdwatching: an introduction Ashish Kothari
 
#Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia #Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia Rosy Battaglia
 
Evaluation Activity 6
Evaluation Activity  6Evaluation Activity  6
Evaluation Activity 6SHEKARIE
 
Asus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manualAsus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manualMarcio J. Silva
 
[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记Pem Zhipeng Xie
 
How Executives Work with Private Equity
How Executives Work  with Private EquityHow Executives Work  with Private Equity
How Executives Work with Private EquityJohn A. Bova
 
Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail Pactera_US
 
Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!KNIMESlides
 
Hoarding before & after
Hoarding before & afterHoarding before & after
Hoarding before & afterjolie111
 

Viewers also liked (19)

Actividad virtual 2
Actividad virtual 2Actividad virtual 2
Actividad virtual 2
 
Eval q1
Eval q1 Eval q1
Eval q1
 
Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks
 
Creative education summit
Creative education summitCreative education summit
Creative education summit
 
EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020
 
universality
universalityuniversality
universality
 
Birdwatching: an introduction
Birdwatching: an introduction Birdwatching: an introduction
Birdwatching: an introduction
 
Paisjet dalese te kompjuterit
Paisjet dalese te kompjuteritPaisjet dalese te kompjuterit
Paisjet dalese te kompjuterit
 
#Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia #Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia
 
Evaluation Activity 6
Evaluation Activity  6Evaluation Activity  6
Evaluation Activity 6
 
Ghhh
GhhhGhhh
Ghhh
 
Asus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manualAsus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manual
 
[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记
 
How Executives Work with Private Equity
How Executives Work  with Private EquityHow Executives Work  with Private Equity
How Executives Work with Private Equity
 
Bases de datos scopus
Bases de datos scopusBases de datos scopus
Bases de datos scopus
 
Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail
 
Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!
 
Ap ps tecnologicas
Ap ps tecnologicasAp ps tecnologicas
Ap ps tecnologicas
 
Hoarding before & after
Hoarding before & afterHoarding before & after
Hoarding before & after
 

Similar to Having Fun Building Web Applications (Day 1 Slides)

Designing the Call of Cthulhu app with Google App Engine
Designing the Call of Cthulhu app with Google App EngineDesigning the Call of Cthulhu app with Google App Engine
Designing the Call of Cthulhu app with Google App EngineChris Bunch
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Stepin evening presented
Stepin evening presentedStepin evening presented
Stepin evening presentedVijayan Reddy
 
Developing For The Web
Developing For The WebDeveloping For The Web
Developing For The Webaleemb
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
PowerPoint
PowerPointPowerPoint
PowerPointVideoguy
 
Claim Academy Intro to Programming
Claim Academy Intro to ProgrammingClaim Academy Intro to Programming
Claim Academy Intro to ProgrammingAlex Pearson
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end appsZohar Arad
 
Why use .net by naveen kumar veligeti
Why use .net by naveen kumar veligetiWhy use .net by naveen kumar veligeti
Why use .net by naveen kumar veligetiNaveen Kumar Veligeti
 
COMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docxCOMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docxwrite31
 
Syllabus for Technical courses
Syllabus for Technical coursesSyllabus for Technical courses
Syllabus for Technical coursesMontek1Learning
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineTahir Akram
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083Divyam Pateriya
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 

Similar to Having Fun Building Web Applications (Day 1 Slides) (20)

Designing the Call of Cthulhu app with Google App Engine
Designing the Call of Cthulhu app with Google App EngineDesigning the Call of Cthulhu app with Google App Engine
Designing the Call of Cthulhu app with Google App Engine
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Stepin evening presented
Stepin evening presentedStepin evening presented
Stepin evening presented
 
Developing For The Web
Developing For The WebDeveloping For The Web
Developing For The Web
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
PowerPoint
PowerPointPowerPoint
PowerPoint
 
Claim Academy Intro to Programming
Claim Academy Intro to ProgrammingClaim Academy Intro to Programming
Claim Academy Intro to Programming
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end apps
 
Resume
ResumeResume
Resume
 
Why use .net by naveen kumar veligeti
Why use .net by naveen kumar veligetiWhy use .net by naveen kumar veligeti
Why use .net by naveen kumar veligeti
 
COMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docxCOMP6210 Web Services And Design Methodologies.docx
COMP6210 Web Services And Design Methodologies.docx
 
Syllabus for Technical courses
Syllabus for Technical coursesSyllabus for Technical courses
Syllabus for Technical courses
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
 
Lecture 1 (2)
Lecture 1 (2)Lecture 1 (2)
Lecture 1 (2)
 
Building Web Hack Interfaces
Building Web Hack InterfacesBuilding Web Hack Interfaces
Building Web Hack Interfaces
 
Final paper
Final paperFinal paper
Final paper
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
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
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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?
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
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!
 

Having Fun Building Web Applications (Day 1 Slides)

  • 1. DAY 1 16 Dec 9am-5pm
  • 2. about me Clarence Ngoh Year 2 SIS Telegram: @clarencenpy
  • 4. what i hope to teach!
  • 5. front end? practice of producing HTML, CSS and Javascript for a website or web application so that a user can see and interact with them directly through the web browser Why? SE and beyond - you need an interface to your app JS supports a great user experience that static pages can’t Easy to get started with so many libraries to leverage
  • 6. Web apps?a client-server software application in which the client (or user interface) runs in a web browser. Why? > Write Once Run Anywhere > Easy to reach a huge user base > Browsers getting better and better > BUT.. still many things we cant achieve like access hardware and filesystem, a unified payments platform, high performance
 > Not better than native, but Good Enough for increasing types of applications
  • 7. web pages VS webapps data on the wire html on the wire - no page refresh - javascript driven
  • 9. what we will be building Concept / Value proposition a matchmaking application for students searching love that allows the user to match interests with other users (compatible or not?) and facilitate their budding love
  • 10. what we will be building create and update personal profile view all other users on platform check compatibility with another user matching interests astrology? send gifts rank by popularity Mock Up - Job to be done
  • 11. what we will be building Profile Card CardCard Notifications Mock Up - Page Structure
  • 12. what we will be building Course overview Day 1 Pure front end app - no server backend Page scaffolding No database, we will hardcode data
  • 13. what we will be building Course overview Day 2 Intro to Meteor. Port existing app over Database User accounts
  • 14. Environment setup You will need a text editor, use any you like, something you are familiar with! Suggested: Sublime Text, Notepad++, WebStorm Look out for features like: Syntax/error highlighting HTML tag expansion (Emmet) Auto-reformatting Auto-completion Chrome Web Browser
  • 16. Using 3rd party code we code some, we kope some Web development about composing building blocks to create something Good programmers reuse what is already available
  • 17. Using 3rd party code we code some, we kope some Use HTML <script> tag to import src = use local copy or Content Delivery Network (CDN) Benefits of CDN include: Distributed data centers Browser caching Faster page load
  • 18. Exercise 1Import jQuery Open your web app in Chrome (no errors)
  • 19. css Frameworks Get pretty components out of the box Help us to resolve browser differences Someone else do the hard work (eg browser prefixes) Don’t have to write your own CSS - only if you want to customise Usually come with good documentation Good way to learn CSS best practices Take your pick: Bootstrap, Foundation, Semantic
  • 20. How css frameworks work .cool { rules … } .nice { rules … } your css .red { rules … } .button { rules … } Framework css <div class=“cool red”> </div> your HTML for styling
  • 21. How css frameworks work .cool-component { rules… } Framework css lots of code… Framework JS <div class=“cool- component”> </div> your HTML $(‘.cool-component) .startPlugin() your JS for behaviour
  • 22. Exercise 2Play with SemanticUI components Play with Grid System
  • 23. Exercise 3Create a 2 panel layout Add card for user profile
  • 25. Exercise 4Scaffold UI to display cards of other people
  • 26. jquerya must have library for working on the browser Help us to resolve browser differences Great documentation Super easy way to manipulate page (DOM elements) http://www.sitepoint.com/jquery-vs- raw-javascript-3-events-ajax/ Extensive plugin system
  • 27. https://api.jquery.com jquery we need to know how to… Select Elements Add Behaviour Change state .on() .click()$(…) .class() .html() $(‘.donebutton’).class(‘hidden’)
  • 28. Exercise 5Create global object with application data Use this to generate n number of cards for other users
  • 29. get organised some tips Encapsulate everything into an object (don’t pollute the global namespace) Group related code into functions, so we know where to find/add our code init() bindEvents() loadSomething() refresh() Initialise app when Document Ready 
 $(function)
  • 30. Templating engine creating html strings manually is painful https://mustache.github.io so how?
  • 31. Templating engine <div class="entry"> <h1>{{name}}</h1> <div class="body"> {{message}} </div> </div> Template + Data = HTML { name: “John” message: “hi” } <div class="entry"> <h1>John</h1> <div class="body"> Hi </div> </div> Mustache.render(template, data) how it works
  • 32. Templating engine {{# }} {{# }} template helpers array boolean {{/ }} Loops Conditionals html that is displayed for every element in array html that is displayed only if boolean is true array {{/ }}boolean
  • 33. Exercise 6Use Mustache templating!
  • 34. event handling we use the .on() jQuery method to attach a function to a DOM element DOM element rendered DOM element not yet rendered Attach callback function to element Attach callback to parent element that is already rendered, passing in additional filter argument
  • 35. passing data when we attach the same event handler for multiple DOM elements, we need a way to uniquely identify each one can be attached to these elements using HTML5 Data Attributes data-<name> and retrieved with jQuery using .data(name)
  • 36. Exercise 7Attach event handlers to Check Compatibility button, and print the person id of the clicked element to console
  • 37. Javascript utilities Perform common algorithms with lesser pain Find item in array, looping, sorting, mapping etc. We are using Underscore.js sugary syntax for common algos
  • 38. Exercise 8Implement check compatibility function - Display modal on click - Calculate number of common interests - Display progress bars
  • 39. APIs, our best friend API is an agreement/contract between two people, saying that if you give me this instruction, I will execute this and do something for you. This something could be anything:
 sending an email, drawing a chart, fetching data etc We need an API because we are relying on some code someone else did Look at the API documentation to see what data they take in, and what is the corresponding result Application programming interface
  • 40. APIs, our best friendApplication programming interface General Steps Download the library (if required) Get the API keys (if required) Transform your data to match their expected input Call the API!
  • 41. Exercise 9Follow the API documentation of Vedic API to display Horoscope matching report!
  • 42. Exercise 10Every time the Check Compatibility button is clicked, increment the number of views of the person by 1 and refresh UI
  • 43. End of day 1https://clarencengoh.typeform.com/to/kqWcZb