Triply-Dev / YASGUI.YASQE-deprecated

Deprecated, see https://github.com/TriplyDB/Yasgui for the Yasgui monorepo
MIT License
73 stars 36 forks source link

Icorporate template hints and context info from CodeMirror-XQuery #68

Closed alanruttenberg closed 4 years ago

alanruttenberg commented 9 years ago

https://github.com/angelozerr/CodeMirror-XQuery/

The template hints are very nice and mirror something I'm already doing, but by coding instead of directly in YASGUI see https://code.google.com/p/ohd-ontology/source/browse/trunk/src/analysis/sparql-patterns.r

Those templates are invoked as, e.g.

tooth_or_surface_procedure_pattern(proci="?proc1") to substitute ?proc1 for ?proci in the pattern.

What is appealing about the codemirror template hints is that you also only have to enter the variable name you want to update once, and the template code fills in the others.

Context info will let me add term definitions for choices in autocomplete.

LaurensRietveld commented 9 years ago

The XQuery demo seems to be down ( https://github.com/angelozerr/CodeMirror-XQuery/issues/14), but I'll take a look at it. This feels related to https://github.com/YASGUI/YASGUI/issues/23, as I plan to add a bookmarking/collection functionality. This would be something similar, but on a BGP level right? (and, with substitution that is) Some requirements are the same, e.g. storing the template in something else than local storage as this is mostly suitable for cache. But these templates are somthing you don't want to loose whenever you switch browsers or clear your local storage.

My main concern is keeping a standards compliant SPARQL syntax, so we'll have to see whether that is still possible.

On Sun, May 10, 2015 at 6:00 PM, Alan Ruttenberg notifications@github.com wrote:

https://github.com/angelozerr/CodeMirror-XQuery/

The template hints are very nice and mirror something I'm already doing, but by coding instead of directly in YASGUI see https://code.google.com/p/ohd-ontology/source/browse/trunk/src/analysis/sparql-patterns.r

Those templates are invoked as, e.g.

tooth_or_surface_procedure_pattern(proci="?proc1") to substitute ?proc1 for ?proci in the pattern.

What is appealing about the codemirror template hints is that you also only have to enter the variable name you want to update once, and the template code fills in the others.

Context info will let me add term definitions for choices in autocomplete.

— Reply to this email directly or view it on GitHub https://github.com/YASGUI/YASQE/issues/68.

alanruttenberg commented 9 years ago

The idea isn't to change the SPARQL syntax, but instead to make available a set of "lego" pieces that can be more easily composed into more complex queries. While I have program syntax in my own code, I expect it feels more like direct manipulation of the BGP snippets when in YASQE - drag in a snippet, then another, adjust variables, add a couple of lines, drag in another snippet/pattern.

Bookmarking full queries is a useful thing, but it is more for demo or for using as a simple template with minor modifications.

I'm mixed about storing the templates in local storage. At a minimum they should be able to be loaded up from a file and be able to be exported to share if construction of them is possible in YASQE.

LaurensRietveld commented 4 years ago

Closing as we're moving to a new monorepo at https://github.com/TriplyDB/Yasgui. If this feature still applies (considering it's been a while since opening this), could you report it there?