Contents

My Todos to prepare for 2.0

Fix up Barchart View and Scatterplot view.

This includes fixing up and documenting the code, as well as looking into maybe using amcharts or some such thing to make really pretty graphs. Maybe I'll make it an option.

7/13

Check out amCharts and see what it's API is like, in order to determine if it's a good candidate for using. The charts are pretty nice looking, but it uses flash. (Does this go against the Exhibit philosophy of all Javascript? I think the reason for that is to make it easy on web authors, not to open up to wide audiences, I'll have to check...)

---

Well, I downloaded and played around with amCharts, as well as several other Javascript options including Emprise Charts, PlotKit, and a few others. It occurred to me that the solution we have now in Exhibit is pretty good as far as javascript goes, so I'm not sure it would be worth it to incorporate an external charting solution which is also solely javascript. While PlotKit and the others are nice, and arguably nicer, I don't think they're nicer enough to warrant the work it would take to use them.

amCharts, on the other hand, is a tougher call. It's flash-based and very well implemented so it offers a lot more features, like animation, 3D views, and so forth. These very benefits, though, are also things going against it since using flash would limit the audience who can view it. However, from the point of view of the exhibit's author, it could be made to work the same as the Javascript one, just with better looking results. Unfortunately, it's not free, nor can we properly pay for it. It's purchase price is based on how many sites you want to use it on, which just doesn't work for our purposes. There is a no-cost alternative that we could probably use, but it has a small link ("Charts by amCharts") in the top-left corner. I'm not sure if we want to go down that route. Maybe we could work out something with the author where we can remove that and give him props on the exhibit web page or something? Or maybe it's not an issue to leave that there, and let the exhibit's author pay for it if he or she really wants to get rid of it.

As far as integrating amCharts with Exhibit goes, it looks like it'll be fairly complicated. The data expects to be in either CSV or XML format, while the settings are XML. Actually, looking at the website again, I see in its feature list: control chart with JavaScript (reload data and settings, set and get data and separate parameters)" , so maybe it's not so bad.

Lastly, in talking this over with Mason, he suggested a solution where amCharts could be specified, but it would degrade gracefully to Javascript if the user doesn't have flash enabled. And if he has no Javascript... well then I guess Exhibit wouldn't really do it for them, I don't think.

7/14

amCharts is looking pretty good. Just today, actually, a Scatterplot chart was released! It lets you have the varying bubble sizes like in the TED presentation. I couldn't find documentation for the amCharts API that would allow exhibit to control it with Javascript, so I posted on the forum. I received a [very detailed response] with all of the available functions. It definitely seems workable.

I'm wondering if it's feasible to quickly go from Exhibit's Javascript -> XML -> amCharts, though. Exhibit currently allows you to export the given collection as XML/JSON/etc, and it seems to work pretty quickly so I'm guessing it's not an issue.

My Todos for Wiki integration

7/12

I got a local copy of wiki running on my machine in order to play around with. (Check)

7/13

Look at Margaret's code and integrate it with my wiki.

7/17

So far this hasn't been going too well.

Initially I tried to set up a wiki on my own laptop. It kind of worked, but I ran into user permissions errors here and there and couldn't get any extensions installed (even the simple MyExampleExtension tutorial one on the mediawiki web site). This was an unmitigated failure.

Next, I set up a wiki using MIT's script service. This one failed, too, but it wasn't a total disaster. I learned that the version MIT gives you is 1.5.8 and eventually found in Margaret's code that it uses an extension API hook that requires version 1.7.0.

I eventually gave in and just asked Ryan Lee to set me up a test wiki like Margaret has since hers seems to work. Now I have an account a wiki, and Vim on the server, so I should be set. Sadly, I'm not, though... It's still not working and I can't for the life of me figure out why not. So far this is what I've done:

  • Checked out exhibit-mediawiki-extension from SVN.
  • Created an Exhibit folder in my wiki's extensions directory.
  • Put includes/Exhibit_Main.php and scripts/Exhibit_Create.js in there.
  • Modified LocalSettings.php in the toplevel wiki folder to include the following line at the bottom:
 require_once 'extensions/ExhibitExtension/includes/Exhibit_Main.php';
  • Changed Exhibit_Main.php to reflect where my Exhibit_Create.js was. (It was expecting it to be in an ExhibitExtensions subdirectory of extensions, as opposed to my own Exhibit subdirectory.
  • Got rid of caching in my wiki. Added this to my LocalSettings.php file (Note that $wgMainCacheType is probably already there so look for that):
 ## Shared memory settings
 $wgMainCacheType = CACHE_NONE;
 $wgMessageCacheType = CACHE_NONE;
 $wgParserCacheType = CACHE_NONE;
 $wgCachePages = false;
 $wgMemCachedServers = array();
There is also a manual way to clear the cache without changing the wiki settings. I found this online:
"To bypass MediaWiki's parser cache and ensure a new version of the page is generated, click on edit, replace "action=edit" in the URL shown in the address bar of your browser by "action=purge" and submit the new URL."
  • At last!!! The insidious little problem was found by Ryan Lee with a little shell script magic. It turns out there's one more edit to be made. In the mediawiki folder in includes/OutputPage.php at the bottom of the output() function make it like this:
 if ($this->mArticleBodyOnly) {
     $this->out($this->mBodytext);
 } else {
     wfProfileIn( 'Output-skin' );
     smwfAddHTMLHeader( $this );
     wfExhibitAddHTMLHeader( $this );
     $sk->outputPage( $this );
     wfProfileOut( 'Output-skin' );
 }

My Todos for Blog integration

This will have to wait until wiki is done.