New in RavenDb Studio 1.2: Scrollable Document Lists, and a Details View
Along with the exciting new features in the core RavenDb database, we’ve been hard at work improving RavenDb Studio, the management UI for RavenDb. Over the next few days, I want to share with you some of the major enhancements.
Death to paging!
Almost the very first thing we did when we started work on the Studio for 1.2 was to kill the paging interface for document lists. And hammer nails in its coffin. Please give a big round of applause as we introduce … scrollbars!
That’s right: scrollbars that let you scroll through your entire collection of documents, all 2,147,483,647 of them. Don’t be alarmed, you db admin types: the Studio is doing the right thing and paging in documents only as you scroll to them (and paging out documents you’ve scrolled past, so they don’t clog up memory).
Digging into the Document Details
By popular request, we’ve also added a details view as an alternative to the existing card view. Click the Document View Style button in the top right corner of any documents list and you can toggle between card view and details view (which ever setting you choose is remembered between sessions).
Which columns get shown in details view? Well, naturally the Studio allows you to choose for yourself which columns you want to see. Or you can let the Studio choose for you.
Pick your own Columns
To choose your own columns, right click on one of the column headers and click the Choose Columns menu item. You’ll see a dialog where you can choose the columns you’d like:
When you click in the Binding column to add a new Column, the Studio will help you out by showing a list of all the properties (and nested properties) in the visible documents:
Notice that you can bind to document meta-data too!
Automatic Column Selection
To save you having to pick columns yourself for each set of documents you view, the Studio has a special IntelliPickNot TM feature. It will inspect the properties of documents currently scrolled into view, and do its best to pick a sensible set of columns. And as you scroll, and different types of documents come into view, it will automatically update the column set.
How does it choose columns? Good question. Let me check the documentation source code…
Basically it picks the top 6 most commonly occurring properties in the current set of documents. But it will give certain properties a boost in importance making them more likely to be picked. The Studio has a built in list of property names that it will look for. So any property that includes the words “Name”, “Title” “Description”, or “Status” will be prioritised. You can customise this list of priority columns for a database by creating a document in that database called “Raven/Studio/PriorityColumns”, like this:
PropertyNamePattern is interpreted as a Regular Expression so you can get quite sophisticated in properties you want to boost.
The IntelliPick algorithm has one more trick up its sleeve. Have a look at this screenshot:
Do you see it? If you include particular properties in a query, or as a Sort By option, those properties will get boosted in importance. In the example shown, Artist.Name is part of the query, and results are sorted by Genre.Name, so both these properties are picked out to appear as columns. Similarly, when viewing results for a particular index, any properties that are included in the Index name will also be given a boost in priority.
Comments
I would really like to see a Linqpad like snippet tool built right into the studio. It would allow me to execute C# code against the Raven Database. If I need to do a mass update of documents, then I can do it right from the studio.
Maybe incorporate some of what Compilify.Net has done with Roslyn?
Really looking forward to all this - nice work. I would second Khalid's comment as well.
Very nice stuff. Any details on how the scrolling is implemented?
Khalid, There are quite a few problems there. 1) We don't support a way for you to execute arbitrary code on the server. 2) We have Scripted Patch support, though, and we might add that, not sure. 3) The security implications. 4) You'll be generating a lot of assemblies, which we will then have to get rid off.
@Sean, I thought somebody might ask that! Look out for a couple of blog posts explaining how it all works in the next few weeks. In the meantime, I've published some sample code you can look at: https://github.com/samueldjack/VirtualCollection
Samuel - thanks for the link. Looking forward to reading more soon too. I'll be looking to use it in a Winforms app. "Stealth Paging" - great name too :)
Do we know what build this will end up in?
Welcome to the future of infinite scrolling! :)
@Bill, It is in all current unstable builds of RavenDb 1.2: http://builds.hibernatingrhinos.com/builds/RavenDB-Unstable
Bill, In 1.2
heh. yes.
So were at build 960 now? where would i see the build numbers your referring to?
Bill, You can see that in the bottom right corner in the studio.
hmm..
http://imgur.com/Yvw7m
I dont see such numbers, i see build 960, same as on the download page...
these captchas are relentless...
Bill, Those are the right numbers, the latest stable releases. The unstable releases which contains this are available here: http://ravendb.net/download They are 20xx (the latest right now is 2055)
Nice! But how do I do to get the result from a query into a file? I would like to have the option to have the, non-paged, result saved into a file. Something similar to the Export to Excel found in LINQPad.
Robert, That isn't something that we are interested in offering in the studio for queries. Mostly because you can't export a document to excel, excel is rows and columns, and a document is more complex than that.
Ayende, I get you want people to think of a Document database differently but a lot of the management workflows and needs of database "Studio" are the similiar to a traditional RDMS 'Studios', such as exporting a query result to excel for further analysis. I think all Robert was asking for was a way to export the 'flattened' results of a query, not all the multidimensional data of a document.
Also, it's true Excel is natively a X and Y grid but it does support opening XML and can handle hierarchies through groupings and indentations, similar to the new collapsable JSON UI (which, btw, will be very useful and I'm looking forward to using a stable 1.2)