<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Depth-First: Tag platform</title>
    <link>http://depth-first.com/articles/tag/platform</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>JavaScript for Cheminformatics</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/jm999uk/244054409/"&gt;&lt;img src="http://depth-first.com/demo/20080715/rhino.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Regular readers of this blog know that one of its recurring themes is the convergence of Web technologies and chemical information. Although several articles describe how &lt;a href="http://depth-first.com/articles/tag/ruby"&gt;Ruby&lt;/a&gt; and &lt;a href="http://depth-first.com/articles/tag/java"&gt;Java&lt;/a&gt; can be applied to cheminformatics, one language has never been featured: JavaScript. JavaScript is both the default language of the Web client, and a language of growing importance &lt;a href="http://depth-first.com/articles/2007/05/25/flex-rich-internet-applications-and-cheminformatics"&gt;elsewhere&lt;/a&gt;. This article, the first in a series, introduces JavaScript as a tool for creating rich, chemically-oriented Web applications.&lt;/p&gt;

&lt;h4&gt;Surely You Jest&lt;/h4&gt;

&lt;p&gt;If your last exposure to JavaScript was in the 1990s, a lot has changed for the better. Most importantly, performance has increased considerably, making possible JavaScript software of considerable complexity. A growing collection of well-crafted libraries such as &lt;a href="http://www.prototypejs.org/"&gt;Prototype&lt;/a&gt; and &lt;a href="http://script.aculo.us/"&gt;Scriptaculous&lt;/a&gt; now make it possible to focus precious developer effort at a higher level of abstraction. Although cross-browser compatibility continues to be an issue with browser-specific features, the JavaScript language itself is now remarkably stable and consistent across browsers and platforms.&lt;/p&gt;

&lt;p&gt;JavaScript will obviously never enjoy the performance of Java or C++, and it would be a mistake to assume otherwise. The key is to focus on what JavaScript can do that no other language or platform can. With this thought in mind, it's interesting to speculate on the role JavaScript could play in developing Web-based software for chemistry.&lt;/p&gt;

&lt;p&gt;For example, with essentially complete read-write access to the document object model (DOM) of sites on which they're active, tools based on JavaScript have great potential to enhance static content with content created either on a server or locally.&lt;/p&gt;

&lt;p&gt;As another example, consider the combination of JavaScript and an invisible Java applet. Java-JavaScript communication is possible in all browsers through &lt;a href="http://developer.mozilla.org/en/docs/LiveConnect"&gt;LiveConnect&lt;/a&gt;, which can be used to offload computation-intensive operations from JavaScript to an applet. In many ways, this approach to development on the client resembles the approach, discussed here many times, of using Java from Ruby through &lt;a href="http://depth-first.com/articles/tag/rjb"&gt;Ruby Java Bridge&lt;/a&gt; (RJB) or &lt;a href="http://depth-first.com/articles/tag/jruby"&gt;JRuby&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ultimately, JavaScript is the only programming language that allows cross-browser, client-side software to be written independently of a plugin. This may not sound like a big deal, but for many developers and organizations, Flash, Java, and other plugin technologies are &lt;a href="http://www.javaworld.com/javaworld/jw-05-2008/jw-05-applets.html?page=2"&gt;less than ideal&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;What's Known?&lt;/h4&gt;

&lt;p&gt;There are currently only scattered examples of the use of JavaScript in chemistry, an indication that either the field is ready for this idea, or that it will never work.&lt;/p&gt;

&lt;p&gt;Perhaps the two best-known examples of JavaScript applied to chemical informatics are the &lt;a href="http://depth-first.com/articles/2006/11/09/look-ma-no-applets"&gt;WebME&lt;/a&gt; and &lt;a href="http://pubchem.ncbi.nlm.nih.gov/edit/"&gt;PubChem&lt;/a&gt; chemical structure editors. Although remarkable accomplishments, both packages rely heavily on server back-ends for processing and analysis of chemical structures. The JavaScript code serves mainly to asynchronously pass low-level mouse events to the server, which then asynchronously passes a raster image back to the client. To an extent, the back and forth degrades the responsiveness of these tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blueobelisk.sourceforge.net/wiki/Main_Page"&gt;The Blue Obelisk&lt;/a&gt; maintains a Wiki page discussing some of the uses of &lt;a href="http://blueobelisk.sourceforge.net/wiki/Using_Javascript_and_Greasemonkey_for_Chemistry"&gt;Greasemonkey scripts in chemistry&lt;/a&gt;. Greasemonkey is a wonderful tool for augmenting existing Websites, and these scripts do some remarkable things, but they don't fall into the category of cross-browser, installation-free, general-purpose tools.&lt;/p&gt;

