Preflight
File
, FileList
, FileReader
.
--unlimited-quota-for-files
flag?
about:flags
.
- Space or ← / → to move around
- Ctrl/Command / – or + to zoom in and out if slides don’t fit
- N to show/hide speaker notes
- H to highlight important elements in code snippets
Trend Report:
Why we have web at our fingertips
9:00 - 10:30am
Last Modified: 2013-05-07
This slide is authored in HTML5 (Eric Bidelman && Arne Roomann-Kurrik's work in Google I/O)
To show the trend for Web
I hope you think web
as application platform
Please give WAC IDE team feedback!
HTML5
HTML5
History of HTML5
W3C focuses XHTML. But...
Web 2.0, Ajax and REST API *
Web as application platfrom not as document
W3C spec is so vast and ideal. We must give up HTML :(
Make our working group for Web Application*
Tim Bernes Lee: gg
WHATWG: gg
Features of HTML5
8 technologies
(Connectivity, CSS3 & Styling, Device Access, 3D & Effects, Multimedia, Performance & Integration, Semantics, Offline & Storage)
New features let you:
- Inter-operability between browsers
- Compatibility with HTML 4.01
- Productivity for web developers
- Rich Web like multimedia and offline storage
Just use HTML5 doctype
<!DOCTYPE html>
Semantic Markup
- <t lang="fr">je ne sais quoi</t> - <time datetime="2011-09-20">a tuesday</time> - <meter min="0" max="100" value="75"></meter> - <progress value="33" max="100">
<span id="p">33</span>%
</progress>
-je ne sais quoi - --
function validate(field_name, field_value) { // Fill validation codes if (field_value == null || field_value == "") { document.getElementById("email_status").innerHTML = '<div class="field_error">' + email_enter + '</div>'; } ... function regIsEmail(field_value) { var reg = new RegExp( "^[0-9a-zA-Z]+@[0-9a-zA-Z]+[\.]{1}[0-9a-zA-Z]+[\.]?[0-9a-zA-Z]+$"); ... // If you want to use calendar, include it <script src="js/calendar-lib.js"></script> |
»It frustrated developers and made myth JavaScript is form validation language
<video src="http://www.tools4movies.com/trailers/1012/Iron%20Man%203.mp4" controls> <div class="no-html5-video"></div> </video>
No embedded plugin object like Flash
- Application Cache*
- Offline browsing: Gmail Offline
- Performance: Twitter’s mobile web app delivers performance
- Decreasing server load
- Web Storage (1)
- localStorage*: Try It!
localStorage.setItem("name", "Hello World!");
- sessionStorage
- localStorage*: Try It!
- Web Storage (2)
- Web SQL Database
var db = window.openDatabase("TestDB", "1.0", "Test DB", "2*1024*1024"); db.transaction(function (tx) { tx.executeSql('CREATE TABLE works(subject, memo)'); tx.executeSql('INSERT INTO works(subject, memo) VALUES ("Item1", "Memo1")'); });
- GeoLocation
void navigator.geolocation.getCurrentPosition( successCb, errorCb, options); long navigator.geolocation.watchPosition( successCb, errorCb, options); void clearWatch(watchID); function show_position(position) { // position.coords.latitude, position.coords.longitude
- Web SQL Database
- Play Galaxy lite!
canvas.getContext('2d').drawImage(sprite_image, ...);
<textPath method="align" spacing="auto" xlink:href="#svgTextPath"> <tspan>Sometimes I have to put text on a path</tspan> </textPath>
»Visualization library using SVG D3.js
»data to graphics (Bubble, Tree, TreeMap)
- Configuring behavioral options or associating content enhancements
- Treated as a storage area for private data (private in the sense that the end user can't see it - it doesn't affect layout or presentation).
- 하이브리드앱 아키텍쳐 및 개발 사례
<button><span data-nls="common.back">Back</span></button>
$.get('locales/'+lang+'/messages.json',function(messages){ $.each(document.body).find(‘*[data-nls]’).each(function(index,node){ var key=node.attr(‘data-nls’); var message=messages[key]; node.html(message);
- jQuery Mobile Data- attribute reference
- 하이브리드앱 아키텍쳐 및 개발 사례
CSS3
- Table code is complex and required some images
- CSS3 provides just a simple property!
<style> .rounded { border-radius:8px; } </style> <div class="rounded" />
linear ease-in ease-out ease-in-out cubic-bezier(0.9, 0.1, 0.1, 0.9);
var socket = new WebSocket('ws://echo.websocket.org/'); socket.onopen = function(event) { socket.send('Hello, WebSocket'); }; socket.onmessage = function(event) { alert(event.data); } socket.onclose = function(event) { alert('closed'); }
Full-duplex, bi-directional communication over the Web: Both the server and client can send data at any time, or even at the same time. Only the data itself is sent, without the overhead of HTTP headers, dramatically reducing bandwidth.
Location:
Message:
WebSocket
It enables real-time communication like trading system, remote inspector, hybrid app and chat*
Remote Debugging using WebSocket
var worker = new Worker('task.js'); worker.onmessage = function(event) { alert(event.data); }; worker.postMessage('data');task.js:
self.onmessage = function(event) { // Do some work. self.postMessage("recv'd: " + event.data); };Try it!
- 기존의 리치 웹 기술은 읽을 수 없는 바이너리를 포함하고 있으며, 이는 웹 본질과 일치하지 않는다.
- 웹은 읽을 수 있고(readable), 저장할 수 있고(indexable), 편집할 수 있어야(editable) 한다.
- 인덱스 불가능한 정보를 인덱스 가능한 상태로 바꾸려는 노력
http://chart.apis.google.com/chart?cht=p3&chd=s:FI&chs=200x100&chl=Firefox|IE
(Try bar chart "bvg") - Easy to crack?! ex.)) Angry Birds for Chrome
- 클라우드와의 결합 HTML5의 파워는 클라우드에서 나온다.
Okay, I got to know HTML5 is good.
But, the final specification will not be available soon!
Do I study HTML5 already?
- Perfect specification is different from implementation
- Modern browsers
- It's just not the tags or APIs. It is the platform.
- Local Storage
- WebSocket*
- Multimedia
...Especially in mobile web
Web Technology
That's not all
Huge device market!
Global Standard
Google likes HTML5, too
Check Google I/O 2009
Even Microsoft likes web!
I will give some images in BUILD
Angry Birds (WebGL + Canvas)
Mozilla B2G(Boot to Gecko) - Mozilla open source operating system project (aka Firefox OS)
»파이어폭스, 내년엔 스마트폰OS…잘 될까
»BrowserQuest
...And Playboy loves HTML5
»Case of Readability
Mobile Web
It's like Web 2.0
- Mobile Viewport Declaration
<meta name="viewport" content="width=device-width" />
- CSS3 Media Queries
- Resolution dependent layout
- Example: html5rocks.com with Safari
- Optimization
- Amazon SILK
- Contextual Data
They leverage HTML5 for extreme multi-platform (over 400 devices)
- native WITH Web
- 모바일웹 담은 새 '네이버' 앱
- unscientific research
dion@laptop $ grep UIWebView *.ipa |wc -l 205 dion@laptop $ ls -al *.ipa |wc -l 415
- Web deployment model
- A/B testing
- Constantly changing UI
And our next is JavaScript.
JavaScript
Brendan Eich, 1995, Netscape
- Global variables
- No block scope
function test() { var1 = "inner"; } test(); alert(var1);
- The
with
block - Deal with the == operator
2 === "2"; // false - obviously a number is not a string 2 == "2"; // true
- Semicolon
- Douglas Crockford
- Discovered Good Parts
- The World's Most Misunderstood Programming Language
- Myths and Truths
- It is subset of Java (It's name is Java-)
- It is not object-oriented (It doesn't have class)
- Many design errors, Lousy Implementations, Amateurs
- Myths and Truths
But why JavaScript is so popular?
...Again Web 2.0 and Ajax*
jQuery: "The Write Less, Do More" JavaScript Library *
- DOM Scripting, AJAX, UI Effects
var external_links = document.getElementById('external_links'); var links = external_links.getElementsByTagName('a'); for (var i=0;i < links.length;i++) { var link = links.item(i); link.onclick = function() { return confirm('You are going to visit: ' + this.href); }; }
$('#external_links a').click(function() { return confirm('You are going to visit: ' + this.href); });
- Plugin architecture
jQuery plugin for mobile environment
Tizen Web UI Framework is based on jQuery Mobile
Go beyond stereotype
Node.js: evented I/O for v8 javascript
- Why don't use the same language as client?
- The joys of async programming
var http = require('http'); var server = http.createServer(function (req, res) { res.writeHead(200, { "Content-Type": "text/plain" }) res.end("Hello world"); }).listen(80);
- Front-end developers can develop network service easily
- no.de
- Node.js Cloud Services
- Virtualization + Server-side JavaScript
JavaScript for Large-Scale applications
jQuery is not enough
Yeah, these are the tools for traditional large-scale server programming!
- Modulization
- MVC Pattern
- SproutCore: Apple iCloud
- Design Patterns
- Feature Detection
- Modernizr
<script src="js/modernizr-1.0.min.js"></script> <html class="no-js">
<html class="js canvas geolocation no-multiplebgs">
- Modernizr
- Testing
- Unit Testing
- GUI Testing: Sencha EventRecorder
- Build Process
- build script
- Optimization, Minifcation/Concatenation
- Grunt: a task-based command line build tool for JavaScript projects
- UI Widgets
- Dojo Toolkit, Sencha, Kendo UI
Template and Data Source
I will present IDE in context of web using these technology.
Web and IDE
Hybrid App
Web-based IDE
- Already, we use web so much in software development
- using a web-based bug tracking system
- monitoring your build
- reviewing code changes
- reading documentation and searching for code snippets
- browsing other people's code repositories
- Web browser is the best simulator for web technology
Eclipse moved to web from 2008
Web-based workbench
Web-based IDE relates with Cloud
Cloud Computing
PaaS (Platform as a Service)
Model 1: Cloud-based IDE
Cloud9 IDE*
Model 2: Mobile backend (1)
StackMob*
Model 2: Mobile backend (2)
Parse* (Acquired by Facebook)
Model 2: Mobile backend (4)
Game Creation Platform: GameSalad*
Google Play game services
Model 3: Cloud Power > Build (1)
PhoneGap:Build ("Say goodbye to SDKs, compilers and hardware")*
Model 3: Cloud Power > Build (2)
PhoneGap XDK*
Model 3: Cloud Power (2)
Amazon Silk* (Cloud-based Browser)
Model 4: Cloud Authoring ("How did you make this presentation?")
impress.js (Prezi-style using CSS3 3D Transform)
SlideRocket
Reveal.js
Model 5: GaaS, Cloud Game*
웹브라우저도 클라우드 게임 서비스를 이용할 수 있는 좋은 플랫폼
방송·통신업계, ‘클라우드 게임’ 만지작
Model 5: Cloud Game
Multi-play and multi-screen game
PokerFun (TV)
Web GUI Builder
It is run by Eclipse OSGi and you can use it now
Interface Builder
Bootstrap Form Builder, divshot, Jetstrap
Other Development Tools
Emulator in browser
Amazon Test Drive*
Can we utilize and prototype it?
- RAD for web application
- Tizen Web Simulator - separation from Control Panel and Skin/CEF process
Or utilize Node.js?!
More about PC and targets
- Adobe Shadow (PC to multiple targets)
- Let's swap the direction...* (target to PC)
- Use Android device as Control Panel to the web application running in PC
- Web Slide Control
- MOVL
- Node.js
- Express (node web framework)
- oAuth (Sign in with twitter)
- UI
- Template Engine: EJS than Jade
- Twitter bootstrap
- DB
- MongoDB
- Hosting in no.de Smart Machine
- Route and RESTful
app.get('/documents', loadUser, documents.index); app.post('/documents.:format?', loadUser, documents.create); app.del('/sessions', function(req, res) ...); // ?
- Access control middleware
function loadUser(req, res, next) { if (req.session.user_id) { next(); } else { res.redirect('/sessions/new'); } }
IDE Concept (2)
>Realtime feedback
IDE Concept (2)
>Realtime feedback: live recompilation and reload
- HTML5, CSS3, JavaScript
- Hybrid App
Web
- Mobile Web
- Web-based IDE
- Cloud
- Development Tools
- The risk of exposing core logic
- The risk of losing local data
- Low performance: 페이스북 아이폰 앱에서 HTML5 포기
- The Web is Dead | 폐쇄된 플랫폼의 관성과 대안 OS
To study JavaScript
And you have...
BEARD to be a good programmer!
Thanks!
Visit WAC IDE Website written in HTML5/CSS3/JavaScript