? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
8 Apr 2017

Pull Request for Issue # .

Summary of Changes

This is a redo of #14721 because I could not resolve conflicts. Below are the changes:

Below are the list of changes/improvements:

  1. Split original View class into AbstractView and HtmlView classes. The purpose is supporting more format like Rss, Json, Csv... in the future.

  2. Introduce FormView to handle form add/edit item in the backend. Many repeating/ boring code like getting data, addToolbar can be automatically with this class. See https://github.com/joomdonation/joomla-cms/blob/namespace-banners/administrator/components/com_banners/View/Banner/Html.php for a sample usage

  3. Introduce ListView to handle displaying list of items in the backend. Same with FormView, repeating code is moved into this class so that child class won't have to implement these stuff. See https://github.com/joomdonation/joomla-cms/blob/namespace-banners/administrator/components/com_banners/View/Banners/Html.php for a real usage.

Testing instructions:

At the moment, this is open for discussion / review only and waiting for decision for Joomla 4 team.

Documentation Changes Required

Document how to use FormView and ListView classes

avatar joomdonation joomdonation - open - 8 Apr 2017
avatar joomdonation joomdonation - change - 8 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Apr 2017
Category Libraries
avatar joomdonation joomdonation - change - 8 Apr 2017
Title
View classes improvements. Redo #14721
[4.0] View classes improvements. Redo #14721
avatar joomdonation joomdonation - edited - 8 Apr 2017
avatar joomdonation
joomdonation - comment - 8 Apr 2017

CS and unit tests fails are not related to this PR.

avatar wilsonge
wilsonge - comment - 8 Apr 2017

Couple of small comments. But looks like a massive improvement :) Really nice work!

avatar joomdonation
joomdonation - comment - 8 Apr 2017

Sorry, my comments above need to be in reserved. Windows is case-insensitive and Linux is case-sensitive, too late here

avatar wilsonge wilsonge - change - 8 Apr 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-04-08 20:40:36
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 8 Apr 2017
avatar wilsonge wilsonge - merge - 8 Apr 2017
avatar wilsonge
wilsonge - comment - 8 Apr 2017

I'm good with this. We need to have a think about this view vs View thing. But I think this is a great start. Thankyou so much @joomdonation

avatar joomdonation
joomdonation - comment - 9 Apr 2017

Thanks @wilsonge.

Add a Comment

Login with GitHub to post a comment