Comments (5)
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 <woltlab-metacode>
HTML elements on the server but as a user you will either interact with their rendered representation or the familiar BBCode syntax.
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 woltlab://v1/core/attachment/12345?thumbnail=1
or smileys woltlab://v1/core/smiley/?code=%3Ajoy%3A
– although I am not entirely sure about the exact format.
Also, I think that the <object>
part should use the plural form to align with the naming scheme for RPC endpoints.
from wcf.
I take it the intent with this is that on page load these links would be rewritten into https://www.example.com/forum/post/12345
or whatever it happens to be at the end?
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 woltlab://
protocol in links to threads and other content, and I would like to be able to use this in the ACP in various places which accept links. Is this an intended use case?
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 woltlab://
url or will these be hard-coded and only update when the thread content is updated?
from wcf.
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.
com.woltlab.v1://<packageIdentifier>/<object>/<optionalParameterForId>?optional=queryString
Some example URIs:
# Permalink to a post
com.woltlab.v1://com.woltlab.wbb/post/12345
# Link to a user profile
com.woltlab.v1://com.woltlab.wcf/user/12345
# Resolve a smiley by its code
com.woltlab.v1://com.woltlab.wbb/smiley/?code=%3Ajoy%3A
from wcf.
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.
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:
urn:oasis:names:specification:docbook:dtd:xml:4.1.2
I might suggest even putting in the package in the schema, based on that example.
Examples
# Permalink to a post
wbb:com.woltlab:1.0.0://com.woltlab.api/post/12345
# Permalink to a support ticket (from an addon)
tickets:com.example:2.3.5://com.woltlab.api/ticket/12345
This would make the new schema take the following format:
<package>:<namespace>:<version>://com.woltlab.api/<object><opionalParameterForId>?optional=queryString
Using the com.woltlab.api
as the address specification is mostly just to help with aesthetics, and the exact text label can be discussed, but I feel this may be the best way to remain compliant with the specification.
from wcf.
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 ://
are two different types of URIs. You cannot mix and match them, they exist in parallel and solve different problems. The ://
variant is used to map to a hierarchy where the colon notation is more like a unique identifier.
from wcf.
Related Issues (20)
- Avoid race conditions when saving reactions
- Emoji picker
- Improve confirm message when deleting label groups
- Add ``GoogleOther`` to spider list
- Migration of outstanding jQuery code to typescript
- Stop using and deprecate `DateUtil::format()`
- Add support for the password strength meter to `PasswordFormField`
- `HtmlString` for handling of both HTML and plain text strings
- Overhaul condition UI
- Mobile logo is not centred on login and register pages
- Select attachment tab when uploading files via drag & drop
- 6.0, 6.1: A reply to a comment generates a JS error
- Additional event in userCard.tpl HOT 1
- [6.1] Unable to find template '__devtoolsProjectRequiredPackagesFormField' HOT 1
- Ckeditor 43: Insert image bad styling in dark mode
- Clean up files that are no longer in use
- Search for error id in error log finds no entries
- Add AVIF support
- Add WebP image embed support
- Phase out `Database::prepareStatement()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wcf.