Team:Edinburgh/newinformatics(igemwikhacks)

From 2009.igem.org

Revision as of 21:06, 20 October 2009 by Dzonni (Talk | contribs)

New Informatics - iGEM WIKI Hacks
Personal note

"And the huge fight with the iGEM WIKI began..." - JD's personal diary, 15th of June, 2009.
JD
iGEM WIKI is great system but only if you try to do things which are meant to be done. Everything you want to do what is conventional on proper hosting with, for example access to Apache/MySql/FTP of the server, is really hard to implement on current WIKI system. First 8 weeks of my work with iGEM WIKI I totally hated it but right now I think that it was a good and worthн fight. Current WIKI system gave me a chance to prove that I am able to find solutions to unconventional problems.

I don't really remember all the small hacks I found during my work with WIKI, that is why list of hacks won't be too long and maybe will be updated later.

Hack 1: action=raw hack

This finding was really great. Actually, this thing is clearly documented on MediaWiki documentation page but it was hard to find it, since I didn't know what I was looking for. My problem was, that when you work with Flash objects and if you want data to be dynamicaly loaded you can do it by either using any of the script languages, say PHP, or Java or, what is much more convenient if the amount of data is not too big, XML. You can easily add xml data to the wiki page, for example, https://2009.igem.org/Team:Edinburgh/mapxmlaustria - page with info for map (mentioned earlier) about Austria. Everything is great, but it turns out that your XML data is wraped by thousands of HTML tags and Flash can't recognize it.

You won't believe it, but I started to write small parser on ActionScript, so I could get out my XML data from, say https://2009.igem.org/Team:Edinburgh/mapxmlaustria. And I finished this parser for about 85% when I discovered this cool features. If you will pass action parameter to your page with raw value, you will get clear data of the page without any additional WIKI encoding. Check it: https://2009.igem.org/Team:Edinburgh/mapxmlaustria?action=raw

This is absolutely amasing finding. For example, it also allows you to add such things as

<script type="text/javascript" src="https://2009.igem.org/Team:MyUni/myjsfilewithverylongdatainside"></script>. This is convenient way which I like much more then using proposed by iGEM style of including files.

Action parameter has lots of other values, for example, render which might be useful in certain situations.
Edinburgh University iGEM Team 2009