Coder Social home page Coder Social logo

phucpnt / ng-timemachine Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 868 KB

An architecture inspired by FLUX. Supporting time travel on Angular application. Go back and forth the timeline within a click

Home Page: http://phucpnt.github.io/ng-timemachine

License: Apache License 2.0

JavaScript 94.85% HTML 5.15%

ng-timemachine's Introduction

What is the idea?

The timeline machine is structure for easy build angular application. It is heavily inspired by FLUX architecture.

With that structure you can easy manipulate the state/timeline of the application.

Let visualize the following example:

  • You are developing an angular APP. You are in the middle of implement a function which require getting data from SERVER (REST api for example).
  • To get to the point your APP firing request to SERVER, in the APP, user need to select (A), then select (B) then the APP send request to SERVER base on user selections. After request successfully return, the APP would show user screen (S)
  • Every time you need to develop or fix or update screen (S) you need to repeat the select (A) -> select (B) -> then waiting request to server -> then see if the screen (S) display correctly. If yes, it is wonderful. But most of the time you need to develop/update/fix somethings on screen (S). Then after you update your APP you need to repeat those kind of behaviors to get to see if the screen (S) works correctly.
  • Is that story sound familiar to you? ;-)

How this app structure solve the issue above:

  • With this app structure including the ngTimeMachine controls, you can easily frozen the timeline. Then you update your APP in the background and refresh browser. The APP would showing you exactly the same state you freeze the time.
  • Follow up to the story above. How this structure can be use to fix the issue:
    • You need to develop/fix/update the screen (S). At first time, as the user you do select (A) -> then select (B). Then you frozen the timeline.
    • You update your APP. Then you refresh the browser to see changes in your application. Immediately, (A) and (B) has been selected. And your APP doing the request to SERVER right away.
    • Even more what if your APP need to show some loading circle to notify the user. With the structure, you can freeze the timeline to develop the loading screen with easy.

LICENSE

Apache 2.0

ng-timemachine's People

Contributors

phucpnt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ng-timemachine's Issues

Guide for usage of the timemachine

  • Visualize the architecture of application which ng-timemachine applied on
  • How to use the store
  • How to setup the angular directive
  • How to apply the architecture into angular application project

Override things happen on each registered to time store

Things to consider

  • Register signature generation
  • Data editor made easy
  • Semi permanent memory for data return to specific register. In other words, when we refresh the page for apply change in application, the edited register data should be still applied.

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.