Dynamic Router Implementation #74

Closed
opened 2017-04-28 11:52:22 +00:00 by Llewellyn · 5 comments
Owner

I just looked at the code for the contact router concept and I like it 👍

How to improve the JCB router code without breaking exiting implementation.

I will need help from you who know more about this aspect. We need to start moving this into the new direction to be ready for Joomla v4.

I just looked at the code for the contact router concept and I like it :+1: How to improve the JCB router code without breaking exiting implementation. I will need help from you who know more about this aspect. We need to start moving this into the new direction to be ready for Joomla v4.
Author
Owner

Okay the code that builds the router details are found in a few places. I want to update this, but will need some help.

Since we need to combine many site views and filters into this it is very hard to make it dynamic. But we have to try.

Methods

The compiler deals with this in the following places:

  • e_Interpretation->setRouterHelp method line 4746
  • e_Interpretation->routerParseSwitch method line 4817
  • e_Interpretation->routerBuildViews method line 4910
  • e_Interpretation->setRouterCategoryViews method line 10061
  • e_Interpretation->setRouterCase method line 11872

Each of them target some concept in this area of building a component router.

Files

The files used to build the router

We can adapt any of these.

@ro-ot I am not so familiar with this part and can do with some help! @stutteringp0et How is your take on the router, can you help? This seems to be urgent!!

Okay the code that builds the router details are found in a few places. I want to update this, but will need some help. Since we need to combine many site views and filters into this it is very hard to make it dynamic. But we have to try. ## Methods The compiler deals with this in the following places: - e_Interpretation->setRouterHelp method [line 4746](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/e_Interpretation.php#L4746) - e_Interpretation->routerParseSwitch method [line 4817](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/e_Interpretation.php#L4817) - e_Interpretation->routerBuildViews method [line 4910](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/e_Interpretation.php#L4910) - e_Interpretation->setRouterCategoryViews method [line 10061](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/e_Interpretation.php#L10061) - e_Interpretation->setRouterCase method [line 11872](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/e_Interpretation.php#L11872) > Each of them target some concept in this area of building a component router. ## Files The files used to build the router - [/admin/compiler/joomla_3/router.php](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/compiler/joomla_3/router.php) - [/admin/compiler/joomla_3/routeHelper.php](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/compiler/joomla_3/routeHelper.php) We can adapt any of these. @ro-ot I am not so familiar with this part and can do with some help! @stutteringp0et How is your take on the router, can you help? This seems to be urgent!!
Author
Owner

My investigation has revealed some interesting issues! Mostly that we already have a great and stable implementation that should still work without issues. Well so it seems anyway.

What seems to be the issue is that the compiler needs some tweaking in routerParseSwitch since it loads the wrong values and that is why we are seeing issues in the router at this time.

I will dig little deeper and keep you posted.

My investigation has revealed some interesting issues! Mostly that we already have a great and stable implementation that should still work without issues. Well so it seems anyway. What seems to be the issue is that the compiler needs some tweaking in [routerParseSwitch](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/e_Interpretation.php#L4817) since it loads the wrong values and that is why we are seeing issues in the router at this time. I will dig little deeper and keep you posted.
Author
Owner

Looks like the only way to make this as dynamic as we need, I will have to add some fields to the dynamicGet where you can override the router.

Two new PHP fields

  • Targeting the parse method
  • Targeting the build method

Still playing with some ideas, any feedback will be helpful.

Looks like the only way to make this as dynamic as we need, I will have to add some fields to the dynamicGet where you can override the router. Two new PHP fields - Targeting the `parse` method - Targeting the `build` method Still playing with some ideas, any feedback will be helpful.
ro-ot commented 2018-01-23 12:22:16 +00:00 (Migrated from github.com)
Author
Owner

I agree that adding a field to JCB to allow more customization, but not in the dynamicGet area, but instead in the site view. Unless you also add dynamic placeholders for the site view code name.

Only one field really is needed targeting the parse method, allowing you to only adapt the snippet in the switch.

I agree that adding a field to JCB to allow more customization, but not in the dynamicGet area, but instead in the site view. Unless you also add dynamic placeholders for the site view code name. Only one field really is needed targeting the parse method, allowing you to only adapt the snippet in the switch.
kwaninmacau commented 2018-01-25 00:47:55 +00:00 (Migrated from github.com)
Author
Owner

Great Work!
I found that!

Great Work! I found that!
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#74
No description provided.