Skip to content

Document URL pattern best practices#11227

Open
WimJongeneel wants to merge 3 commits into
mendix:developmentfrom
WimJongeneel:url-best-practices
Open

Document URL pattern best practices#11227
WimJongeneel wants to merge 3 commits into
mendix:developmentfrom
WimJongeneel:url-best-practices

Conversation

@WimJongeneel
Copy link
Copy Markdown
Contributor

@WimJongeneel WimJongeneel commented May 20, 2026

Add some guidance on structuring URLs within a Mendix App

@Yiyun333
Copy link
Copy Markdown
Collaborator

@WimJongeneel Please let us know when this is ready for tech writers' review. Thanks!

When designing page and microflow URLs, prefer clear path segments over compact patterns:

* Use `/` to divide the URL into meaningful parts
* Prefer putting a parameter in its own segment, for example, `product/{Product/Name}` instead of `product-{Product/Name}`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would state this more explicitly like the recommendation below:
'Put a parameter in its own segment'


When designing page and microflow URLs, prefer clear path segments over compact patterns:

* Use `/` to divide the URL into meaningful parts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are using segments everywhere else, I would say
'into meaningful segments'

* Use `/` to divide the URL into meaningful parts
* Prefer putting a parameter in its own segment, for example, `product/{Product/Name}` instead of `product-{Product/Name}`
* Use static segments to make the structure explicit, for example, `category/{Category/Code}/product/{Product/Name}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add an explicit case to no put a variable as the first segment:
'user/{User/id}instead of{User/id}`

URL conflicts are checked per path segment. Two URLs are considered conflicting when they have the same number of segments and Studio Pro cannot determine that at least one corresponding segment is always different.

Common conflict cases include the following:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should distinguish here between full and partially conflicting URLs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And moreover, describe what happens when there is a partially conflicting URL. (with a concrete example)

URL conflicts are checked per path segment. Two URLs are considered conflicting when they have the same number of segments and Studio Pro cannot determine that at least one corresponding segment is always different.

Common conflict cases include the following:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be helpful to show how these conflicts can resolved. For example for
product/{Product/Name} and product/{Product/Code}

we can use more explicit URLs like:
product/name/{Product/Name} and product/code/{Product/Code}

For order/{Order/Id} and order/123
we can do
order/{Order/Id} and order-123

etc

* Use `/` to divide the URL into meaningful parts
* Prefer putting a parameter in its own segment, for example, `product/{Product/Name}` instead of `product-{Product/Name}`
* Use static segments to make the structure explicit, for example, `category/{Category/Code}/product/{Product/Name}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could say to use - for seperating static segment descriptions, for example:
/orders/request-return-label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants