-
Notifications
You must be signed in to change notification settings - Fork 0
12‐enhance‐titles
[under construction]
In this stage, we begin to move from minimum viable product towards a more advanced research interface. Our list of article titles provides only the article and date, but for a researcher that doesn’t go very far. If we want to expose more information to make the archive more usable, we should think about the order of information, how it is presented, and what information we want to expose to a user. Here is a sample of the list we currently have:
And here's a sample of the list we will create by the end of this stage:
This stage is still very intermediate. The goal of building this Articles page over a series of stages is to demonstrate the kind of iterative development all digital editions undergo. We are accustomed to seeing these products as final and authoritative research objects. In most cases, project development does reach that stage, but there are many iterations a project must go through before then, most of which a public user will never see.
To advance this Articles interface, we will add the following features:
- publication title field
- ID field
- formatted date field
- incipit field
We explore this question a bit when we introduced fields a few stages back, but in this case we want to use fields for a couple reasons. First, it makes the information more reusable in other parts of the application. Second, it will become an essential part of the search feature in stage 15. We want to build extensible parts in order to make development of future features more streamlined.
Let's review the implementation of fields before we jump back into editing them. Remember that we write the XQuery for fields in a separate file in the root of our application directory, collection.xconf, which runs these queries and stores the results in memory when we build and install the application in eXist-db. This means that our development cycle is slightly different than it is when we build modules; any change to the fields in collection.xconf requires a rebuild using ant
at the command line and a reinstall in the web interface of eXist-db. Here’s a new command line utility for interacting with eXist-db that might make this process a little simpler: https://github.com/eXist-db/xst
- Enhanced articles list
Add publication title, id, date (formatted), and incipit using fields
Goal: add more information to the articles list to begin developing other features and enhance the existing list experience
Using our pipeline:
Identify and isolate the information you need to include - only develop the format title field in the tutorial, fast forward the rest of them
Decide whether this information should live in a field (I will use this again, and I may want to use it for filtering or sorting in the future, etc).
Begin writing fields, considering the smallest context you want to consider for fetching this info. (should this live on the article level? the paragraph level? the metadata level?)
Use tmp files for testing results along the way. Remember to build, install, and check monex as you develop each field.
Add the function hoax:format-title() and write the test for it.
Paste the other fields, then begin fetching these in the titles.xql module using ft:query()
Change titles-to-html.xql to create individual <ul>
elements for each article.
Challenge: filter the results, format the HTML output in a more useful way
Think about what features "gatekeep" other features for a user-- it's great to see the titles listed this way, but what if I only care about reading the text? where do we go from there?