Tips and Tricks
Episode 26
In this episode we share some of our tips and tricks that we've picked up along our many web development and design adventures.
Segment 1 - Matt’s Tips & Tricks
- Server/Hosting Management
- Common things like this include: WordPress updates (plugin updates), migrating to a different server/host, testing a new major feature, adding something a client has requested - but you think won’t work out which will result in a rollback
- Always backup files and databases that you won’t be able to get back in their existing state
- Be wary of new commands if you have command line access, especially if they’re aimed at deleting files, or folders
- Have a recovery plan before you begin so that you can quickly and easily rollback your changes if something goes terribly wrong - planning this out properly may require you to take full backups, prepare a re-upload solution, research re-installation information on some of the software you’re using
- Have a testing environment setup that mimics your production environment preferably
- CSS
- Don’t be afraid of simply setting up a skeleton before moving onto a different part of the site - having a skeleton of the top bar while branding is being figured out is a good way to get started on the site, and frees you up to spend more time on other elements that are more definitive (ie slider, contact form, etc.)
- Make your class names easily identifiable, whether you use a naming convention or not, at the very least use something that you’ll be able to identify later and that other developers would be able to pickup on if they interact with your project in the future (example classnames: navbar, nav-item, footer, topbar)
- Comments (and this goes for other languages to) should be done to clarify things for yourself in the future, or for other developers down the road, however, sometimes you understand something using references in your own head - do not hesitate to make comments specific to you if you’re actively working on the project, using references that only you understand - making the comments more generic for others when production hits
- Test responsivity with true window widths, not just responsive tools, sometimes these tools don’t reflect exactly how different browser window widths will actually react which can result in some overflow left-to-right or some broken elements altogether
Segment 2 - Mikes Tips and Tricks (JS Tips)
- Use a scope variable
- If you’re using just straight javascript for a single page or multipage website create a scope global variable. Make sure that this is your only global variable for the whole project but if you need to pass state or variables between files or pages then use only scope to keep some form of structure and minimize conflicts
- Use libraries when necessary
- Make sure it has been updated in the past year at least
- Make sure the documentation is fairly easy to understand
- Check the Open issues tab in github and make sure that there are plenty of closed issues and check those closed issues to make sure you are fine with the answers given as if you have an issue you will have a similar experience