Code Repository – a web developer’s best friend
This is why I’d like to talk about the importance of storing a local repository of your own commonly used methods, functions, CSS styles, SQL Queries, etc. There are many existing places to store and organize code.
Windows File System Folders
In a very rudimentary technique, you can just create a folder hierarchy with a bunch of text files in it. In this way, you could separate all of your coding languages, and each text file would have it’s own isolated code fragment for re-use.
This is a very flexible technique because you are not only limited to flat, code files but you can also store Photoshop files and other basic files that can be used as the brick-and-mortar for new projects.
Snippets are good!
Very overlooked are “snippets.” Snippets are part of almost every development environment, and most allow you to use a folder structure to organize your saved code, as well as options to import and export across machines and platforms.
In Dreamweaver, simply go to View -> Snippets, or hit Shift + F9. In Eclipse, you can click Window -> Show View -> OtherÂ and activate “Snippets” under the General tab. Similar actions can be taken in almost any development environment.
Wherever you store your code, empty project files, base web.config files and wireframe Photoshop PSDs, I promise they will make your life much easier by allowing you to find answers to your commonly asked questions faster. If most of your websites begin with a very similar structure, set this structure up in a generic way and save it to your repository so you can roll out new websites that much faster.
A great example of that would be a developer who specializes in WordPress sites. WordPress involves setting up a myPHP database, installing the WordPress system, modifying the connection strings, installing a theme, creating some users, etc. A great approach that I’ve employed is to do all of this to the point where customization is about to begin, then I backed up the database and site into my repository. Working with this repository, the base framework for a new WordPress site can be rolled out in minutes.
The same strategy can be employed for new mobile device apps as well. If most of your mobile apps have a top navigation, common functionality like registration, forgot password, log in, etc., a great idea would be to create the app to the point of customization, then save it to use as a base for all other new projects.
The more we can recycle and reuse code for the more mundane set up of new websites and projects, the more developers and designers can focus on the real stuff that matters – Customization.