Application Routing - Really nessesary... ?

Author Message
DimDragon 07 Jun 2011 14:13 no-new-comments

User avatar

08 Mar 2010

I have struggled multiple times to get around application url routing and decided to create this open discussion on the topic.

            Every application package comes with own set of pages, url map entries, web frames and url routing rules. All those default instances are needed so that user can quickly add the application and start using it, however it is my belief that if the user wants to change application presentation he must be allowed to, without the need to overwrite webframes code and losing possibility to update. All webframe instances and pages created by application can be completely customized or removed. URL map nodes can't be removed but can be detached so they lead nowhere and this basically removes them from site. Now come the routing rules...main problem with those is that they are used in many places not as default value but as hardcoded behavior. Lets take some examples from Blog application :{$_author-username}/comments/

            Main purpose of this routing is to set the data variable $_author-username, which is fine but by no means this is required if you start customizing the application. You can change webframe to use different variable and even have author comments in totally different place. Unfortunately there is a secondary usage of application routing rules which I really don't like and which is basically the source of problems I have. Lets take another example :{$_category-name}/

           On first sight this looks like the same situation. I may have for example site structure like :

        where 'mercedes', 'bmw', 'F15' and 'airbus' are categories, and I can set up url routing like :{$_category}/{$_category}/

        this is all fine so far since I have setup routing according my structure, redirected to my pages and also set my data variable. If you however try to use Blog.Categories webframe you will run into the problem that application routing is used here as redirect value and links generated will go to : for example. Same goes for manage post as another example. I can't track all places this is done but this is also part of the problem : on all templated webframes you can get away with it since you can setup your own links but on generated content and also in controls added as tags in template editor you can't change this unless you rewrite webframe code.

        I believe app routing as such should not exist. Application on its creation must insert custom routing rules in the same way it does now for application rules, user then can delete all those and provide its own. On all places where application needs to know where to redirect to, this can either be asked as parameters of webframe ( done already on few places ) or be exposed in application administration for setting up. Any viewpoint on this topic are welcome.
Boz Zashev 17 Jun 2011 10:54 {{new_comments_class}}

User avatar

17 Dec 2008

Hi DimDragon,

I understand the problem, but:

If we allow the application routing to be customized this will require all the applications to have all these paths as settings. Many webframes need to have links to pages that need to have specific functionality. As an example the post edit page should be made as a setting so the edit link knows where to redirect the user for managing a post.

This is possible solution and the only reason it is not made this way is 'cause it will take too much additional development time and will not be very used functionality. Also it will be unnecessary complication for the regular users. 

The way to implement this is to have a certain settings tab in the Builder's core section, while managing the application, where you can manage all the application routing rules and paths.

This is quite possible.

If there are other integrators that need this functionality please comment here so we can prioritize its implementation

Delete comment thread
[x close]
Are you sure you want to delete this comment?
Please Login to create a comment

Add new comment

Please Login to create a comment