You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Parimal Gain (JIRA)" <ji...@apache.org> on 2013/10/09 13:18:47 UTC

[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes

    [ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790258#comment-13790258 ] 

Parimal Gain commented on OFBIZ-5312:
-------------------------------------

Hi Paul/Jacques,

Hope you will be available now. Between this time frame I went through the current implementation, following are the observation -
1. There are following macro used to create user friendly url - <@ofbizCatalogUrl>, <@ofbizCatalogAltUrl>, <@ofbizContentUrl> and <@ofbizContentAltUrl>.
2. Each macro has its own transformation class, which is used to translate the macro and form the user friendly url.
3. Default behavior of system to create url is as follows -
   category : http://localhost:8080/ecommerce/products/100/101
   product : http://localhost:8080/ecommerce/products/p_GZ-1000
4. This default behavior can be override using <@ofbizCatalogAltUrl> and by defining the Product/Category Content of type 'Alternative Url'.
5. Responsible classes for catalog are : OfbizCatalogAltUrlTransform.java, catalogUrlFilter.java, UrlServletHelper.java and CatalogUrlServlet.java

Then I go through the patch I observed following thing -
1. Is this implementation will use any macro or how it will work don't have any clarity.
2. It also contains Transformation class named SeoTransform.java
3. It also contains Seo.xml file to filter/configure url (Identified by regex pattern).
4. This xml configuration will be used/read in SeoConfigUrl.java
5. Responsible classes for catalog are : SeoTransform.java, SeoCatalogUrlFilter.java, SeoCatalogUrlServlet.java and SeoUrlUtil.java


Then I applied the patch and tried to run the application, following are the observation -
1. control has removed from the url.
2. Frontpage mapping from /main to / is done.
3. I run the application using standered macro <@ofbizUrl> for category and product i.e. using url 'category?category_id=' and 'product/product_id=' but no difference is observed.
4. Then I used <@ofbizCatalogAltUrl> with out aleternate url content defined for category and product to create the user friendly url
   and found SeoCatalogUrlFilter.java and SeoCatalogUrlServlet.java is called but not handle this request and forward the url then CatalogUrlFilter.java and CatalogUrlServelet.java handle the request and obviously the url pattern is same as defined in #3 of first section.


Also Found that SeoTransform.java class is never used to create create seo friendly url. There will be surely one pattern/macro to create the url that I'm not aware of currently.

So please validate me if I'm missing something or I'm wrong anywhere and update me on how to use the above not used class.

> Proposal: URL-Generation Changes
> --------------------------------
>
>                 Key: OFBIZ-5312
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5312
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>              Labels: changes, ecommerce, friendly, seo, url
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch
>
>
> [This was proposed by Paul Piper in Nabble 7 months ago|http://ofbiz.135035.n4.nabble.com/Proposal-URL-Generation-Changes-td4639289.html]. Here is quoted Paul's proposal
> {quote}
> Hey Everyone,
> over at ilscipio (www.ilscipio.com) we developed a set of functional OFBiz changes that we believe the entire community could benefit from. The changes have been implemented in parts in Syracus (www.syracus.net) for a while now, but we figured that some of which are too crucial for ofbiz' success in the long run, so we are considering the contribution (as we did with the SOLR component).
> As you are probably aware, OFBiz has a pretty uncommon way of generating URLs. Most of this has to do with the fact that OFBiz uses a servlet (ControlServlet)  to handle all requests. The servlet is mounted at /control, so that it won't interfere with other servlets. Though functionally valid, this has the sideeffect that all urls are actually created on /control, which is neither pretty, nor good by any measures of SEO. It also means that a few 302 redirects are necessary to forward the user from / to /control/main. It also makes requests more complicated, since many forwards are necessary whenever somebody wants to move away from this implementation.
> Since this is hurtful to many of the implementers, I wanted to discuss whether or not you guys would be interested in the changes we have made. The functional changes contain:
> * Removal of /control out of all the urls
> * SEO-friendly URLS
> * Configurable product/category and other URLs
> * Frontpage mapping from /main to /
> It was tested on our end and contains all necessary improvements (Transforms, Sample Configuration, Servlets & Filters) for it to be applicable.
> If interested, I would create a new JIRA ticket for this and after a few minor internal discussions, we will gladly provide the rest of you with it.
> Regards,
> Paul 
> {quote}
> There is even a patch, mostly done by Jinghai Shi, that I attach here. Even if it has been already used in [Syracus|http://syracus.net/] since early this year, some help would be needed to test it thoroughly in OFBiz.
> Then we should discuss if it's the way to go. I believe it is. Who needs a /control/ or /main by default in ecommerce urls? Would you not prefer http://localhost:8080/ecommerce/ over http://localhost:8080/ecommerce/control/main ?



--
This message was sent by Atlassian JIRA
(v6.1#6144)