&lt;p&gt;Recently, &lt;a href="http://www.stolaf.edu/people/hansonr/"&gt;Robert Hanson&lt;/a&gt; discussed &lt;a href="http://chemapps.stolaf.edu/jmol/presentations/bcce19/hansonr-bcce19-ajax.ppt"&gt;on-demand Javascript&lt;/a&gt; as a potential tool for building chemistry-oriented Web applications. Although the proposal contains many important points, it has to my knowledge not been followed up with the release of code.&lt;/p&gt;

&lt;p&gt;An early compilation of resources can be found &lt;a href="http://www.ch.ic.ac.uk/java/"&gt;here&lt;/a&gt;, although all of the listed sites have since either disappeared or converted to other content.&lt;/p&gt;

&lt;p&gt;Poking around the Web, it's possible to find many examples of one-off chemistry tools created in JavaScript. For example, &lt;a href="http://chemistry.about.com/od/periodictables/l/bljavaperiodictable.htm"&gt;this page&lt;/a&gt; contains a JavaScript-enabled periodic table. Useful as tools like this may be, they're not general-purpose solutions designed to create a platform for further work.&lt;/p&gt;

&lt;h4&gt;What Would Be Most Valuable?&lt;/h4&gt;

&lt;p&gt;There are many cheminformatics tools that could be built in JavaScript. But to be of the greatest value, a tool should be usable in a variety of contexts. And it should serve as a platform on which more complex software can be built. Even more importantly, the tool should fix something that really is &lt;a href="http://depth-first.com/articles/tag/broken"&gt;broken&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We might begin by asking: what makes chemical information difficult to work with in the greatest number of cases?&lt;/p&gt;

&lt;p&gt;Since the earliest days of chemistry and computers, &lt;a href="http://depth-first.com/articles/2006/09/03/peculiarities-of-chemical-information"&gt;it has been clear&lt;/a&gt; that one of the distinguishing characteristics of chemical information is the central role played by chemical structures and the difficulty in accurately representing and processing them on machines.&lt;/p&gt;

&lt;p&gt;So, one answer to the question of what would be the most useful JavaScript tool for cheminformatics could be: a low-level cheminformatics toolkit that understands chemical structures and their associated graph operations.&lt;/p&gt;

&lt;p&gt;Another possibility: the handling of NMR, IR, UV, and mass spectra. &lt;a href="http://depth-first.com/articles/tag/jspecview"&gt;JSpecView&lt;/a&gt; is a good first choice, but it may be possible to build a pure JavaScript tool for interactively viewing and manipulating spectra, if a low-level toolkit for processing &lt;a href="http://old.iupac.org/standing/cpep/wp_jcamp_dx.html"&gt;JCAMP-DX&lt;/a&gt; were available.&lt;/p&gt;

&lt;p&gt;Would the performance and usability of such toolkits be high enough to make them a serious choice for use in chemistry-driven Web applications? What would the availability of such a toolkit enable that is currently difficult or impossible?&lt;/p&gt;

&lt;h4&gt;Conclusions&lt;/h4&gt;

