? ? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
12 Feb 2017

Summary of Changes

Create a new JComponentRecord value object representing the object loaded by JComponentHelper::load() for a component. Shift the logic for converting the record's parameters to a Registry object to the point where the parameters are first accessed (this removes a needless conversion if calling JComponentHelper::isEnabled() and that is the only interaction with a component's record).

The value object extends JObject as a bridge to help with the transition. At 4.0, this class extension should be dropped as well as the magic getter/setter methods.

Testing Instructions

The CMS still functions as intended. Component parameters are lazy loaded when needed.

Documentation Changes Required

Document the new class and scheduled deprecations.

avatar mbabker mbabker - open - 12 Feb 2017
avatar mbabker mbabker - change - 12 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2017
Category Libraries
avatar mbabker mbabker - change - 12 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2017
Category Libraries Libraries Unit Tests
avatar mbabker mbabker - change - 13 Feb 2017
Labels Added: ?
avatar mbabker mbabker - change - 13 Feb 2017
The description was changed
avatar mbabker mbabker - edited - 13 Feb 2017
avatar mbabker
mbabker - comment - 13 Feb 2017

FWIW I think we should make more liberal use of value objects versus untyped stdClass objects as stated in #13922 and not just for the lazy loading behaviors that have conveniently come here and the menu item's object. It also helps to make it clear exactly what properties you're getting on an object versus having to reverse engineer the code to find what is actually being loaded into memory and made available, so it makes it a little easier to jump into the code too. Developer Experience improvements FTW.

avatar joomdonation joomdonation - test_item - 19 Feb 2017 - Tested successfully
avatar joomdonation
joomdonation - comment - 19 Feb 2017

I have tested this item successfully on 53a260f

1. Access to some pages in frontend, backend, creating new articles and all still working as expected

  1. Write some custom code to check and confirm that params is lazy load
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14044.
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 22 Feb 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Feb 2017

I have tested this item successfully on ff7e2c0

Click on different Menues in Frontend, append Menu and Modules.

Don't tested lazy load cause don't know how.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14044.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Feb 2017

RTC as there are 2 successfully Tests?

avatar jeckodevelopment jeckodevelopment - test_item - 24 Feb 2017 - Tested successfully
avatar jeckodevelopment
jeckodevelopment - comment - 24 Feb 2017

I have tested this item successfully on ff7e2c0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14044.

avatar jeckodevelopment jeckodevelopment - change - 24 Feb 2017
Status Pending Ready to Commit
Labels
avatar jeckodevelopment
jeckodevelopment - comment - 24 Feb 2017

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14044.

avatar rdeutz
rdeutz - comment - 24 Feb 2017

Agreed on the concept, but because JObject is deprecated in 4.0, why we are doing it? Or will you remove the extension of JObject in 4.0 and keep the value object?

avatar mbabker
mbabker - comment - 24 Feb 2017

The extension of JObject is just to be extremely safe about it (we're converting from a stdClass to the value object). The extension goes away in 4.0 and the object stays.

avatar rdeutz
rdeutz - comment - 24 Feb 2017

ok, so I got the idea

avatar rdeutz rdeutz - change - 24 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-24 19:11:57
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 24 Feb 2017
avatar rdeutz rdeutz - merge - 24 Feb 2017

Add a Comment

Login with GitHub to post a comment