This post is Part 2 of The Beginner’s Guide To Writing a jQuery Plugin.
One of the challenges of working in the development space is having to fight the urge to jump right into writing code at the very beginning of a project.
The truth is that identifying the core features and planning out the project can go a long way in saving time and effort when the time comes for implementation.
Before we begin working on the actual plugin, we need to identify the requirements of what we’re building.
Throughout the remainder of this series, we’re going to be building a slideshow plugin for jQuery.
The first iteration is going to focus on getting basic slideshow functionality in place. The second iteration will allow users to specify different options and will introduce some nicer jQuery effects.
1. A Word About Feature Creep
Slideshows are relatively simple tools with primary features that are easy to identify, but when it comes to development-related projects, feature creep can start extremely early.
Remember, this is a first iteration and simplicity is key. At this point, we’re laying the foundation for what we’re going to be building out over the course of the project.
The challenge is not trying to determine the impressive features we should bake into the project, but trying to determine what the core of our project is. The basic features should help us determine our requirements.
2. Identify The Requirements
When it comes to working on smaller projects, identifying requirements can usually be as simple as listing out the core features.
In our case, the core features of a slideshow…
- Accepts a collection of images
- Displays one image at a time at a specified interval
- Repeats the slideshow
That’s it – easy enough, right?
3. Plan The Iteration
Once the requirements are in place, developers like to scope an iteration which is essentially an approach to tackling each of the requirements. Properly scoping a project can have a significant pay off in implementation and maintainability.
Note that requirements and iteration planning are relevant to all fields of development – be it sites, software, plugins, etc – not just certain projects.
At this point, we are not ready to begin writing code but we are ready begin thinking in terms of a high-level implementation:
- Gather several images to be used in the slideshow
- Include the images in the markup of the page we created in Part 1
- Determine how long we want each image to display
- Stub out the JavaScript code that will eventually drive the plugin
Over the next two posts in the series, we’re going to be doing exactly that. For now, I’ve gone ahead and included a few images that we’ll be using for the slideshow in the project.
You can download an archive of the source files from the series up to this point here.
Agile Scout says
This is where Agile software development is king!
Tom McFarlin says
Indeed.
Especially for significantly larger projects 😉