&lt;p&gt;JavaScript is the default programming language of the Web client, offering a great deal to creators of chemically-oriented applications. One of the biggest barriers to using JavaScript for this purpose is the lack of key developer tools. Future articles will explore this idea.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/jm999uk/"&gt;johnmuk&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 15 Jul 2008 08:32:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:212652a1-9a6e-4297-800e-bc62bc301bad</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/07/15/javascript-for-cheminformatics</link>
      <category>Tools</category>
      <category>java</category>
      <category>javascript</category>
      <category>toolkit</category>
      <category>platform</category>
      <category>applet</category>
      <category>jruby</category>
      <category>rjb</category>
      <category>client</category>
    </item>
    <item>
      <title>PubChem is a Platform</title>
      <description>&lt;p&gt;&lt;img src="http://depth-first.com/demo/20070704/apple-II.jpg" align="right"&gt;&lt;/img&gt;Two recent &lt;a href="http://pubs.acs.org/journals/jcisd8/index.html"&gt;&lt;em&gt;J. Chem. Inf. Model.&lt;/em&gt;&lt;/a&gt; articles support the idea that &lt;a href="http://pubchem.ncbi.nlm.nih.gov/"&gt;PubChem&lt;/a&gt; is rapidly evolving into a Chemical Informatics platform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://dx.doi.org/10.1021/ci700092v"&gt;Large-Scale Annotation of Small-Molecule Libraries Using Public Databases&lt;/a&gt;. Using PubChem and other databases, the authors categorize the level of annotation (data, metadata, and links) of free chemical databases, with PubChem as the centerpiece. The work is part of a larger effort designed to integrate this free resource into the Novartis Research Foundation (GNF) workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://dx.doi.org/10.1021/ci6004349"&gt;Web Service Infrastructure for Chemoinformatics&lt;/a&gt;. Among other interesting initiatives, the article describes a desktop application front-end for PubChem. (As a bonus, the authors also &lt;a href="http://depth-first.com/articles/search?q=making+the+case"&gt;make the case&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Platforms are essential because they focus the attention and effort of self-interested third-parties around a common goal. They become so integrated into society that they eventually become invisible. There is outrage when they stop working. Think of highways, sewers, phone lines, communications satellites, the patent system, and the Internet, among others. We don't just use these services, we build on top of them.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.cas.org/"&gt;Chemical Abstract Service&lt;/a&gt; is an important tool for many, but it is not a platform. By placing high costs on access to its service and severely restricting its use, the ACS has effectively shut out anyone wanting to build another service on top of CAS. Clearly this was part of the plan. Small and large third-party players alike are shut out, with the inevitable chilling effect on innovation.&lt;/p&gt;

&lt;p&gt;Contrast this situation with PubChem. The public is free to &lt;a href="http://depth-first.com/articles/2006/09/29/hacking-pubchem-direct-access-with-ftp"&gt;download&lt;/a&gt; and re-use the entire database of molecules and associated data. PubChem has recently unveiled a new Web API called &lt;a href="http://depth-first.com/articles/2007/06/04/hacking-pubchem-power-user-gateway"&gt;PUG&lt;/a&gt; that will make it even easier to layer on additional functionality. These kinds of capabilities create an entirely different dynamic: witness both &lt;a href="http://emolecules.com"&gt;eMolecules&lt;/a&gt; and &lt;a href="http://chemspider.com"&gt;ChemSpider&lt;/a&gt;, two services that unashamedly exploit the PubChem resource. Expect to see more of this in the months ahead.&lt;/p&gt;

&lt;p&gt;Remember the &lt;a href="http://en.wikipedia.org/wiki/Apple_II"&gt;Apple II&lt;/a&gt;? This product became so successful that it played a major role in undermining dozens of highly profitable and well-established businesses. Why was it so successful? One of the key reasons was its open architecture, compared to what had preceded it. Within a very short time, third parties had developed a large number of innovative products that exploited the underlying platform - both with and without Apple's encouragement. One of those products, &lt;a href="http://en.wikipedia.org/wiki/VisiCalc"&gt;VisiCalc&lt;/a&gt; was so successful that at one point many buyers of Apple's machine did so for no other purpose than to run it.&lt;/p&gt;

&lt;p&gt;Whether PubChem itself ends up becoming the standard cheminformatics platform is hard to say. Perhaps this role will be filled by a system not yet built, or which evolves from PubChem. Whatever the outcome, PubChem has unmasked a deep need (and opportunity) for an open cheminformatics platform. As Apple's experience demonstrates, often you get more in the end by giving something up.&lt;/p&gt;</description>
      <pubDate>Wed, 04 Jul 2007 10:45:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:60236f1c-8b1b-4aaf-b0c4-5c0f17a563a8</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/07/04/pubchem-is-a-platform</link>
      <category>Meta</category>
      <category>pubchem</category>
      <category>cas</category>
      <category>platform</category>
      <category>open</category>
    </item>
  </channel>
</rss>
