-
Book Overview & Buying
-
Table Of Contents
Javascript Unlocked
By :
How many digital photos do you have, probably thousands, or more? Just imagine if your image viewer had no capacity to categorize. No albums, no books, no categories, nothing. It would not be of much use, does it? Now let's assume that you have a JavaScript application in a single file and it grows. When it approaches thousand or more than a thousand lines of code, however good your code design is, from a maintainability perspective, it still turns into a useless pile like that enormous list of uncategorized photos. Instead of building a monolithic application, we have to write several independent modules that combine together to form an application. Thus, we break a complex problem into simpler tasks.
So, what is a module? A module encapsulates code intended for a particular functionality. A module also provides an interface declaring what elements the module exposes and requires. A module is often packaged in a single file, which...
Change the font size
Change margin width
Change background colour