0.2.9 • Published 8 years ago

spa-jquery v0.2.9

Weekly downloads
16
License
MIT
Repository
github
Last release
8 years ago

SPA jQuery

Simple SPA js framework based on jQuery.

Why

It's simple and familar with jQuery users. Even you can use jQuery code in this framework.

Most front-end developers are familar with jQuery, but jQuery doesn't support architecture. Just make things possible, getting messed often. To solve this problem, some people suggest huge and new framemworks and libraries such as AngularJS, Amber, React. But learning these heavies are very tough. I suggest SPA jQuery.

What you only need are:

  • jQuery skills
  • Node.js
  • Terminal to run Node command
  • Web browser to see what's going on

Preview example

<!--UserList.html-->
<ul></ul>
<!--UserListItem.html-->
<li></li>
var SPA = require('spa-jquery');
var Component = SPA.Component;

Component.define('UserList', {
  users : [],
  
  render : function(){
    var $self = this;
    
    Component.create('UserListItem').times(this.users).then(function($userListItems){
      $userListItems.forEach(function($item){
        $item.update({
          user : user
        });
      });
      
      $self.append($userListItems);
    });
  }
});

Component.define('UserListItem', {
  user : null,
  
  render : function(){
    this.text(this.user.name);
  }
});

Component.create('UserList').then(function($userList){
  //Root component is a child of <body> generated by Component automatically
  Component.getRootComponent().append($userList);
});

Installation

$ npm install spa-jquery

Usage

Checkout Tutorial and Documents

Demo

Demo page and the source code.

How to contribute

Welcome issues and pull requests! Please create an issue before making pull requests. I'll reply asap. Also if you want to become a contributer please contact me by my email written in my github account.

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago