Giter Club home page Giter Club logo

endev's Introduction

EndevJS

EndevJS lets you work with data coming from popular web services by simply annotating HTML with data queries. No need to write AJAX calls or deal with JavaScript callbacks. In fact, no need to write JavaScript at all.

Setup

You need to include the stand alone endev.full.js in your HTML which includes also all the needed dependencies (Angular, Firebase, etc.):

<script src="http://www.endevjs.org/endev.full.js"/>

Alternatively, you use the stripped down endev.js and include the needed libraries yourself:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore.js"></script>
<!-- Including Firebase and AngularFire is optional and needed only if you are going to use Firebase data  -->
<script src="https://cdn.firebase.com/js/client/2.2.3/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/1.0.0/angularfire.min.js"></script>
<script src="http://www.endevjs.org/endev.js"/>

If you prefer using Bower you can install it as:

$ bower install endev --save

How to use

Here is a simple example of a ToDo list app. You can also check it out running and fork it from CodePen:

<h4>Create a new task</h4>
<input data-value="newTask"/>
<button insert-into="firebase:TodoList" data-click="insert({name:newTask,done:false})">Add task</button>
<h4>My tasks</h4>
<div from="firebase:TodoList item" where="item.done = false" auto-update="true">
  <input type="checkbox" data-value="item.done"/> <input data-value="item.name"/>
  <button data-click="update(item)"></button>
</div>

Check out the tutorial to learn how to use Endev to access various data sources and build protoypes quickly.

Supported data providers

The following providers are supported out of the box with Endev:

  • local: uses browser's local storage.
  • firebase: uses Firebase. Check bellow on how to configure.
  • yql: (read-only) uses YQL to uniformly (one syntax) access more than thousand APIs (check community table in YQL Console) including popluar ones like twitter, Facebook, Google, etc. The generic data tables (json, xml, html, etc.) also allow you to read any data coming in that format.
  • http: or https: (read-only) can be used to read any REST API that returns JSON or XML and supports CORS. In case the API you want to use doesn't support CORS, you can use yql as shown in this CodePen example from the tutorial.

Firebase settings

If you're using Firebase as the data provider Endev will, by default, access the it's own storage where data for many examples is stored. If you're just testing out that is fine, but if you use common name for your collection (e.g. ToDo, Books, etc.) chances are that the name is already used by other apps so you might get your data mixed up.

To setup your own storage, create an account at Firebase and add following code to your HTML:

<script>
endev.firebaseProvider = {
    path: 'https://YOUR_FIREBASE_STORAGE_NAME.firebaseio.com'
}
</script>

Built on top of AngularJS

Endev.js is built on top of AngularJS and uses Angular's mechanism to provide data binding.

endev's People

Contributors

filipkis avatar

Watchers

James Cloos avatar Chema Fernández Varela avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.