[rfc][icedtea-web][policyeditor] MVC-ish refactor

Omair Majid omajid at redhat.com
Mon Jun 16 20:54:15 UTC 2014


* Andrew Azores <aazores at redhat.com> [2014-06-16 16:35]:
> This patch extracts some logic out of PolicyEditor into a new class,
> PolicyEditorController, so that other "Views" can be more easily made in the
> future, the first planned one being a purely CLI interface for PolicyEditor.
> Future work could also include having changes to the Model actually update
> the View(s). Currently, the View (PolicyEditor) simply updates its UI based
> on requests it makes to the PolicyEditorController and return values that
> come back, which is the same as how it is before this patch, except the
> PolicyEditor called directly into the PolicyFileModel.

I don't think calling this MVC is fair. It's not really splitting things
by responsibilities: the view has a ton of logic and is still making all
sorts of decisions instead of relying on the controller to do that.

Of of the big wins I normally get from using (modern-ish) MVC
(Passive-View, to be more specific) is that my views are so dumb that
there's no logic there that needs unit testing.

Thanks,
Omair

-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the distro-pkg-dev mailing list