问题
For Marklogic, it's a NoSQL db and powerful server engine. I use *.xqy file to write code before,but marklogic 8 has an advanced function is that it can write javascript code directly.For more speed to search at database, I want to transplant the xquery project to javascript project.But there is no existing frame to build my project. Actually, I was use the Roxy frame for my xquery project. And I need the same MVC framework for javascript.
回答1:
There’s a lot to untangle here.
First, the runtime performance differences between the equivalent functionality written in XQuery and JavaScript will be negligible. I’d suggest you weigh other factors more heavily when deciding between them. For example, what will your developers be most productive with? What parts of the language ecosystem will be relevant to you? Is your data primarily XML or JSON?
As for Roxy, there currently isn’t an equivalent in the JavaScript world. If you’re interested in creating a fork, I’m sure the community would be willing to offer guidance.
回答2:
If you are talking about a server-side MVC model, then it's true there is no JS framework available yet. There is a lot going on though:
- Christy Haragan is putting a lot of effort in various TypeScript-related projects that cover the full stack
- Slush-marklogic-node provides a client-side framework, building on top of the MarkLogic REST-api
- MarkLogic Samplestack provides reference architectures for Java and NodeJS 3-tier applications
Last but not least, Roxy can deploy your custom server-side JavaScript just as easy as XQuery, and other code..
HTH!
来源:https://stackoverflow.com/questions/33886993/is-there-any-frame-work-for-marklogic-to-write-javascript-code