Skip to content

Instantly share code, notes, and snippets.

@fuyi
Last active September 23, 2015 12:23
Show Gist options
  • Save fuyi/07333cda1890a560d144 to your computer and use it in GitHub Desktop.
Save fuyi/07333cda1890a560d144 to your computer and use it in GitHub Desktop.
Halo 2.0 Web Frontend Architecture Spec

Objective

  • Enterprise grade system
  • High performance
  • Decouple frontend and backend
  • Easy to maintain (decoupled module), reduced complexity
  • Easy to scale
  • Highly resuable components

Requirements

  • Device support: Responsive Design

    • Mobile phone: xxx ??
    • Pad: xxx
    • Desktop: xxx
  • Browser support:

    • IE: 9+
    • Chrome: Latest
    • Firefox: Latest
    • Safari: Latest
  • Localization support:

    • English
    • Swedish
    • Danish
    • Norwegian
    • Finish
  • Offline mode: Yes?

Language

Framework/Libraries

JS

  • Templates:
  • Module communication:
  • Data abstraction:
  • Routing:
  • Dependency management:
  • Widget/Component:
  • Form Validation:

CSS: Bootstrap or Topcoat custom theme?

Building tool

Options are:

  • Gulp
  • Grunt
  • Webpack

Linter

  • Html linter
  • CSS linter
  • Javascript linter

Monitoring tool:

  • package monitoring: gemnasium
  • JavaScript error monitoring: Sentry
  • Performance monitoring: pindom

Code analysis: Plato

Dependency management

  • Package management : NPM
  • Module dependency: Requirejs

Supported features

  • Realtime competition leaderboard
  • Realtime chatting message (multimedia support)
  • Animation intensive leaderboard
  • Intuitive competition creation flow
  • Server side rendering ?
  • User behaviour tracking
  • Minimize dependency to third party libs, idealy to be framework agnostic

Patterns

  • Module: Seperate concern into different modules
  • Facade: abstract API to hide implementation detail
  • Mediator: Flux Dispatch Pattern

Reactjs Flux

Testing

  • Unit test
    • Test runner: karma
    • Test framework: mocha
    • Test assertion: chai
    • Test mockup: sinon
    • Test coverage: blanketjs
  • e2e test
    • Test framework: Capybara or cucumber
    • Test platform: CircleCI
  • Performance benchmark ?

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment