In this chapter you have learned how to create various types of Yii extensions. Now, we'll talk about how to share your results with people and why it's important.
Let's form a checklist for a good extension first. A good programming product should follow these points:
Consistent and easy to read and use API
Good documentation
People should be able to find it
Extension should apply to the most common use cases
Should be maintained
Well-tested code; ideally with unit tests
You need to provide support for it
Of course, having all these requires a lot of work, but these are necessary to create a good product.
Let's review our list in more detail, starting with API. API should be consistent and easy to read and use. Consistent means that overall style should not change, so no different variable naming, such as
camelCasedVariableNames
andunderscored_variable_names
, no inconsistent names, such asisFlag1()
andisNotFlag2()
, and so on. Everything...