-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: URIs for internal links #5913
Comments
I take it the intent with this is that on page load these links would be rewritten into I like the format of the woltlab:// urls. Curious to see where this goes. Edit: Question regarding user UX. Say I want to use this to insert a permalink. As a technical user, I would like to use the Also, what of non-technical users? Will (manually created) links in a thread to another thread for example be rewritten when the thread is posted to the |
Yes, the replacement should take place on runtime on the server, resolving the logical links to their actual URL. The same process takes place in reverse when processing input messages on the server, mapping the actual URL to their logical representation. That said, these are meant to be a technical detail and not something you would ever face as a user. The best example I can come up with are BBCodes: Those are stored as The whole purpose is to avoid hardcoding URLs entirely so that they can easily replaced on runtime or during an import while at the same point using the semantics of URLs instead of inventing an own format. I can even see this expanded to things like attachments Also, I think that the |
After talking to @TimWolla a bit, we came to the conclusion that it makes things a lot easier to move the version into the schema and moving the package identifier to the hostname part. This simplifies things a lot and makes for an easy mapping. RFC 3986 permits a limited set of characters for the schema, but RFC 7595 section 3.8 explicitly recommends the use of a reverse domain for private schemas.
Some example URIs:
|
Looked over the RFCs. I like the idea of putting the version in the schema. RFC 3986 section 1.1.2 provides a versioned example that may be good to follow: I might suggest even putting in the package in the schema, based on that example. Examples
This would make the new schema take the following format:
Using the |
Thank you for your feedback, although I think we’re trying to solve different problems here. The versioning is meant to allow us to handle all URLs in a centralized location and that requires the URI to be predictive. This means that all URIs will have the identical structure but in case we need to make changes, we can do so by incrementing the version and maintaining backwards compatibility. Also, it looks like you’re mixing up two different types of URIs, the colon separated and the |
Links to internal pages, such as quotes use absolute URLs which work fine in general but are a true pain when moving to a different domain. It also means that a simple search & replace of URLs can be quite dangerous and prone to errors.
We could change the internal link format into something that can be resolved on runtime, that follows a strict schema and makes it easy to detect dead links. This would even allow us to dynamically strip links that point to resources that do not exist anymore.
woltlab://
protocolversion
is a numeric number to allow changes to the spec later on.packageIdentifier
matches the name found in thepackage.xml
.object
is the name of the object, similar toobjectType.xml
.objectId
is a case-sensitive alphanumeric string ([a-zA-Z0-9]
).Extra parameters are allowed through the optional query string.
Examples
The text was updated successfully, but these errors were encountered: