Xavier Dutreilh talks about web development. You probably use libraries like jquery and backbone. And css frameworks like bootrap. And tools like bower, grunt, yeoman and jshint.
One of the things you should care about is performance. Especially for mobile devices, you don’t want to send over too much css/js. You don’t want too exotic and hard technologies, as you as a web developer probably will lack the specialized knowledge. Accessibility is important. Cross-browser functionality, too.
But... we often disregard the wishes we enumerated above and simply look for ready-to-use framework and pile them on top of each other. And we hope everything works as we hope and expect. Which it doesn’t and we spend lots of time debugging. We inherit technical dept by piling everything up like this.
What can we do? Well, we first have to stop making such a mess in the first place and have to start looking at the requirements we figured out. The best tip is to think about individual elements.
There are standards emerging, though, for many common page elements like
accordions. Web components. You add a
tag with some style information. Or create your own html tags like
<accordion>. The technique used is called shadow DOM, which means
Importing can happen via
<link rel='import" href="accordion-template.html">
special import links.
In the end, we need to package it properly. We should at all costs make sure we don’t need to use static files bundled with a django app. Use bower to package/distribute it. When using such a package manager, watch out that you don’t pull in too many external libraries (as it is so easy to do).
A note on tools like bower (and jshint and so): they require you to have node.js installed. So that has to become a part of our development environment.
A big tip: keep your web components and your django apps separate. Let them talk via a REST API. Don’t bundle them together.
Pay attention to security. Don’t send over data in plain text. Use CSRF and CORS protection (like provided by django). Use authentication otherwise you don’t know who sends/asks you something.
Some random tips:
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):