Chapter 64. Best Practices

Everyone has their own coding style. Different people have different thought processes, and each has his or her own interpretation of what is the "right" way to build an application. If you've ever had the experience of working on a project with multiple developers without predefined standards and best practices, then you have likely experienced the chaos of ambiguous naming and references, inconsistent standards and naming conventions, improper use of object-oriented principles, or excessive use of data bindings.

Beginning a project with standards and best practices in mind sets your team on the path to a successful project. The goal of this chapter is to help define best practices when developing Adobe Flex applications. This chapter will emphasize the importance of coding standards, proper uses of object-oriented principles, proper use of data binding, and component development.

Coding Standards

Clearly defined coding standards are possibly the best of the "best practices" that can help drive you toward a successful project. Coding standards help lay the foundation for what I refer to as the three C's of coding: consistency, clarity, and cleanliness.

Consistency

Consistency and standardization of coding practices helps you write code that is easier to understand and maintain because everything is done the same way. Functions are named consistently, variables are named consistently, classes are named consistently, and actions are invoked in familiar patterns. ...

Get Professional Adobe® Flex® 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.