Chapter 16. Developing for reusability

 

This chapter covers

  • Learning to develop with reusability in mind
  • Organizing your code via namespace
  • Discovering how to layer code
  • Reviewing basic application requirements
  • Developing reusable components

To me, developing an application is more of an art than a science. The methods and patterns chosen for application construction vary based on many factors, some of which may be completely out of your control.

For example, what if the requirements dictate that the server-side controller either includes or excludes one or more JavaScript modules or files based on security rules? Such a requirement isn’t uncommon in larger role- or permission-based applications. The implications of this type of requirement are rather large because the view changes based on the user role. Knowing how to build extensible applications that can be easily changed over time can be a rewarding experience for the developer and customers alike.

In this chapter, we’ll take on the challenge of developing a relatively large application using a pattern that allows it to be easily extended or modified in the future.

You’ll be learning about the JavaScript namespace and a segmented pattern that will give this application room to grow.

16.1. Developing for the future

16.2. Analyzing the application requirements

16.3. Constructing the ChartPanel components

16.4. Constructing the listpanel components

16.5. Constructing the EmployeeGridPanel class

16.6. The EmployeeAssociationWindow class

16.7. The form namespace

16.8. Summary