嘗試讓後端只產出 JSON 與 HTML 架構,接著讓 JavaScript 框架來渲染文章。這可以讓頁面變得簡潔許多。
後來才知道,這就叫做 API 模式、或前後端分離。
我部落格有一篇簡單的講解。不過現在看來,有很多地方可以改進。
接著是使用的技術:
- Ruby 版本 2.3.3、rails 版本 5.0.3。
- CSS 框架使用 Kube 6.5.2。
- JavaScript 框架使用 jQuery(1.12.4)做 AJAX 請求、並用 VueJS(2.3.3)做渲染。
Generate contents by JSON via AJAX only. There're some expierments and practicing VueJS anyway.
嘗試讓後端只產出 JSON 與 HTML 架構,接著讓 JavaScript 框架來渲染文章。這可以讓頁面變得簡潔許多。
後來才知道,這就叫做 API 模式、或前後端分離。
我部落格有一篇簡單的講解。不過現在看來,有很多地方可以改進。
接著是使用的技術:
Although I have Kube, the site still ugly because I have no adjust. This need to fixed.
AJAX 要考慮該使用原生語法、jQuery API、或是其他函式庫。
之前只有給 index 講解,所以大多數的頁面都還是用 Helper 的。
之後的目標,就是要所有頁面都只用 HTML + JavaScript。所有動作都要由 Vue 在一個頁面下完成。也許這就是俗稱的 SPA 吧。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.