Design

Design is an important step in the construction of any system. In programming, in particular, it is essential to create a design before attempting to code. Design helps you:

A good design will:

How do I create my design?

The thought required in the initial design process involves:

What issues should I consider?


What do I need to include in my design?

Text
Text, in the form of descriptions and definitions, are essential to the design. All variables and functions and how they interact should be described here in some detail. A sample run-through of the program is also a good idea, as it demonstrates how the code is executed to provide the program's functionality. Finally, text is used in pseudocode, which is described next.

Pseudocode
Pseudocode is a high-level description of the functions that will be needed in the program. Essentially, it describes what the code will be doing in English, so that implementing the code will be much easier. When writing pseudocode, you should take into consideration the potential problems you will face, and how the code will handle these problems. Will you be using conditionals or loops? Pseudocode should always be written for complex procedures, and each step of code should be written at a high level.

Diagrams
Without a diagram, a design is not complete. Diagrams can show the actual physical components and how they interact, and they can also demonstrate how objects are related to one another. Diagrams can consist of flowcharts, component relationships and user interfaces. For the JavaScript program in particular, a diagram of the user interface (what you see on the page) is very useful.

Good luck with your design! Remember, if a program is properly designed, the task of writing the program becomes much easier.


HOME