Skip to content

Instantly share code, notes, and snippets.

@ascott1
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save ascott1/78b0ef9d2bcab79057ac to your computer and use it in GitHub Desktop.

Select an option

Save ascott1/78b0ef9d2bcab79057ac to your computer and use it in GitHub Desktop.
fff: framework free front-end

Project Outline

Core Concepts

  • why?(aka "do one thing well" / Unix Philosophy)
  • npm (creating a package/consuming a package) / modular.js
  • browserify
  • modular CSS (using SASS or Less)
  • application structure
  • build tools
  • do you need jQuery? (I still like jQuery, but it'd be interesting to map out the ways you can use small modules to implement only the features you need)
  • testing

Useful Modules

Examples

useful tools

=========================

Application Structure

  • single app.js file as entry point
  • each widget/feature gets a folder, with something like:
    • template.js
    • index.js
    • render.js/whatev.js

Routing

with location bar:

var LocationBar = require('location-bar'),
  navigation = new LocationBar(), 
  Index = require('./index'),
  About = require('./about')

navigation.match(/^$/, function() {
  changeToView(Index)
})

navigation.match(/^about%/, function() {
  changeToView(About)
})

Resources

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