Javascript框架:Sammy.js
這是非常簡單和小型的Web JavaScript框架。這個庫提供了便于理解和閱讀的API。
-
小型
Sammy的核心只有 16K 。壓縮之后 5.2K
-
模塊化
Sammy構建在一個插件和適配器系統之上。只要包含你需要的代碼。它也很容易提取自己的代碼為可重用的插件。
-
簡潔
整個API被設計成容易理解和閱讀。 Sammy 擁有良好的封裝和應用程序設計。
-
FUN
What's the real point of development if its not enjoyable. Sammy tries to follow the MATZ approach. It is optimized for developer happiness.
// initialize the application var app = Sammy('#main', function() { // include a plugin this.use('Mustache'); // define a 'route' this.get('#/', function() { // load some data this.load('posts.json') // render a template .renderEach('post.mustache') // swap the DOM with the new content .swap(); }); });
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!