Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHPconf 2013 - 寫好前端,不要搞瘋你的 PHP 後端工程師
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
winwu
October 08, 2013
Programming
3.4k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPconf 2013 - 寫好前端,不要搞瘋你的 PHP 後端工程師
PHPconf 2013 Lighting Talk
winwu
October 08, 2013
More Decks by winwu
See All by winwu
Google Data Studio 分享
winwu
0
180
Google Analytics 分享 3 - 內容分組/自訂廣告活動/目標/事件
winwu
0
170
Google Analytics 分享 2 - 版面配置/資訊主頁/資料層級
winwu
0
470
Google Analytics 分享 1 - 基礎知識篇
winwu
0
430
HTML_CSS_前端基礎講座-4.pdf
winwu
0
510
HTML/CSS 前端基礎講座-3
winwu
0
530
HTML/CSS 前端基礎講座-2
winwu
0
580
2016 HTML CSS 前端基礎講座-1
winwu
1
640
2016 中正大學 weic.tw - RWD
winwu
3
1.4k
Other Decks in Programming
See All in Programming
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
470
JRuby: Past, Present, and Future
headius
0
140
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
730
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
140
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
350
AHC070解法紹介
eijirou
0
130
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
150
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
130
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.1k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.5k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
sira's awesome portfolio website redesign presentation
elsirapls
0
420
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
GraphQLとの向き合い方2022年版
quramy
50
15k
Building the Perfect Custom Keyboard
takai
2
880
Tell your own story through comics
letsgokoyo
1
1.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
510
Transcript
寫好前端 不要搞瘋你的 PHP 後端⼯工程師 Lighting Talk WinWu /
[email protected]
/
winwu.github.io
其實今天沒什麼爆點 只是題⺫⽬目看起來⽐比較威…
只是想上來講講話…
About Win
Front End Engineer | 悠夏爾科技 (Now) winwu Frontend Web Developer
| 美商網碩科技 (2012.6-2013.7)
• 怎麼⾯面對 400~500 多⼈人講 lighting talk… • 熟悉 LiveScript •
Joomla! Extension • It邦幫忙 鐵⼈人賽進⾏行中… 近期研究….
M V C F2E
Let’s Start…
剛⼊入⾏行
Mock-up
How I think Mock-up <!DOCTYPE html> <head> </head> <body> ....
… … … </body>
include! Header.php slide.php footer.php
從.html 到 .php 看起來⽐比較厲害
include(‘header.php’); Include(‘nav.php’); Include(‘list_view.php’); … … … … … Include(‘footer.php’); Index.php
List_view.php foreach data
Include( ) 無敵? 不…只有⾮非常微⼩小的幫助
當我們要⾯面對 需求不斷改變
None
None
None
最後PM還⽐比較喜歡上⼀一版 (只好….改回去) 那時候還不知道有git
但是⽼老闆喜歡最後⼀一版 (只好….再改回來)
OS: PM幹嘛不⼀一開始就去問⽼老闆
PM UI Frontend Backend 溝通流程
為了減少反反覆覆的修改次數 以及溝通時間
None
列表模組 display_list.php display_list.css display_list.js
function display_list(⼀一堆設定){ //html… //return html } 強調模組功能上的獨⽴立性 負責執⾏行某項單純的功能 容易擴充功能
function display_list ( 要不要圖⽚片, 要不要rating,…){ /* 前端在 function 裡決定 顯⽰示邏輯判斷
* html 結構, css class * 組 return 字串 * return html */ } 你要哪種 layout 我都有 echo display_list( $data_ary ) ; 右:圖⽚片來源:Line 貼圖
製造模組化的元件,顯⽰示邏輯 避免砍掉重練 練習如何達到 DRY(Don‘t repeat yourself) 減輕團隊溝通的時間成本 Frontend
不⽤用⾃自⼰己組字串 <h1>’ . $v[‘conf_name’].’ </h1> (這是我的⼯工作…) 資料 (Array) 帶到 Helper
即可 / 或者是使⽤用 Helper 的⼈人 透過設定決定 layout 樣式 Frontend Backend
o 產出良好的 HTML 結構 o ⾴頁⾯面元件模組化 o 減輕重構的負擔 o re-use
的思考模式 o 做出好⽤用的 helper for 後端⼯工程師 Better F2E
結論1 寫更少 做更多 (我不是在說 jQuery) ⼤大家都輕鬆⼀一點
結論2 我曾經想過什麼時候會後端⼯工程師 瘋掉
⼤大概就是沒有前端的時候
⼀一份mock-up,兩樣情 破版/跑版/模組化只能⾃自⼰己來 UI Backend
結論3 好前端帶你上天堂。 不會讓你瘋。 右:圖⽚片來源:Line 貼圖
Thanks 謝謝⼤大家。