From: Elisa Beshero-B. <eb...@pi...> - 2014-11-11 01:07:59
|
Dear Adam (cc: exist-teixml list): Many thanks for your detailed responses to my questions! I've been storing queries in eXist, and just haven't worked out how to invoke them--so that looks like my next step. You asked if I want users to input their own query scripts, and the answer is, not really --because my students have their own Sandbox installation where they practice and learn XQuery--so this isn't a web interface for them. Rather, as you conjectured, I just need users to call particular scripts I'll have saved. I'm interested in invoking the scripts directly, if I don't have to use PHP. And I may be back with more questions about all this as I experiment. (By the way, I purchased your book and I'm sure I'll be consulting it frequently!) Best, Elisa -- Elisa Beshero-Bondar, PhD Associate Professor of English University of Pittsburgh at Greensburg Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: eb...@pi... about.me/ebbondar On Tue, Nov 4, 2014 at 8:48 PM, Adam Retter <ad...@ex...> wrote: > Hi Elisa, > > Welcome to eXist :-) You can find my comments inline below: > > > I'm working on multiple projects that rely in some way on eXist and > XQuery, and I'm currently > teaching an XQuery unit in my coding-based > Digital Humanities at Pitt-Greensburg. My > > course materials are posted here (and I'm grateful for suggestions and > advice on them!): > > http://www.pitt.edu/~ebb8/DHDS/ > > Very cool :-) I am afraid that I do not have a great deal of time to > look through all of that, but if you want comparison material for > teaching XQuery and eXist, then I have quite a lot available on my > site from various courses I have taught to students: > http://www.adamretter.org.uk/presentations.xml > > > What I need to learn at this point is how best to work with eXist to > develop > > search queries (rather than simply to use it as I've been, which is to > run > > queries to check for consistency of our coding, to generate "code > > reports"--or reports on our use of particular TEI elements, etc., and to > > gather for myself a comprehensive view of our editing and data > extraction to > > our centralized prosopography list (currently posted for use by our > editing > > team at http://mitford.pitt.edu/si.xml ) > > If you are not already doing doing so, then you can store your queries > into the database. By doing this you can then execute them via HTTP, > by accessing them either from one of the three mechanisms that eXist > offers - it's REST Server, via. XQuery URL Rewriting or RESTXQ. > > By having these stored queries generate > HTML/XHTML/XForms/JavaScript/JSON etc, you can produce a dynamic > website in XQuery, just as you would in any other server side-language > such as PHP or Ruby. > > > I'm working with my head of IT at my campus, who's more > > familiar with databases like MySQL, etc. but has been learning about > eXist > > and is willing to work with me to experiment as we try to build query > tools > > for the Mitford project (as well as the other smaller-scale projects.) I > > need (or at least I think I need) to learn PHP and REST, and I'm keen to > do > > that when I come up for air from a busy college semester: I like to think > > I'm a quick study when I find time to breathe from my teaching load! > > You do not need PHP to produce a full web-application with eXist, > instead it can all be done in XQuery and/or XSLT, XForms etc. Of > course, there is nothing stopping you from using PHP with eXist if you > really want to. > > > Here are some things I and my IT colleague would like to learn as we > figure > > out how best to implement eXist for the Digital Mitford project: > > > > * Should eXist be installed at the "front end" of a public-facing web > > project? How direct can the relationship be between web interface and > eXist > > database? > > I would suggest not. eXist is really a database and application > server. It is always good practice to situate these things behind your > web-server. > > > * What methods do other projects use to invoke and deliver XQuery scripts > > from website to database? > > Typically you reverse-proxy from your main Web Server, the parts of > Web Applications built in eXist that you wish to expose into the URL > space of your main website. This sort of architecture is discussed in > some detail in the upcoming eXist book from O'Reilly (a shameless plug > I am afraid ;-)). > > > We're considering whether to have eXist run behind a firewall on another > > server, to speak to public-facing site pages. > > Yes, this is the normal scenario. > > > In reading eXist's development > > pages, I'm thinking I'd like the simplest possible interface: If I could > > have users press a button that simply delivered an XQuery file to > process in > > eXist, and have eXist post the HTML output directly to the site, I'd be > > pretty happy---I'm just not sure how it's done! > > Do you want your users to write and submit queries to eXist? If this > is for a teaching/learning purpose I could understand. Otherwise, you > normally store parameterised queries into eXist and invoke them > directly via HTTP and they produce HTML. > > > This is my second time teaching the coding-based DH class at my campus, > and > > I hope to offer it each fall. Each year, prepping for the class offers > some > > opportunity for me to explore something new--and this month, as my > students > > are writing their first XQuery to the eXist installed on our intranet > > "sandbox" server (behind the campus firewall), I'm hoping to learn how to > > bring eXist from behind our firewall...any leads are most appreciated! > > > > Thanks, > > Elisa > > -- > > Elisa Beshero-Bondar, PhD > > Associate Professor of English > > University of Pittsburgh at Greensburg > > Humanities Division > > 150 Finoli Drive > > Greensburg, PA 15601 USA > > E-mail: eb...@pi... > > about.me/ebbondar > > > > > >> > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > |