分手之後,過得更好的兩個人

在網頁專案中常會碰到在介面上需透過資料庫提供的資料來進行呈現,這樣的介面在程式開發時通常會透過兩種方法進行, 以下針對上述的兩種方法進行一些工作方式說明與做法上的分享 。

傳統的開發模式


前、後端人員會先針對頁面設計進行可行性的討論,在前端在頁面製作完成後,逐步Release出來給後端工程師,讓後端工程師根據已經製作好的頁面進行施工,他們會在版面中加入後端程式(ASP、PHP、JSP…等),以此方式進行介面設計,最後會在後端工程師處完稿。

上圖的動態網頁版面是指將頁面串接上資料庫(Dynamic),透過資料庫的資料來進行呈現,也就是資料是”活的”,通常前端工程師會在版面中先放入一些假資料,讓後端工程師了解呈現風格,此處的動態不是指動畫,任何在頁面上的互動或動畫,應該是由前端工程師來完成。

前、後端分離


理想的做法是後端人員幾乎不用了解前端介面想如何呈現,所有API為前端人員依據頁面開需求給後端,例如產品目錄頁需要一隻API可以呈現:

  • 商品名稱
  • 價格
  • 顏色
  • 尺寸
  • 依據前端傳入的參數來定義
    • 一次給幾筆
    • 從第幾筆開始給
  • 可透過什麼條件進行篩選

以此方式進行介面設計,最後會在前端開發者處完稿。

前、後端分手後的好處

前、後端合併是傳統的合作模式,當時前端沒有好的方法可以呼叫後端API,所以所有的串接都必須由後端工程師進行協助,而自從前端程式可以透過AJAX的方式呼叫後端程式後,前、後端分離的做法就被廣為應用,他也帶來了以下的優點:

1. 權責區分明確

前、後端分離讓人員可以各自負責自己擅長的部份,前端工程師不會需要碰到伺服器端的程式,後端工程師也不會碰到前端的動畫或版面程式,能將權責清楚的區分出來,不會到時候發生網頁跑版、動畫出問題,但不清楚到底是誰動到了不該動的東西。

所以前、後端分離也就是權責上也更能夠釐清,別小看這個部分,因為這不僅僅讓雙方人員在專案開發上目標更為明確,也能夠讓專案管理變得更輕鬆。

2. 跨平台的API應用

專案中的應用平台有時不僅僅是Web,若有其他平台也有後端的需求,之前開發出來的API規格依然可以生效,就算有修改,也能依照相同的精神調整,對於後端工程師來說工作可以更單純一些。

3. 平行的開工時間

在看到ART Design所設計出來的頁面後,雙方可以迅速討論並且同時開工,不像傳統的專案,後端工程師需要等前端頁面完成後才可以施作,更能夠提升專案上的製作行程。

You may also like...

19,346 Responses

  1. ChrisCab表示:

    order amoxicillin no prescription: amoxicillin 500mg capsules price – buy amoxicillin 500mg online

  2. Best in Dubai, flipping houses. Recommend!

  3. Jameskig表示:

    http://ivermectin.store/# purchase stromectol

  4. Andrewwaize表示:

    http://amoxicillin.bid/# prescription for amoxicillin

  5. AaronduH表示:

    stromectol prices: ivermectin 50 – stromectol for sale

  6. Andrewwaize表示:

    http://azithromycin.bid/# zithromax 250

  7. ChrisCab表示:

    cost of amoxicillin prescription: amoxicillin where to get – amoxicillin in india

  8. AaronduH表示:

    buy generic clomid without dr prescription: buying generic clomid no prescription – cost clomid tablets

  9. Andrewwaize表示:

    https://clomiphene.icu/# buying generic clomid without a prescription

  10. AaronduH表示:

    cost of ivermectin 3mg tablets: ivermectin cream 1% – п»їwhere to buy stromectol online

  11. Oliverdract表示:

    zithromax buy zithromax capsules zithromax cost australia

  12. AaronduH表示:

    prednisone 20 mg prices: prednisone pack – 10 mg prednisone

  13. Oliverdract表示:

    zithromax pill can i buy zithromax over the counter buy zithromax without presc

  14. Oliverdract表示:

    prednisone pill prednisone tablet 100 mg prednisone pill prices

  15. Oliverdract表示:

    zithromax cost zithromax online no prescription zithromax 500 tablet

  16. AaronduH表示:

    can i order generic clomid pill: clomid medication – clomid pill

  17. Andrewwaize表示:

    http://clomiphene.icu/# how can i get generic clomid price

  18. Andrewwaize表示:

    http://amoxicillin.bid/# medicine amoxicillin 500mg

  19. AaronduH表示:

    cost of cheap clomid: where to buy clomid no prescription – where to buy generic clomid tablets

  20. Andrewwaize表示:

    http://azithromycin.bid/# zithromax prescription in canada

  21. AaronduH表示:

    cheap clomid without prescription: can i buy generic clomid without a prescription – can you get clomid now

  22. AaronduH表示:

    prednisone brand name in india: prednisone – prednisone 20 mg in india

  23. Oliverdract表示:

    stromectol cream stromectol sales ivermectin 6mg tablet for lice

  24. ChrisCab表示:

    where to buy cheap clomid prices: can you get generic clomid without insurance – how to buy cheap clomid price

  25. Oliverdract表示:

    where to buy amoxicillin 500mg amoxicillin online canada how much is amoxicillin prescription

  26. ChrisCab表示:

    generic amoxicillin 500mg: amoxicillin 500mg capsule – can you purchase amoxicillin online

  27. AaronduH表示:

    zithromax tablets for sale: buy zithromax – buy zithromax canada

  28. Oliverdract表示:

    mail order prednisone prednisone buy no prescription prednisone 10 mg

  29. Andrewwaize表示:

    https://azithromycin.bid/# buy generic zithromax online

  30. ChrisCab表示:

    amoxicillin 500mg capsules antibiotic: amoxicillin for sale – can you buy amoxicillin over the counter in canada

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。