Giter VIP home page Giter VIP logo

videoglitch's Introduction

Neon Bootstrap v2

Single page web app framework, scoket.io events <> Event Handlers.

For Server Framework check NeoNode

Important changes: new Event API (Wdiget events <-> backend handler) system

New handler pattern added

[Express] "/" -> index.html (with config object printed)

[Socket.io client] connect + clientId > server.clients[clientId] = new ClientHandler({socket: socket});

Full evented api over socket.io.

Every App will have a front-end client and an AppHandler on the back

[client] -[socket.io event + .data]-> [server AppHandler] has handlers for all events.

Usage

Clone:

$ git clone [email protected]:escusado/telemetry.git

Deps:

$ npm install
$ bower install

Rename project (optional)

It will rename all the info and code strings to the projectname.

ej.

//instead of default

window.app = new App();

//will transform to

window.app = new ProjectName()

//It will rename also:
'lib/app/AppHandler.js' to 'lib/app/ProjectNameHandler.js'
'public/js/app/App.js'  to 'public/js/app/ProjectName.js'
npm run rename_app

or

npm run rename_app -- -n project-name-separated-by-hiphens

If no nanme is passed name and repo will be grabbed from the .git folder

$ npm run rename_app

> [email protected] rename_app /Users/Toily/code/my-new-project
> node bin/tasks/rename_app.js

> Getting name from git repo...
> Git repo:  { name: 'my-new-project',
  repository: '[email protected]:escusado/my-new-project.git' }
> Camelized name:  MyNewProject
> Content updated
> File Written: package.json
> File Written: bower.json
> File Written: README.md
> File Written: bin/server.js
> File Written: lib/app/AppHandler.js
> File Written: public/js/app/App.js
> File Written: views/index.html
> Renamed lib/app/AppHandler.js to lib/app/MyNewProjectHandler.js
> Renamed public/js/app/App.js to public/js/app/MyNewProject.js
> Project uccesfully renamed to: my-new-project

Configs:

Edit config/server.json config/client.json

client.config gets to frontend App.js as .config where you can consume it.

Connection and reconnection is handled by the NeBootstrapClient.js Class. A simple identity is created per client to handle reconnect and socket instance sync.

printed in the config template variable on index.html

Run:

npm start

[2015-03-29] : Update

  • New jQueryless Widget (based on the Horror one)
  • Added start script npm start
  • Added rename project feature task (changes relevant strings and filenames to replace 'neon-bootstrap' to 'project-name') defailts to .git contents
  • New Event API philosophy (frontend Widgets, emit events (socket.io) to an AppHandler, that contains all handlers for them).
  • Client disconnect management through the .reconnect(<new socket>) method.

TODO

  • Build system a'la neonode global tool and an initter

videoglitch's People

Contributors

escusado avatar

Watchers

 avatar James Cloos avatar  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.