First page Back Continue Last page Text

oracle adf workshop

Notes:


Benefits of Reusability

Duplicating code or content is one of the worst practices. It can be an easy solution sometimes, but changing the application becomes a lot more difficult, which means that in the long term, you can’t adapt to new user requirements or fix problems quickly. Ideally, an application shouldn't contain multiple versions of the same code and the Web content shouldn’t be copied and pasted.

Code reuse can increase developer productivity and application maintainability. Instead of reinventing the wheel, you should always look for well-designed frameworks and customizable components. Application-specific code can also be reused across modules and even across related projects. This latter type of reusability allows you to make rapid changes, exploit new features globally, and spend less time testing and debugging.

These things might sound like good advice for programmers, but Web developers should pay attention to them too. Oracle ADF Faces provides built-in components along with support for creating additional reusable components. Very often, however, the bits of HTML and JSP markup are copied from one Web page and pasted into other pages, which means that multiplied markup has to be modified everywhere when the Web content changes. In addition, the look of an application becomes inconsistent if some of the pages aren’t updated. This doesn’t happen if the UI parts are reused across pages so that any change requires editing in exactly one place.