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

Paul Piper edited comment on OFBIZ-5312 at 3/19/14 1:41 PM:
------------------------------------------------------------

Hi Sebastian,

you can ignore the part about the META-Data and such. Though it is correct, all 
options here rely on HTML-Templates for that  - since it is a different topic 
altogether and you probably already have your own, we left it out of this 
picture. 

As described above the task itself focus only on a subpart of onpage 
optimziation efforts, namely: 

* Removal of /control out of all the urls
* SEO-friendly URLS
* Configurable product/category and other URLs
* Frontpage mapping from /main to /

There are other things you can do to optimize your pages, but they are out of 
scope here, because the most-prominent ones rely on you actively changing your 
content. To fix the above you have to work with the OFBiz Request-Flow and 
predominantly the Controlservlet. From a technical perspective there is no easy 
way to get around the overall OFBiz structure, so the Controlservlet (/control) 
cannot be removed easily. 

There are four way, that I can think of, to achieve our goal

1) Implement Transforms, Sample Configuration, Servlets & Filters to generate 
and handle new URLS as defined (handled by this ticket)
2) Make use of the CMS functionality to generate custom URLs and map to each 
product/category/page accordingly (described by Anil)
3) Rework the Servlet-Structure entirely and rely on Filters & Transforms to 
remove the current dependency (more effort - not in focus). Store URLs in new 
Entity, Implement Filters to validate URLs and redirect on partial matches

I created the following map of pros and cons for you to visualize it a bit 
further:

|| || Transforms, Filters & Servlets || Use of CMS  || Controlservlet 
replacement ||
| Method | * Implementation of Transforms to generate new URLs. 
* Implementation of Filters to Validate Request URls and forward internally
* Configuration-File Implementation to allow custom "logic" to set automatic 
URL generation | * Reuse Database Structure. 
* Add new Page to each Product & Category
* Ignore /control until checkout  | * Rework Servlet Structure & Remove 
Controlservlet or rely on Filters where the controlservlet is never called 
directly
* Store all URLs in a database
* Match every request to Database, forward accordingly|
| Pros | * No Changes on Controlservlet necessary
* Very versatile and configurable by User
* Works automatically for Categories
* Works automatically for Products
* Very lightweight
* Replaces /control/main |* Works OOTB (no changes necessary) | * Fixes 
duplicate content 
* May simplify OFBiz Request-Architecture
* Fixes /control/ problem for good|
| Cons | * Potentially duplicate content
* Doesn't "fix" partial matches
* No historisation of former URLs | * Potentially duplicate content
* Doesn't "fix" partial matches
* No historisation of former URLs
* No automatic generation of URLs for Products
* No automatic generation of URLs for Categories
* Increases DB (Database entries)
* Requires additional manual work for all entries --> potentially risky when 
used by non-tech people | * Very difficult to implement
* May not be compatible with setup at all 
* Hard-Changes to code necessary
* Currently not available |



was (Author: madppiper):
Hi Sebastian,

you can ignore the part about the META-Data and such. Though it is correct, all 
options on HTML-Templates for that which isn't being looked at here. 

As described above the task itself focus only on a subpart of onpage 
optimziation efforts, namely: 

* Removal of /control out of all the urls
* SEO-friendly URLS
* Configurable product/category and other URLs
* Frontpage mapping from /main to /

There are other things you can do to optimize your pages, but they are out of 
scope here, because the most-prominent ones rely on you actively changing your 
content. To fix the above you have to work with the OFBiz Request-Flow and 
predominantly the Controlservlet. From a technical perspective there is no easy 
way to get around the overall OFBiz structure, so the Controlservlet (/control) 
cannot be removed easily. 

There are four way, that I can think of, to achieve our goal

1) Implement Transforms, Sample Configuration, Servlets & Filters to generate 
and handle new URLS as defined (handled by this ticket)
2) Make use of the CMS functionality to generate custom URLs and map to each 
product/category/page accordingly (described by Anil)
3) Rework the Servlet-Structure entirely and rely on Filters & Transforms to 
remove the current dependency (more effort - not in focus). Store URLs in new 
Entity, Implement Filters to validate URLs and redirect on partial matches

I created the following map of pros and cons for you to visualize it a bit 
further:

|| || Transforms, Filters & Servlets || Use of CMS  || Controlservlet 
replacement ||
| Method | * Implementation of Transforms to generate new URLs. 
* Implementation of Filters to Validate Request URls and forward internally
* Configuration-File Implementation to allow custom "logic" to set automatic 
URL generation | * Reuse Database Structure. 
* Add new Page to each Product & Category
* Ignore /control until checkout  | * Rework Servlet Structure & Remove 
Controlservlet or rely on Filters where the controlservlet is never called 
directly
* Store all URLs in a database
* Match every request to Database, forward accordingly|
| Pros | * No Changes on Controlservlet necessary
* Very versatile and configurable by User
* Works automatically for Categories
* Works automatically for Products
* Very lightweight
* Replaces /control/main |* Works OOTB (no changes necessary) | * Fixes 
duplicate content 
* May simplify OFBiz Request-Architecture
* Fixes /control/ problem for good|
| Cons | * Potentially duplicate content
* Doesn't "fix" partial matches
* No historisation of former URLs | * Potentially duplicate content
* Doesn't "fix" partial matches
* No historisation of former URLs
* No automatic generation of URLs for Products
* No automatic generation of URLs for Categories
* Increases DB (Database entries)
* Requires additional manual work for all entries --> potentially risky when 
used by non-tech people | * Very difficult to implement
* May not be compatible with setup at all 
* Hard-Changes to code necessary
* Currently not available |


> Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
> ----------------------------------------------------------------------
>
>                 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, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 
> - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, 
> OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - 
> ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 
> - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, 
> OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - 
> ofbiz-ecommerce-seo.patch, OFBiz-5312-product-ecommerce-seo-20131031.patch, 
> OFBiz-5312-product-ecommerce-seo-for-seo-branch.patch, 
> OFBiz-5312-product-ecommerce-seo.patch, SeoContextFilter.java.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.2#6252)

Reply via email to