Comments (2)
Capturing #17
@elf-pavlik: This assumes relying on
hydra
helper from namespaces module. At the same time I would like to understand better advantages of relying on that helper instead of keepinghydra:
prefix in JSON-LD context and rely on use of CURIEshydra.Collection
(helper) vs."hydra:Collection"
(CURIE)
@alien-mcl: As for the question regarding hydra helper - it's purely for code readability and to avoid string literals flying here and there. We could have a list of constants defining each term IRI, but I thought that having a hierarchy of IRIS arranged with constant names relating to original prefixes are a better way. It has nothing to do with the JSON-LD context and it's purely for TypeScript/JavaScrpt readability while accessing some of the JSON-LD originating Javascript objects.
It seems to me that hydra namespace helper depends directly on the JSON-LD context used for framing the "hypermedia interface". Terms from hydra vocab used in that interface get matched in code against full IRIs provided by that namespace helper. In PR #17 we can see that matching against the IRIs provided by helper puts particular requirements on the JSON-LD context used for framing.
Do we intend that hydra namespace helper only gets used internally by the client or also expose it to the developers who use the client in their applications?
from heracles.ts.
The situation now is Heracles.ts no more uses JSON-LD framing for data model processing. The namespace
helper is still used for obtaining hydra
(and couple of other vocabs) specific resources, but there is no assumption for the data payload which is obtain from the server.
The response is first flattened to contextles form with all IRIs (including blank nodes) expanded and all values normalized. Then the internal engine traverse such a graph searching for resources matching hydra
IRIs to build a data model. The only assumption is these resources and their matching is compliant with the spec and how they were expected to be organized.
I hope this answers your doubtes.
As for the JSON-LD context used - there is neither special requirement nor limitation on using it by other developers.
from heracles.ts.
Related Issues (20)
- Not able to use Heracles.ts in my Project. HOT 5
- Consider renaming displayName to title HOT 1
- Get class property value HOT 2
- Question on status of spec and releases HOT 3
- Dependency Dashboard
- Don't mint blank node IDs unless absolutely necessary HOT 2
- Revisit extraction of "hypermedia" from resources HOT 1
- Extending from Arrays (Compatibility) HOT 3
- Apidocumentation instance set entrypoint property as undefined HOT 5
- Improve operation invocation API with IRI templates
- Obtaining whole collection HOT 1
- Are responses fully typed? HOT 7
- Document how to install and use Heracles.ts HOT 2
- correctly using heracles on a localhost HOT 6
- Links are to strict HOT 1
- Hypermedia lacks response headers HOT 1
- Consider compensation for missing entry point in API documentation HOT 1
- Cease support for memberTemplate HOT 1
- Add support for other RDF serializations
- Multiple API documentations
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 heracles.ts.