[DevExpress Support Team: CLONED FROM S132933: How to provide short and user-friendly URLs for XAF Web Views]
Could you make it configurable for each view by Model (and maybe an attribute)?
Also for default views, could you remove the _ListView and _DetailView suffix?
Following the before, can you provide a convention for variant views, let's say for Contact_ListView_Varied to have the URL Contact/Varied
Does it accept the value of the FriendlyKey for the ObjectKey?
I aggre with Santiago.
It will be more friendly if you remove the suffix for default views.
URL's could be;
*/Contacts or */ContactList -> For ListViews -> Remove _ListView suffix and add 's' or 'List' for plurals
*/Contact/ContactID -> For Detail Views
For the varied you can add Varied suffix.
*/ContactsCompact -> Instead of Contact_ListView_Campact
*/ContactSummary/ContactID -> Instead of Contact_DetailView_Summary
It's better to provide FriendlyUrlOptions(string listViewIdentifier, string detailViewIndentifier) attribute which could be applied to class and keep the default values as suggested.
Good idea,
/Contact or /Contacts or /ContactList would open a list view that matches the regular naming pattern ("Contact_ListView")
/Contact/<ContactID> would open a detail view that matches the regular naming pattern ("Contact_DetailView").
Custom view ids could have the following urls:
/<custom_view_id> - for LV
/<custom_view_id> /<ContactID> - for DV.
Thank you for your suggestions - we will take them into account for the future.
In case anyone finds this ticket without seeing the original one (S132933), note that we already provide the capability to supply your own format of user-friendly URLs:
friendly-url-sample / 3. Fully change the default route format for BrowserHistoryMode.FriendlyUrl mode
Feel free to implement your custom URL conventions using the new RouteManager API and share your results. We and the whole XAF community would highly appreciate your contribution. Here are additional articles that may help you:
How to: Extend the Application Model
How to implement a custom attribute to customize the Application Model
Hi Anatol,
Thank you for your answer.
I have already commented on original ticket but since Gosha moved Santigaos answer to thie seperate ticket i also moved my comments under this ticket.
I also aware friendly-url-sampleand you already provide the capability to supply our own format of user-friendly URLs .
But we just want you to change your default format for the most demanding one. So i think nobody will need to customize it just for default views naming convention.
I think it is more simple while it is in CTP mode thank after it is released.
Thanks in advance.
I agree with Akin. To preserve the convention over configuration paradigm, the default format could be a little more friendly, without anyone having to customize it.
Guys,
At this stage, this new API is primarily to help you make your own URL conventions easier - it was a difficult task previously.
We have not planned to enforce any default URL conventions in v19.1 or until we receive more user feedback in this regard. If it is still important for you, please share your own implementations using this API and results for important scenarios in your apps (ListView, DetailView, DashboardView, View Variants, reports, dashboards, custom Views without suffixes, class names already in plural form or without it, class names in different languages for which 's' or 'es' would not make any sense, etc) once you get your hands on it. Feedback from folks like you proven and filtered by time and production use will help us come us with the most suitable generic implementation to the box much faster.
If we do not receive such feedback - no problem, our team will focus on more important and clearer things.