You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Paul Field (JIRA)" <ji...@apache.org> on 2009/04/08 12:08:12 UTC
[jira] Created: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Allow page classes to have a "Page" suffix that is not included in the URL
--------------------------------------------------------------------------
Key: TAP5-633
URL: https://issues.apache.org/jira/browse/TAP5-633
Project: Tapestry 5
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.1.0.2
Reporter: Paul Field
Priority: Minor
I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699168#action_12699168 ]
Thiago H. de Paula Figueiredo commented on TAP5-633:
----------------------------------------------------
Since when I started implementing the URL rewriting support, my plan was to initially provide the basic support (which I implemented and Robert made great improvements) and then add more specific rules on demand. Paul's request could be solved by implementing a specific rewriting rule to Tapestry that could be added by users through Tapestry-IoC. I also thought of a regex-based rule.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Paul Field (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697561#action_12697561 ]
Paul Field commented on TAP5-633:
---------------------------------
Nice idea but unfortunately, then I will have a lot of packages that contain just one class. The core part of our app is primarily a collection of read-only pages centred on the domain objects: Company, Analyst, Region, Sector, Statistics and so on. As I say, the business naturally refer to these as the "Company Page" and "Analyst Page" etc... From a Domain Driven Design point-of-view I like the idea that the Java classes are named after the business domain terms.
Interestingly as we write financial applications "Index" has a very specific meaning so a "Company Index" means something to the business and IndexIndex would be really confusing :-) One of our other apps does have an Index Page (in the business sense).
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Paul Field (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698820#action_12698820 ]
Paul Field commented on TAP5-633:
---------------------------------
The "view" package idea is interesting & the naming is more appealing to me than the "Index" idea, but still doesn't seem ideal to me.
Partly, it seems a bit weird having the "verb" first though; it seems that the usual convention in REST-type styles is to have it at the end of the path (for example see http://microformats.org/wiki/rest/urls ).
I'm also not sure how it mixes in when you *do* have some entities with other operations. It would imply that there would be a "view" package, an "edit" package a "create" package and a "delete" package for example; which doesn't seem a natural categorisation to me.
I suppose in that case it does make sense to have a (for example) "user" package containing "EditUser", "DeleteUser" classes & you would have nice REST-style URLs. Of course, because I seem to have a knack of being trouble, my system has command objects that have names like "EditUser" so those clash with the page names too and I would like to have "EditUserPage" :-) Perhaps, I need to rename to have "EditUserCommand"...
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698829#action_12698829 ]
Robert Zeigler commented on TAP5-633:
-------------------------------------
Have you considered using the new URLRewriting support to accomplish this?
The 5.1.0.4-SNAPSHOT version of URLRewriting adds support for a "URLRewriteContext" parameter that provides you useful information, at least for rewriting links, so you could do something like:
* get the name of the page in the link
* Do a search/replace on the url where you strip "page" off the end of the page name.
Voila, now your links render as EditUser instead of EditUserPage.
Going the other way is slightly trickier because on an incoming request, neither PageRenderRequestParameters nor ComponentEventRequestParameters are available (there is some asymmetry here that would be nice to address... at some point... ). But you could use a lookup strategy here where your rule has a list of page names (you can get these from ComponentClassResolver), and you check to see if the shortened form of the page name exists in the URL; if so, you can rewrite the url to replace the shortened form with the "real" page name.
Now your users will see EditUser, even though your page is EditUserPage.
There's an extremely simplified version of exactly your scenario, inspired by this thread, in the url rewriting documentation:
http://tapestry.formos.com/nightly/tapestry5/guide/url-rewriting.html
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699077#action_12699077 ]
Robert Zeigler commented on TAP5-633:
-------------------------------------
Got to thinking about a full implementation of page name mapping via url rewriting, and specifically your use-case of XXXPage => xxx in the url.
Blogged a solution at: http://www.jroller.com/genjitsuteki/entry/page_mapping_in_tapestry_5
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697535#action_12697535 ]
Howard M. Lewis Ship commented on TAP5-633:
-------------------------------------------
Create a package named company and create a class CompanyIndex.
Tapestry will strip off "Company" because it matches the package name, and "Index" because its by itself, resulting in a base URL of "/company" to which the page activation context will be added.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699168#action_12699168 ]
Thiago H. de Paula Figueiredo commented on TAP5-633:
----------------------------------------------------
Since when I started implementing the URL rewriting support, my plan was to initially provide the basic support (which I implemented and Robert made great improvements) and then add more specific rules on demand. Paul's request could be solved by implementing a specific rewriting rule to Tapestry that could be added by users through Tapestry-IoC. I also thought of a regex-based rule.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698829#action_12698829 ]
Robert Zeigler commented on TAP5-633:
-------------------------------------
Have you considered using the new URLRewriting support to accomplish this?
The 5.1.0.4-SNAPSHOT version of URLRewriting adds support for a "URLRewriteContext" parameter that provides you useful information, at least for rewriting links, so you could do something like:
* get the name of the page in the link
* Do a search/replace on the url where you strip "page" off the end of the page name.
Voila, now your links render as EditUser instead of EditUserPage.
Going the other way is slightly trickier because on an incoming request, neither PageRenderRequestParameters nor ComponentEventRequestParameters are available (there is some asymmetry here that would be nice to address... at some point... ). But you could use a lookup strategy here where your rule has a list of page names (you can get these from ComponentClassResolver), and you check to see if the shortened form of the page name exists in the URL; if so, you can rewrite the url to replace the shortened form with the "real" page name.
Now your users will see EditUser, even though your page is EditUserPage.
There's an extremely simplified version of exactly your scenario, inspired by this thread, in the url rewriting documentation:
http://tapestry.formos.com/nightly/tapestry5/guide/url-rewriting.html
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Paul Field (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774946#action_12774946 ]
Paul Field commented on TAP5-633:
---------------------------------
Thanks for the URL rewriting idea - I've tried it out quickly but I wasn't keen that I still had to use the Page postfix in the .tml files (e.g. when creating a link to the page) - I think that would be confusing.
I also had a quick go at advising ComponentClassResolver, but I realised that when Tapestry reports the list of known components (on startup and on exception pages) it would still list the paths including the "Page" postfix - which, again, I think would be confusing.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Paul Field (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774946#action_12774946 ]
Paul Field commented on TAP5-633:
---------------------------------
Thanks for the URL rewriting idea - I've tried it out quickly but I wasn't keen that I still had to use the Page postfix in the .tml files (e.g. when creating a link to the page) - I think that would be confusing.
I also had a quick go at advising ComponentClassResolver, but I realised that when Tapestry reports the list of known components (on startup and on exception pages) it would still list the paths including the "Page" postfix - which, again, I think would be confusing.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699077#action_12699077 ]
Robert Zeigler commented on TAP5-633:
-------------------------------------
Got to thinking about a full implementation of page name mapping via url rewriting, and specifically your use-case of XXXPage => xxx in the url.
Blogged a solution at: http://www.jroller.com/genjitsuteki/entry/page_mapping_in_tapestry_5
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Paul Field (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698820#action_12698820 ]
Paul Field commented on TAP5-633:
---------------------------------
The "view" package idea is interesting & the naming is more appealing to me than the "Index" idea, but still doesn't seem ideal to me.
Partly, it seems a bit weird having the "verb" first though; it seems that the usual convention in REST-type styles is to have it at the end of the path (for example see http://microformats.org/wiki/rest/urls ).
I'm also not sure how it mixes in when you *do* have some entities with other operations. It would imply that there would be a "view" package, an "edit" package a "create" package and a "delete" package for example; which doesn't seem a natural categorisation to me.
I suppose in that case it does make sense to have a (for example) "user" package containing "EditUser", "DeleteUser" classes & you would have nice REST-style URLs. Of course, because I seem to have a knack of being trouble, my system has command objects that have names like "EditUser" so those clash with the page names too and I would like to have "EditUserPage" :-) Perhaps, I need to rename to have "EditUserCommand"...
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697535#action_12697535 ]
Howard M. Lewis Ship commented on TAP5-633:
-------------------------------------------
Create a package named company and create a class CompanyIndex.
Tapestry will strip off "Company" because it matches the package name, and "Index" because its by itself, resulting in a base URL of "/company" to which the page activation context will be added.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698384#action_12698384 ]
Thiago H. de Paula Figueiredo commented on TAP5-633:
----------------------------------------------------
Another solution would be to create a "view" package and have pages named like ViewCompany (/company), ViewAnalyst (/analyst), etc. I use this approach a lot.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698384#action_12698384 ]
Thiago H. de Paula Figueiredo commented on TAP5-633:
----------------------------------------------------
Another solution would be to create a "view" package and have pages named like ViewCompany (/company), ViewAnalyst (/analyst), etc. I use this approach a lot.
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-633) Allow page classes to have a "Page"
suffix that is not included in the URL
Posted by "Paul Field (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697561#action_12697561 ]
Paul Field commented on TAP5-633:
---------------------------------
Nice idea but unfortunately, then I will have a lot of packages that contain just one class. The core part of our app is primarily a collection of read-only pages centred on the domain objects: Company, Analyst, Region, Sector, Statistics and so on. As I say, the business naturally refer to these as the "Company Page" and "Analyst Page" etc... From a Domain Driven Design point-of-view I like the idea that the Java classes are named after the business domain terms.
Interestingly as we write financial applications "Index" has a very specific meaning so a "Company Index" means something to the business and IndexIndex would be really confusing :-) One of our other apps does have an Index Page (in the business sense).
> Allow page classes to have a "Page" suffix that is not included in the URL
> --------------------------------------------------------------------------
>
> Key: TAP5-633
> URL: https://issues.apache.org/jira/browse/TAP5-633
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
> Priority: Minor
>
> I have an application with a lot of read-only pages. For example, I have a page that shows a company and I would like a URI such as: /company/1234
> However, if I name the page class "Company" then I get a naming clash with the domain object "Company". What I would like to do is call the Tapestry 5 class "CompanyPage" - after all, that is what the class represents and it's certainly how the team refers to that thing internally and with our business (i.e. "Have you seen the new company page?").
> So, please could the ComponentClassResolverImpl remove the suffix "Page" (if it exists) from the class name when it constructs the logical page name?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.