Mailinglist Archive: opensuse-buildservice (63 mails)

< Previous Next >
[opensuse-buildservice] Proposal to use decorator classes in frontend
Hi, another proposal here :)

In this PR I have introduced a new app directory for decorator classes.

Please speak up if you have any alternative ideas or objections to using this pattern. If you're unfamiliar with decorators this article is pretty good but the main advantages are:

- they seperate presentation logic from models and views
- they can be unit tested
- they are classes so you get all the OOP advantages to organise and re-use code as opposed to helper methods which usually end up like spaghetti code

These are the two new classes I've created in the PR: BaseDecorator and MaintenanceStatisticDecorator:

Let me know what you think.


Evan Rolfe
Full Stack Web Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755;
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages