SlideShare a Scribd company logo
1 of 115
Download to read offline
Front-End
Modular & Automated
   Development
  http://tinyurl.com/coscup-josephj


               / josephj /




               Cloud Connected Inc.
/josephj
               sfasdf
• 2.5
  Yahoo!
• 0.5
  YDN
• 1


• 1.5   ~
  miiiCasa
http://josephj.com


                     Solution
没



           29
    2008    5
           27
D-Link
D-Link
miiiCasa = WWW + Device =

                                  •

                                  •

                                  •

                                  •

                                  •             SNS

          http://josephj.com/entry.php?id=348
miiiCasa Space




http://www.miiicasa.com/space
                        Device
miiiCasa Bar
http://tw.yahoo.com              http://www.google.com.tw




                      http://*
                           miiiCasa
D-Link

...
D-Link
Software Engineer       Project Manager

 Service Engineer     System Architect         DBA

Front-end Engineer    QA Engineer        QA Tester

    System Analyzer      Operation Engineer


                         (Y!)     没

                                                     够
HTML/CSS/JavaScript
                  (
Azure    Firmware
Flash
          I18N/L10N     PEAR
CMS     Apache Module    Hardware

Android      Win32    Objective C

          Embedded System

            Server-side Script
•

    Fiddler Debugging Proxy

•
        HTML, CSS, JavaScript

•
    Nicholas Zakas, “Make it difficult to make
    mistakes.“
1.
Eliminating environment difference
...
JavaScript   Host        AJAX




  PHP               RD
...
•                               Host Name


•           Alpha     QA      Staging
    Production      Host
•                      Host
•
• CSS/JS
miiiCasa
•                          /etc/hosts
•        内                Host Name
    www.miiicasa.com, api.miiicasa.com,
    a.mimgs.com
•       RD         Linux
•       RD         Fiddler
• CSS 内      URL             /
•     Deploy         Shell Script       Host
1:                     Host Name
            devm1.corp.miiicasa.com:5002*
Development
            devm1.corp.miiicasa.com:50029
            w1.alpha.corp.miiicasa.com
      Alpha
            img1.alpha.corp.miiicasa.com

             www.staging.miiicasa.com
     Staging
             a.staging.mings.com

              www.miiicasa.com
 Production
              a.mimgs.com


          Commit
Host




       Port   5002*
host
 Port
Proxy PAC   FF   Chrome   换
    没
Fiddler Charles
Virtual Proxy
Charles     Fiddler

Charles
Fiddler                        Windows

           Fiddler




                     Fiddler
Fiddler Debugging Proxy
   http://tinyurl.com/josephj-fiddler
            Fiddler Debugging Proxy
                 / josephj /



                 Cloud Connected Inc.
CSS             内

            /var/www/static/home/style.css
HTTP             http://a.mimgs.com/home/style.css


#mod .bd {
    background: url(bg_empty.png);
}



#mod .bd {
    background: url(/home/bg_empty.png);
}



#mod .bd {
    background: url(http://a.mimgs.com/home/bg_empty.png);
}
CSS             内
#mod .bd {
    background: url(bg_empty.png);
}



#mod .bd {
    background: url(/home/bg_empty.png);
}



#mod .bd {
    background: url(http://a.mimgs.com/home/bg_empty.png);
}



 Performance CSS
            CSS
CSS                                                                       /
/var/www/static/miiicasa/miiicasa.css
http://a.mimgs.com/miiicasa/miiicasa.css




                                          sp_ico_misc.png
                     CSS
             http://a.mimgs.com/combo?miiicasa/miiicasa.css&foo/foo.css
Server
         /etc/hosts




  DB Access   Model
QA    Producer   Fiddler
                           Host

   Package
Shell Script       Host Name
1.1
DIV
  Modular Development
Modular Development




                   DIV
      HTML   CSS JS
yhtw_masthead




ykpmt

ykpsb


ykpimt                   ykpadv




ykpimqa         ykpimr




                         ykpug


ykpiht          ykpiht
HTML
     <div id=”nav”>
         <div class=”hd”>
             <h2>    </h2>
         </div>
ID       <div class=”bd”>         .hd, .bd, .ft
             <p>    </p>          header body footer
         </div>
         <div class=”ft”>
             <a href=”...”>   ... </a>
         </div>
     </div>
ykpsb


• ykp      +    prefix
• sb    search box
•       inc/search_box.php
id          CSS              namespace
form                               .extra



[HTML]                           [CSS]
                                 <style>
<div id=”ykpsb”>
                                 #ykpsb {
    <div class=”bd clearfix”>
                                     margin-bottom:10px;
        <form ...>
                                 }
        ...
                                 #ykpsb form {
        </form>
                                     float:left;
        <div class=”extra”>
                                 }
        ...
                                 #ykpsb .extra {
        </div>
                                     float:right;
    </div>
                                 }
</div>
                                 </style>
_photo_filter.php
                  _photo_filter.css
                  _photo_filter.js




_photo_view.php
_photo_view.css
_photo_view.js




                  _photo_list.php
                  _photo_list.css
                  _photo_list.js
HTML -




         HTML
CSS -




        CSS
JavaScript -




               JavaScript
• HTML                      include


• CSS :    ID Selector      CSS
                                      30
          30           Request
• JavaScript :   CSS
Request
static.php -                    JS/CSS



               key -




                  is_top:    </head>         </body>


                        is_noscript, media
static.php            CSS/JS
       Request


                 10    CSS Request




                                     19   JavaScript Request
Mini Tool


                                                              缩
                                                     CSS/JS




http://www.flickr.com/photos/prettypony/2644225789/
Mini   XML



                      $DEV_ROOT              Apache VirtualHost



                                  Mini module            CSS      JS



             module     module             exclude




                         index    CSS/JS
经过 Mini         压缩




/mini?module=<Mini module>&type=<css|js>
内




&nominify
static.php



  29   Request
Request   Orz...
static.php...



           29   Request
           2    Request
Request
Mini    CSS/
JavaScript
Mini
Statif File  Web Server               PHP




                           CSS/JS      Deploy

                                  s
                  *   md5_file()                 stamping
                         减 CDN
JavaScript
    JavaScript
                 Function   Object



       mod A            mod B




                        mod C
