SlideShare una empresa de Scribd logo
1 de 66
Descargar para leer sin conexión
スマートフォン時代のWeb制作術 Vol.2




                   2013年2月12日
                   DeNA渋谷
                   原 一成 @herablog
まずは運だめし!
まずは運だめし!
http://goo.gl/VZrbd
   ・WebKit系でお願いします
 ・ニックネームを入力してください
プレゼントがあります!
おめでとうございます。
そこで、問題です
まゆまろは?
1      2




3      4
まゆまろは?
1      2




3      4
まゆまろの特徴で正しくないものは?
   1         2
             まんまる
       3歳
              おめめ


   3         4
       乱暴者        階段
       が苦手       が苦手
まゆまろの特徴で正しくないものは?
   1         2
             まんまる
       3歳
              おめめ


   3         4
       乱暴者        階段
       が苦手       が苦手
100万円が欲しい
1          2
               欲しく
    欲しい!
               ない!


3          4
100万円が欲しい
1          2
               欲しく
    欲しい!
               ない!


3          4
原 一成        Hara Kazunari
Web Developer
CyberAgent, Inc.
@herablog




HTML/CSS/JavaScript
@herablog




@herablog
スマートフォン
PV数 (億PV)
150

                                                                                                                                133

                                                                                                                          120
                                                                                                                    109
                                                                                                           104103
                                                                                                      99
100
                                                                                                 91
                                                                                            85
                                                                                       76
                                                                                  67
                                                                             61

 50                                                                  45 47
                                                                35
                                                        28 30
                                                20 21
                                           17
                                    13
                       7   9   9 11
           3   3   5
       2
  0
      10.1011 12 11.1 2    3   4   5   6   7    8   9 10 11 12 12.1 2        3    4    5    6    7    8     9 10 11 12 13.1
PV数 (億PV)
150

                                                                                                                                133

                                                                                                                          120
                                                                                                                    109
                                                                                                           104103
                                                                                                      99
100
                                                                                                 91
                                                                                            85
                                                                                       76
                                                                                  67
                                                                             61

 50                                                                  45 47
                                                                35
                                                        28 30
                                                20 21
                                           17
                                    13
                       7   9   9 11
           3   3   5
       2
  0
      10.1011 12 11.1 2    3   4   5   6   7    8   9 10 11 12 12.1 2        3    4    5    6    7    8     9 10 11 12 13.1
役割の変化




            Front      Server
Designer
           Engineer   Engineer
役割の変化




            Front      Server
Designer
           Engineer   Engineer
役割の変化



Designer
 ・レイアウト
 ・高度なWebデザイン
 ・イラストレーションが専門化
 ・インタラクションに関与
役割の変化




            Front      Server
Designer
           Engineer   Engineer
役割の変化



Front Engineer

 ・HTML/CSS + JavaScript
 ・プログラム知識(モジュール化)
 ・サーバー知識
 ・コマンドライン操作
役割の変化




            Front      Server
Designer
           Engineer   Engineer
役割の変化



Server Engineer
 ・プログラム、サーバー知識
 ・API作成知識    (REST, Status Code)

 ・最適なインフラ構成構築
 ・JavaScriptなどHTML5関連
役割の変化



スマホ時代には

・Front/Severをつなぐ必要あり
・デザイン, インフラはより専門化
スマートフォン
スマートフォン




   HTML5/CSS3


   JavaScript


   パフォーマンス
スマートフォン




   HTML5/CSS3


   JavaScript


   パフォーマンス
node.js




  スケーラブル


  非同期


  JavaScriptである
node.js




  スケーラブル


  非同期


  JavaScriptである
役割の変化




            Front      Server
Designer
           Engineer   Engineer
node.js




  スケーラブル


  非同期


  JavaScriptである
アーキテクチャ
Ameba
アーキテクチャ
アーキテクチャ

 Front           Server
Engineer        Engineer
アーキテクチャ

 Front      Server
Engineer   Engineer
アーキテクチャ

 Front      Server
Engineer   Engineer
jade




・テンプレートエンジン
・インデント形式で閉じタグいらず
・変数や分岐、include
・テンプレート継承が便利
jade

base.jade                       index.jade
!!! 5                           extends ./base
html
  head                          block contents
       block title                   div#contents
         title Event 20130212
  body                          block append scripts
       block header                  script(src=‘js/core.js’)
       block contents
       //- load scripts
       block scripts
         script(src='/js/main.js')
express




・よく使われているフレームワーク
・Connectというミドルウェアを
使っている
・簡単にWebアプリを作れる
express

// create web server
var express = require('express');
var app = express();
app.configure(function() {
  // jade setting
  app.set('view engine','jade');
  app.set('views', path.join(basedir, '/template/
jade'));
  // static server setting
  app.use(express['static'](path.join(basedir, '/
public')));
});
express


// routing
app.get('/', function(req, res){
  res.render('index');
});


// start server
var server = http.createServer(app).listen(port,
function(){
  console.log('server started port on ' + port);
});
socket.io




・リアルタイム通信を実現
・ブラウザごとに最適な方式を選択
 WebSocket/XHR Polling/Flashなど

・もうすぐ1.0リリース
クラウド



・システム運用をアウトソース
・思い立ったらすぐリリースできる
・大体最初は無料
・たくさんのサービスから選択できる
 AWS/Google App Engine/dotCloudなど
Heroku



                         ・gitと連携

heroku login             ・デフォルトは無料
heroku create
git push heroku master   ・Add-onで課金
                         ・多くの言語に対応
                         Ruby/Node/Python/Scalaなど
JSライブラリ
JSライブラリ
JSライブラリ




  軽量


  MVCフレームワーク
JS独自ライブラリ




                chikuwa.js
                chikuwa-view.js
                chikuwa-dispatcher.js


https://github.com/ameba-proteus/chikuwa.js
chikuwa.js



40

                            32KB
30


20

     7KB          10KB
10


 0
     chikuwa       zepto    jQuery
テンプレートエンジン



Chikuwa                            HTML
var notiCount = getNotiCount();    <header>
tag( header )                        <button class= menu ></button>
  .tag( button.menu ).gat()          <h1>Ameba</h1>
  .tag( h1 ).text( Ameba ).gat()     <button class= noti >
  .tag( button.noti )                  <span class= counter >1</span>
    .tag( span.counter )             </button>
       .text(notiCount).gat()      </header>
  .gat();
View & Routing


View                                     Routing
$.views({                                $.routes( group , {
      group.top : {                            /:              {name: top , action: top },
          init: function(data) {               /:groupId/info : {name: info , action: info }
               this.data = data ¦¦ {};   });
          },
          render: function() {           Action
               return tag( div );        function top(vars) {
          }                                    var view = $.view( group.top );
      }                                        page.replace(view);
});                                      }
モジュール別開発



メッセージ          サークル
message.js     circle.js
message.css    circle.css


プロフィール         掲示板
profile.js      board.js
profile.css     board.css
スマートフォン




   HTML5/CSS3


   JavaScript


   パフォーマンス
Canvas



HTML
<canvas id=”canvas”></canvas>


JavaScript
var canvas = document.getElementById(‘canvas’);
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(10, 10);
ctx.lineTo(100, 10);
ctx.closePath();
CSS: transform



<div data-parts=”f_body” style=”-webkit-
transform: matrix(0.1, 0, 0, 0.1, 1.8,
-43.7);”>
  <img src=”data:~~”>
</div>


<div data-parts=”f_body” style=”-webkit-
transform: matrix(0.99, 0, 0, 0.99, 0.75,
-40.5);”>
  <img src=”data:~~”>
</div>
Audio
Web Font
スマートフォン時代のWeb制作術 Vol.1
 Selectors API / Canvas / CSS Transform
    Audio / Local Storage / Web Font
            パフォーマンス改善




   http://www.slideshare.net/herablog

Más contenido relacionado

Último

Último (7)

LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

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

スマートフォン時代のWeb制作術 Vol.2