Need some help: was: svn commit: r1885148 - /turbine/core/branches/URLMapperService/

Thomas Vandahl <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.devel
Message-ID <[email protected]>
On 05.01.21 15:50, [email protected] wrote:
> Author: tv
> Date: Tue Jan  5 14:50:42 2021
> New Revision: 1885148
> 
> URL: http://svn.apache.org/viewvc?rev=1885148&view=rev
> Log:
> Experimental URL mapper implementation
> 
> Added:
>      turbine/core/branches/URLMapperService/
>        - copied from r1885147, turbine/core/trunk/
> 

Hi folks,

I've been carrying this with me for quite some time. The Liferay Portal 
supports a rule-based mapping of (almost) arbitrary URLs to sets of 
application parameters and vice-versa. (See 
https://help.liferay.com/hc/en-us/articles/360017880652-Making-URLs-Friendlier)

Why not build something like this for Turbine?
So this is my first attempt on a possible implementation.

What does it do?
Say, you want to simplify your URLs to make them easier to read, type or 
remember.

- Instead of /context/app/template/Book.vm?id=1234
   Use /context/app/book/1234

- Instead of /context/app/template/Book.vm/action/BookSave
   Use /context/app/book/save

Say, you want to publish certain landing pages that map to a 
parametrized page in your app.

- Instead of /context/app/template/BookList.vm?sale=true
   Use /context/app/books-on-sale

You get the point. Some kind of mod_redirect, but *bi-directional*.

*If you think this may be for you, please help me testing.*

How do I use it?
I'm planning to write some documentation but for the time being, check 
out the branch turbine/core/branches/URLMapperService/ and have a look 
at the files
- conf/turbine-url-mapping.xml for some configuration examples
- conf/test/TurbineURLMapperServiceTest.properties for the service 
configuration
- 
src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java 
for some preliminary test cases.

Please check if this meets your needs, check your use-cases, 
corner-cases, performance etc.

I'm eager to get your feedback.

Bye, Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.