window.mods[“photo-show”] = {
  showPhoto : function (src) {
    ....
  }
}




                                 window.mods[“photo-list”] = {
                                   init : function () {
                                     ...
                                     $(“img”).on(“click”, function(e) {
                                         window.mods[“photo-show”].showPhoto(this.src);
                                      }
                                                                          没
                                   }                                         Bug!
(             )
(          )                                                 (   )




    http://www.flickr.com/photos/vincentteeuwen/2816245519/
(                                       )
                  (              )




http://www.flickr.com/photos/acaben/2477822120/
Nicholas Zakas
JavaScript




http://www.slideshare.net/nzakas/scalable-javascript-application-architecture
Loose Coupling


http://www.thesoftwaredevotional.com/images/coupling_train.jpg




                                                                    组
                                                                        组
Broadcast & Listen
            Hub
http://www.flickr.com/photos/nadesign/4324782791/
Module -
                                       Static




         Instance      Instance      Instance



      Module        Module        Module
           Static        Static        Static




  •
  •
Core -
                     Core
                                             Static

                                       Static Class




      Module        Module           Module
           Static           Static           Static




•                   (register)
•                       (start, stop)
•                                     (match)
Sandbox -                                          API
                                                 Core
                                                                                   Static


match(caller, object)
                        Sandbox              Sandbox                 Sandbox
                              Instance                Instance                Instance
                           listen(“need-love”)    broadcast(“need-love”, object)


                         Module                  Module                 Module
                                Static                   Static                    Static


              •         Instance
              •               Core                                           Sandbox
              •                             Sandbox
                  •                      broadcast                   listen
_photo_list.js
       Y.Core.register("photo-list", {
           //
           init: function (api) {
               //
               api.listen("photo-filter-submit");
               api.listen("photo-filter-response");
               this.api = api;
           },
           //              ContentReady
           onviewload: function () {
               //     Core
               this.api.broadcast("photo-list-rendered", img.src);
           },
           //
           onmessage: function (eventType, callerName, data) {
               switch (eventType) {
                   case "photo-filter-response" :
                       this._updateUI() //
                   break;
                                       `
                   case "photo-filter-submit" :
                       //
                   break;
               }
           },
           _updateUI: function (data) {
               //   诉 Core
               this.api.broadcast("photo-list-rendered", img.src);
           }
       });
Demo
http://josephj.com/project/javascript-platform-yui-demo
miiiCasa   CodeIgniter   PHP Framework
            HMVC Library
http://www.miiicasa.com/my
http://www.miiicasa.com/my




                    CodeIgniter




      controller ~/miiicasa/index/my/controllers/index.php

          views ~/miiicasa/index/my/views/index.php




                           CodeIgniter
http://www.miiicasa.com/my
http://www.miiicasa.com/my


     Controller ~/miiicasa/index/common/controllers/_masthead.php

         Views ~/miiicasa/index/common/views/_masthead.php

     JavaScript ~/miiicasa/static/index/common/_masthead.js

           CSS /miiicasa/static/index/common/_masthead.css




                                             _             div
                                                 partial    component
http://www.miiicasa.com/my


                     Controller ~/miiicasa/index/common/controllers/_masthead.php

                         Views ~/miiicasa/index/common/views/_masthead.php

                     JavaScript ~/miiicasa/static/index/common/_masthead.js

                           CSS /miiicasa/static/index/common/_masthead.css




                                                                                        ...
                                                            Shell Script
            $ codeigniter open <CI Module>/_<div Module> #
           $ codeigniter create <CI Module>/_<div Module> #


                          codeigniter open common/_masthead

vim -p /home/dev/joseph_chiang/miiicasa/index/modules/common/controllers/_masthead.php /home/dev/
joseph_chiang/miiicasa/index/modules/common/views/_masthead.php /home/dev/joseph_chiang/miiicasa/
static/common/_masthead.js /home/dev/joseph_chiang/miiicasa/static/common/_masthead.css
API
(   )
        Unit Test
Make it difficult to make mistakes
jos ephj




           http://www.flickr.com/photos/eye1/3184963395/
                                          by Ivan Mlinaric
Guidelines
As a team
...
Winchester House
http://www.crockford.com/codecamp/quality.ppt
Guideline

            Guideline
Guideline
            ...
Code Review
   没
              ...
0   1
1. Commit/Push
    Commit/Push        Hook
•   JSLint :
       JavaScript Good Parts
•   PHP CodeSniffer :
     Code Convention       PHP   JavaScript   CSS
•   OptImg


                               Commit !
document.write
          can be form of eval




JSLint
.rule {
                           attr: value;
                        }




PHP CodeSniffer (a.k.a phpcs)
Visual Designer
                PSD

 F2E



PNG8             Web

          Fireworks
Alpha Transparency (          )
Photoshop   PSD
Firework
没
OptImg:




                      46%




     Image Optimization
给 Commit
1. Commit/Push




    Guideline
2. Packaging
                      ...

 F2E                   Maintenance



        Performance    Security



       (Packaging)
2. Packaging
•   JS/CSS
    miii_index_d38eba51136ed0bf6d159770853b393b.css

          CSS

•   Static
          CSS

•   CSS                        DataURI/MHTML
                 CSS Sprites
pkg_create
         JS/CSS
                      Mini




                     pkg_deploy




pkg_create & pkg_deploy
2. Packaging


                      CSS/JS
        CSS Sprites
      DataURI/MHTML
Review
•



•
                  Performance


•

         Performance
•   JavaScript Module Platform @ GitHub
    http://github.com/josephj/javascript-platform-yui


    •   Online Demo
        http://josephj.com/project/javascript-platform-yui-demo
    •   Demo Source @ GitHub
        http://github.com/josephj/javascript-plaform-yui-demo
Thank You
                                                    so muchiii
                                                     Any Questions?
                                                     josephj6802@gmail.com



http://www.flickr.com/photos/phploveme/2847931240/

More Related Content

What's hot

Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the CloudJames Thomas
 
从YUI2到YUI3看前端的演变
从YUI2到YUI3看前端的演变从YUI2到YUI3看前端的演变
从YUI2到YUI3看前端的演变Kejun Zhang
 
分层语义化模板实践 ---- 张克军
分层语义化模板实践 ---- 张克军分层语义化模板实践 ---- 张克军
分层语义化模板实践 ---- 张克军裕波 周
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with IonicMorris Singer
 
Freeing the cloud, one service at a time
Freeing the cloud, one service at a timeFreeing the cloud, one service at a time
Freeing the cloud, one service at a timeFrancois Marier
 
從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zero從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zeroShi-Ken Don
 
하루프레스
하루프레스하루프레스
하루프레스Rhio Kim
 
JavaScript For People Who Don't Code
JavaScript For People Who Don't CodeJavaScript For People Who Don't Code
JavaScript For People Who Don't CodeChristopher Schmitt
 
Devdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for DevelopersDevdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for Developerscody lindley
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Matt Raible
 
[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web DesignChristopher Schmitt
 
Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Ralph Whitbeck
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...Matt Raible
 
jQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontojQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontoRalph Whitbeck
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5osa_ora
 
Overview of Backbone
Overview of BackboneOverview of Backbone
Overview of BackboneJohn Ashmead
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
 

What's hot (20)

Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the Cloud
 
从YUI2到YUI3看前端的演变
从YUI2到YUI3看前端的演变从YUI2到YUI3看前端的演变
从YUI2到YUI3看前端的演变
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
分层语义化模板实践 ---- 张克军
分层语义化模板实践 ---- 张克军分层语义化模板实践 ---- 张克军
分层语义化模板实践 ---- 张克军
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with Ionic
 
Freeing the cloud, one service at a time
Freeing the cloud, one service at a timeFreeing the cloud, one service at a time
Freeing the cloud, one service at a time
 
從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zero從零開始的爬蟲之旅 Crawler from zero
從零開始的爬蟲之旅 Crawler from zero
 
하루프레스
하루프레스하루프레스
하루프레스
 
JavaScript For People Who Don't Code
JavaScript For People Who Don't CodeJavaScript For People Who Don't Code
JavaScript For People Who Don't Code
 
Devdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for DevelopersDevdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for Developers
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design
 
Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
 
Road to Rails
Road to RailsRoad to Rails
Road to Rails
 
jQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontojQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days Toronto
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5
 
Overview of Backbone
Overview of BackboneOverview of Backbone
Overview of Backbone
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 

Similar to 建立前端開發團隊 - 2011 中華電信訓練所版

Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićMeetMagentoNY2014
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Ontico
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Nicholas Zakas
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and RenderingStoyan Stefanov
 
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenBuilding Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenOliver Ochs
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutionswoutervugt
 
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015beyond tellerrand
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimizationStoyan Stefanov
 
Beyond CSS Architecture
Beyond CSS ArchitectureBeyond CSS Architecture
Beyond CSS Architecture拓樹 谷
 
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Nicholas Zakas
 
JavaScript Modules in Practice
JavaScript Modules in PracticeJavaScript Modules in Practice
JavaScript Modules in PracticeMaghdebura
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designersPai-Cheng Tao
 
Make your website 2 times faster
Make your website 2 times fasterMake your website 2 times faster
Make your website 2 times fasterSatoshi Kikuchi
 
Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development Joseph Chiang
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角Mei-yu Chen
 

Similar to 建立前端開發團隊 - 2011 中華電信訓練所版 (20)

Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje Jurišić
 
DirectToWeb 2.0
DirectToWeb 2.0DirectToWeb 2.0
DirectToWeb 2.0
 
Death of a Themer
Death of a ThemerDeath of a Themer
Death of a Themer
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and Rendering
 
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenBuilding Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
 
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimization
 
Beyond CSS Architecture
Beyond CSS ArchitectureBeyond CSS Architecture
Beyond CSS Architecture
 
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
 
JavaScript Modules in Practice
JavaScript Modules in PracticeJavaScript Modules in Practice
JavaScript Modules in Practice
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
 
Make your website 2 times faster
Make your website 2 times fasterMake your website 2 times faster
Make your website 2 times faster
 
Web-Performance
Web-PerformanceWeb-Performance
Web-Performance
 
Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development Front-end Modular & Autmomated Development
Front-end Modular & Autmomated Development
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角
 
Please dont touch-3.6-jsday
Please dont touch-3.6-jsdayPlease dont touch-3.6-jsday
Please dont touch-3.6-jsday
 

More from Joseph Chiang

不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会Joseph Chiang
 
Automatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsAutomatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsJoseph Chiang
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)Joseph Chiang
 
JavaScript Code Quality
JavaScript Code QualityJavaScript Code Quality
JavaScript Code QualityJoseph Chiang
 
前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練Joseph Chiang
 
Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練Joseph Chiang
 
Debugging - 前端工程開發實務訓練
 Debugging - 前端工程開發實務訓練 Debugging - 前端工程開發實務訓練
Debugging - 前端工程開發實務訓練Joseph Chiang
 
Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Joseph Chiang
 
Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Joseph Chiang
 
前端工程開發實務訓練
前端工程開發實務訓練前端工程開發實務訓練
前端工程開發實務訓練Joseph Chiang
 
YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練Joseph Chiang
 
CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練Joseph Chiang
 
HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練Joseph Chiang
 
模块加载策略 - 2012 SDCC, 北京
模块加载策略 - 2012 SDCC, 北京模块加载策略 - 2012 SDCC, 北京
模块加载策略 - 2012 SDCC, 北京Joseph Chiang
 
YUI is Sexy (for JSDC.tw)
YUI is Sexy (for JSDC.tw)YUI is Sexy (for JSDC.tw)
YUI is Sexy (for JSDC.tw)Joseph Chiang
 
YUI is Sexy - 使用 YUI 作為開發基礎
YUI is Sexy - 使用 YUI 作為開發基礎YUI is Sexy - 使用 YUI 作為開發基礎
YUI is Sexy - 使用 YUI 作為開發基礎Joseph Chiang
 

More from Joseph Chiang (20)

不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会
 
Let's Redux!
Let's Redux!Let's Redux!
Let's Redux!
 
Automatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsAutomatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabs
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)
 
JavaScript Promise
JavaScript PromiseJavaScript Promise
JavaScript Promise
 
F2E for Enterprise
F2E for EnterpriseF2E for Enterprise
F2E for Enterprise
 
JavaScript Code Quality
JavaScript Code QualityJavaScript Code Quality
JavaScript Code Quality
 
F2E, the Keystone
F2E, the KeystoneF2E, the Keystone
F2E, the Keystone
 
前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練前端的未來 - 前端工程實務訓練
前端的未來 - 前端工程實務訓練
 
Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練Performance 入門 - 前端工程開發實務訓練
Performance 入門 - 前端工程開發實務訓練
 
Debugging - 前端工程開發實務訓練
 Debugging - 前端工程開發實務訓練 Debugging - 前端工程開發實務訓練
Debugging - 前端工程開發實務訓練
 
Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練
 
Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練
 
前端工程開發實務訓練
前端工程開發實務訓練前端工程開發實務訓練
前端工程開發實務訓練
 
YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練YUI 教學 - 前端工程開發實務訓練
YUI 教學 - 前端工程開發實務訓練
 
CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練CSS 入門 - 前端工程開發實務訓練
CSS 入門 - 前端工程開發實務訓練
 
HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練HTML 入門 - 前端工程開發實務訓練
HTML 入門 - 前端工程開發實務訓練
 
模块加载策略 - 2012 SDCC, 北京
模块加载策略 - 2012 SDCC, 北京模块加载策略 - 2012 SDCC, 北京
模块加载策略 - 2012 SDCC, 北京
 
YUI is Sexy (for JSDC.tw)
YUI is Sexy (for JSDC.tw)YUI is Sexy (for JSDC.tw)
YUI is Sexy (for JSDC.tw)
 
YUI is Sexy - 使用 YUI 作為開發基礎
YUI is Sexy - 使用 YUI 作為開發基礎YUI is Sexy - 使用 YUI 作為開發基礎
YUI is Sexy - 使用 YUI 作為開發基礎
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

建立前端開發團隊 - 2011 中華電信訓練所版

  • 1. Front-End Modular & Automated Development http://tinyurl.com/coscup-josephj / josephj / Cloud Connected Inc.
  • 2. /josephj sfasdf • 2.5 Yahoo! • 0.5 YDN • 1 • 1.5 ~ miiiCasa
  • 4. 29 2008 5 27
  • 6. miiiCasa = WWW + Device = • • • • • SNS http://josephj.com/entry.php?id=348
  • 8. miiiCasa Bar http://tw.yahoo.com http://www.google.com.tw http://* miiiCasa
  • 11. Software Engineer Project Manager Service Engineer System Architect DBA Front-end Engineer QA Engineer QA Tester System Analyzer Operation Engineer (Y!) 没 够
  • 13. Azure Firmware Flash I18N/L10N PEAR CMS Apache Module Hardware Android Win32 Objective C Embedded System Server-side Script
  • 14. Fiddler Debugging Proxy • HTML, CSS, JavaScript • Nicholas Zakas, “Make it difficult to make mistakes.“
  • 16. ... JavaScript Host AJAX PHP RD
  • 17.
  • 18. ...
  • 19.
  • 20. Host Name • Alpha QA Staging Production Host • Host • • CSS/JS
  • 21. miiiCasa • /etc/hosts • 内 Host Name www.miiicasa.com, api.miiicasa.com, a.mimgs.com • RD Linux • RD Fiddler • CSS 内 URL / • Deploy Shell Script Host
  • 22. 1: Host Name devm1.corp.miiicasa.com:5002* Development devm1.corp.miiicasa.com:50029 w1.alpha.corp.miiicasa.com Alpha img1.alpha.corp.miiicasa.com www.staging.miiicasa.com Staging a.staging.mings.com www.miiicasa.com Production a.mimgs.com Commit
  • 23. Host Port 5002*
  • 25. Proxy PAC FF Chrome 换 没
  • 27. Charles Fiddler Charles Fiddler Windows Fiddler Fiddler
  • 28. Fiddler Debugging Proxy http://tinyurl.com/josephj-fiddler Fiddler Debugging Proxy / josephj / Cloud Connected Inc.
  • 29. CSS 内 /var/www/static/home/style.css HTTP http://a.mimgs.com/home/style.css #mod .bd { background: url(bg_empty.png); } #mod .bd { background: url(/home/bg_empty.png); } #mod .bd { background: url(http://a.mimgs.com/home/bg_empty.png); }
  • 30. CSS 内 #mod .bd { background: url(bg_empty.png); } #mod .bd { background: url(/home/bg_empty.png); } #mod .bd { background: url(http://a.mimgs.com/home/bg_empty.png); } Performance CSS CSS
  • 31. CSS / /var/www/static/miiicasa/miiicasa.css http://a.mimgs.com/miiicasa/miiicasa.css sp_ico_misc.png CSS http://a.mimgs.com/combo?miiicasa/miiicasa.css&foo/foo.css
  • 32. Server /etc/hosts DB Access Model
  • 33. QA Producer Fiddler Host Package Shell Script Host Name
  • 34. 1.1
  • 35. DIV Modular Development
  • 36. Modular Development DIV HTML CSS JS
  • 37.
  • 38. yhtw_masthead ykpmt ykpsb ykpimt ykpadv ykpimqa ykpimr ykpug ykpiht ykpiht
  • 39. HTML <div id=”nav”> <div class=”hd”> <h2> </h2> </div> ID <div class=”bd”> .hd, .bd, .ft <p> </p> header body footer </div> <div class=”ft”> <a href=”...”> ... </a> </div> </div>
  • 40. ykpsb • ykp + prefix • sb search box • inc/search_box.php
  • 41. id CSS namespace form .extra [HTML] [CSS] <style> <div id=”ykpsb”> #ykpsb { <div class=”bd clearfix”> margin-bottom:10px; <form ...> } ... #ykpsb form { </form> float:left; <div class=”extra”> } ... #ykpsb .extra { </div> float:right; </div> } </div> </style>
  • 42.
  • 43. _photo_filter.php _photo_filter.css _photo_filter.js _photo_view.php _photo_view.css _photo_view.js _photo_list.php _photo_list.css _photo_list.js
  • 44. HTML - HTML
  • 45. CSS - CSS
  • 46. JavaScript - JavaScript
  • 47. • HTML include • CSS : ID Selector CSS 30 30 Request • JavaScript : CSS
  • 49. static.php - JS/CSS key - is_top: </head> </body> is_noscript, media
  • 50. static.php CSS/JS Request 10 CSS Request 19 JavaScript Request
  • 51. Mini Tool 缩 CSS/JS http://www.flickr.com/photos/prettypony/2644225789/
  • 52. Mini XML $DEV_ROOT Apache VirtualHost Mini module CSS JS module module exclude index CSS/JS
  • 53. 经过 Mini 压缩 /mini?module=<Mini module>&type=<css|js>
  • 55. static.php 29 Request
  • 56. Request Orz...
  • 57. static.php... 29 Request 2 Request
  • 59. Mini CSS/ JavaScript
  • 60. Mini Statif File Web Server PHP CSS/JS Deploy s * md5_file() stamping 减 CDN
  • 61.
  • 62. JavaScript JavaScript Function Object mod A mod B mod C
  • 63.
  • 64. window.mods[“photo-show”] = { showPhoto : function (src) { .... } } window.mods[“photo-list”] = { init : function () { ... $(“img”).on(“click”, function(e) { window.mods[“photo-show”].showPhoto(this.src); } 没 } Bug!
  • 65. ( ) ( ) ( ) http://www.flickr.com/photos/vincentteeuwen/2816245519/
  • 66. ( ) ( ) http://www.flickr.com/photos/acaben/2477822120/
  • 71.
  • 73. Module - Static Instance Instance Instance Module Module Module Static Static Static • •
  • 74. Core - Core Static Static Class Module Module Module Static Static Static • (register) • (start, stop) • (match)
  • 75. Sandbox - API Core Static match(caller, object) Sandbox Sandbox Sandbox Instance Instance Instance listen(“need-love”) broadcast(“need-love”, object) Module Module Module Static Static Static • Instance • Core Sandbox • Sandbox • broadcast listen
  • 76. _photo_list.js Y.Core.register("photo-list", { // init: function (api) { // api.listen("photo-filter-submit"); api.listen("photo-filter-response"); this.api = api; }, // ContentReady onviewload: function () { // Core this.api.broadcast("photo-list-rendered", img.src); }, // onmessage: function (eventType, callerName, data) { switch (eventType) { case "photo-filter-response" : this._updateUI() // break; ` case "photo-filter-submit" : // break; } }, _updateUI: function (data) { // 诉 Core this.api.broadcast("photo-list-rendered", img.src); } });
  • 78. miiiCasa CodeIgniter PHP Framework HMVC Library
  • 80. http://www.miiicasa.com/my CodeIgniter controller ~/miiicasa/index/my/controllers/index.php views ~/miiicasa/index/my/views/index.php CodeIgniter
  • 82. http://www.miiicasa.com/my Controller ~/miiicasa/index/common/controllers/_masthead.php Views ~/miiicasa/index/common/views/_masthead.php JavaScript ~/miiicasa/static/index/common/_masthead.js CSS /miiicasa/static/index/common/_masthead.css _ div partial component
  • 83. http://www.miiicasa.com/my Controller ~/miiicasa/index/common/controllers/_masthead.php Views ~/miiicasa/index/common/views/_masthead.php JavaScript ~/miiicasa/static/index/common/_masthead.js CSS /miiicasa/static/index/common/_masthead.css ... Shell Script $ codeigniter open <CI Module>/_<div Module> # $ codeigniter create <CI Module>/_<div Module> # codeigniter open common/_masthead vim -p /home/dev/joseph_chiang/miiicasa/index/modules/common/controllers/_masthead.php /home/dev/ joseph_chiang/miiicasa/index/modules/common/views/_masthead.php /home/dev/joseph_chiang/miiicasa/ static/common/_masthead.js /home/dev/joseph_chiang/miiicasa/static/common/_masthead.css
  • 84. API ( ) Unit Test
  • 85. Make it difficult to make mistakes
  • 86.
  • 87. jos ephj http://www.flickr.com/photos/eye1/3184963395/ by Ivan Mlinaric
  • 89.
  • 91.
  • 92. ...
  • 94. Guideline Guideline
  • 95. Guideline ...
  • 96. Code Review 没 ...
  • 97. 0 1
  • 98. 1. Commit/Push Commit/Push Hook • JSLint : JavaScript Good Parts • PHP CodeSniffer : Code Convention PHP JavaScript CSS • OptImg Commit !
  • 99. document.write can be form of eval JSLint
  • 100. .rule { attr: value; } PHP CodeSniffer (a.k.a phpcs)
  • 101. Visual Designer PSD F2E PNG8 Web Fireworks Alpha Transparency ( )
  • 102. Photoshop PSD
  • 104.
  • 105. OptImg: 46% Image Optimization
  • 107. 1. Commit/Push Guideline
  • 108. 2. Packaging ... F2E Maintenance Performance Security (Packaging)
  • 109. 2. Packaging • JS/CSS miii_index_d38eba51136ed0bf6d159770853b393b.css CSS • Static CSS • CSS DataURI/MHTML CSS Sprites
  • 110. pkg_create JS/CSS Mini pkg_deploy pkg_create & pkg_deploy
  • 111. 2. Packaging CSS/JS CSS Sprites DataURI/MHTML
  • 112.
  • 113. Review • • Performance • Performance
  • 114. JavaScript Module Platform @ GitHub http://github.com/josephj/javascript-platform-yui • Online Demo http://josephj.com/project/javascript-platform-yui-demo • Demo Source @ GitHub http://github.com/josephj/javascript-plaform-yui-demo
  • 115. Thank You so muchiii Any Questions? josephj6802@gmail.com http://www.flickr.com/photos/phploveme/2847931240/