Best Practices For Frontend Django Developers
Polished front-end is as important as back-end.
It may scale, but bloated markup and JS will slow performance.
The implementation of the design is what the user notices.
Structure the hierarchy of static and template files.
Avoid plugin overkill. No more than 3-4.
- Prevents conflicts
- Easier to read & maintain
Don't use $(document).ready()
- Backbone with Tastypie
Tools For Rapid Development
I disagree, but not important.
- Compass Framework
- CSS authoring framework & set of utilities
- Image spriting
- Leverage the power of both back and frontends
- Share the work between them
- Class-based views for quick prototyping
Define your datatypes
- Write out the API, evaluate its design.
- Know when to make a view vs API
- Contex Processors (API keys, etc)
Testing and Performance
- Google Closure Compiler (turns simple functions into closures)
- Use a build script to minify and gzip files.
I'd recommend combining files too.
- Have a TEMPLATE_DEBUG-triggered switcher for flat/compiled static files
- Async/lazy-load JS
Or media: images, video, etc