O'Reilly logo

Ext JS Application Development Blueprints by Colin Ramsay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

More and more subpages

We know that the other subpage in our application, the SQL log page, is going to be very similar to the web log page. This should be raising an eyebrow with regard to code duplication. We could pull out the grid and the chart header from the Web view into separate classes and turn them into reusable components, but is this the right thing to do? These components won't be reused! They have their place in only one location in the application to power the subpages. Unlike HistoricalRequestChart, which is used in both the dashboard and the subpages, these are only needed for one job.

Let's consider another approach: subclassing. We could create a new component that contains the chart, form fields, and grid from the Web view, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required