Open ericelliott opened 11 years ago
Might want to also check out [kiva/backbone.siren]
Addressing your concerns:
Code on demand
I'm very interested in Code on Demand. I didn't see an example in Jiron. Do you see this as a script tag?
Style support
What does this mean to you? I have a plan to add class
attributes to just about every element of Siren. I find I can use them everywhere. For me, personally, they're becoming one of the strongest features of the format. Clients would be able to key "style" off of class values.
I'm very interested in Code on Demand. I didn't see an example in Jiron. Do you see this as a script tag?
Yes. Just a script that would load on the client and provide additional behaviors. Obviously, we'd need to come up with some restrictions and semantics to make it easy to hook up those behaviors to whatever UI the client choses to express. It should not just try to interact with and manipulate the host document directly.
Style support
To me, it means that it would be nice to provide a default view for browsing the API directly.
I've been thinking of doing this as well to make a very simple api browser. If you make an api request, and hit it with a typical browser's Accepts, it will spit out a simple html doc with the json in a <script>
and another helper js lib referenced via <script>
that will dynamically render a human friendly interface.
Is that what you're trying to get at?
Something like that, yes. =)
Cool idea. I think (making assumptions here) that your Jiron project require's node? I think it would be most useful as a stand-alone javascript lib so any platform could use it since all you need to do is spit out some html and reference the lib, which any server platform can do.
Jiron doesn't require Node, but I'm already working on a Jiron serializer for the Node siren-resource module -- which is also a cool project.
I just checked - there are Ruby gems that wrap Jade for the client. A Jiron client could easily use those for the client compiler.
Also, It's easy to get Jade working stand-alone in the browser using Browserify V2's standalone mode.
sounds cool. Keep pulling on that string...maybe a super simple but complete example (psuedo-api server, that spits out siren/json and jiron)
Yeah, siron-resource will do that, soon. Jiron support is the next feature I want to add to it.
@ericelliott Any more work done on your jiron? It looks like a tempting solution to create responses, we might try it out in a Rails backend.
I've been frustrated by the limitations of JSON for expressing hypermedia, so I'm experimenting with mapping Siren semantics to HTML (via Jade).
I'd love to get some feedback on this effort. I'm calling it Jiron.