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

Andrew Azores aazores at redhat.com
Mon Jun 16 21:01:08 UTC 2014


On 06/16/2014 04:54 PM, Omair Majid wrote:
> * 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
>

Yea, that's why I'm hesitating to call it MVC and instead calling it 
MVC-ish. Barely at all at this point, really, but it's something, and 
it'll still make it easier to create the CLI-only interface. There's 
also more that can probably be fairly easily extracted from PolicyEditor 
into PolicyEditorController, but I wanted to move in smaller steps and 
have this very basic extraction done first.

Thanks,

-- 
Andrew Azores


More information about the distro-pkg-dev mailing list