|
||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||
![]() |
|
|
![]() |
|
|
![]() |
||||||||||||
|
|
||||||||||||||||||
NoteTaker 1.9, a free update, includes an exciting, new technology preview known as NoteTaker "plug-in" component architecture ("PCA"). NoteTaker PCA™ enables mini-apps, tools and rich interactive content to be dynamically added to notebook pages using a set of new NoteTaker-specific APIs. PCA leverages a widely-used, popular software technology in the form of Java™ applets. Developers, designers and consultants skilled in the art of Java programming can now create custom applets that can not only run inside of notebook pages but also persist and save their data and state. And most importantly, PCA allows plug-in components to interact with notebook in exciting new ways.
The AquaMinds development team, led by Michael McNabb, AquaMinds co-founder and VP of Technology, sat down recently to discuss the pending launch of NoteTaker 1.9 and what it will mean for both users and developers to now be able to extend, enhance and enrich the power of NoteTaker with custom plug-in components. Scott Love, AquaMinds co-founder and NoteTaker user/designer #1, led the discussion as transcribed here in a brief Q&A exchange: Q: Mike, congratulations to you and the team on yet another fantastic development effort. Tell us more about the NoteTaker plug-in component architecture ("PCA"). How should interested developers and designers get started? What are the key aspects of the new NoteTaker plug-in component architecture? A: NoteTaker Plug-Ins are Java applets. They are hosted directly on a notebook page, taking the entire space of a single entry. In order to use the special features such as persistence and interaction with notebook content, a set of Java objects is available to the applet which mirrors the data model of the notebook in which the applet resides. Using these objects, the applet can read data from the entire notebook, write data to the page it is on, receive notebook save and other notifications, and save and restore its current state within the notebook. Developers need only download the SDK, which contains the NTApplet jar file with the objects mentioned above, the JavaDoc API documentation, several example Xcode projects, and additional documentation. The NTApplet.jar file is always available when an applet runs in NoteTaker as a plugin, so all you have to do is compile against it, then copy your applet's jar file into the app as an attachment or place it in one of the standard folders for it to appear in the Plug-In menu. Q: Why did you choose Java™ as the target development language for NoteTaker components? A: Java was chosen for several reasons. First, it is very widely used by two of our biggest markets, education and research. There already exists thousands of utility applets in these fields which could very easily be modified to also work as NoteTaker Plug-Ins. Many scientists and researchers are self-taught Java programmers. So, there is not the learning curve that there would be if the plug-ins were, say, Cocoa bundles. Second, Java is now very well supported by Apple through its implementation of the JVM and the WebKit. Since we already use the WebKit to implement our embedded web browser functionality, it was a logical extension to use it to host our applet plug-ins. Third, I personally am extremely familiar with Java, having been a senior Java consultant since Java was introduced, and an object-oriented programmer for over 20 years. I have developed, architected, or participated in the development of many applets and applications. These include large web-based applications, real-time scientific and financial applications, graphic intensive applications, and sound and music applications. I am way past any doubts about the robustness, speed, or maturity of Java as a language, and it integrates and maps very well to parallel Cocoa architectures. Q: Persistence and state are the two biggest barriers in using applets and yet your PCA design completely eliminates these issues? Are there any security issues with the new API or do these modified applets running inside of NoteTaker obey the strict "sandbox" model of self-containment with no access? A: NoteTaker's security model is the same as a standard web browser sandbox model, with only the following differences. First, NoteTaker's own Java code is allowed to read and write from the disk in a very restricted fashion. All other Java code is not. Using the NTNotebook object or the AppletContext object persistence methods (new in Java 1.4), applets can provide or request named streams of data. NoteTaker determines where the data is stored within the notebook file package, and the applet cannot change this. In addition, applets can register to be notified whenever the notebook is saved, so applets can easily keep their saved state in sync with the notebook. Second, NoteTaker allows applets running as plug-ins to open sockets to other internet locations, for access to remote databases, as in the DBQuery example plug-in. Third, applets running as plug-ins within NoteTaker are allowed access to the system clipboard. Q: In looking at the various demo plug-in examples that ship with NoteTaker there are now a number of interesting new ways in which NoteTaker data in the form of outlines, pages and even notebook organization can be dynamically operated upon using the new API. What should developers be thinking about? Structure, data or simply applications? What's possible now you have opened it with a public API? A: There are generally four levels of plug-in "participation". First, most existing applets can be run as plug-ins without modification, especially if they are in a single class or jar file and require no additional parameters. Second, using our API, an applet can easily support persistence, so that when it is relaunched, it reappears in the same state as when the user last saved the notebook. The SketchPad demo applet is a good example of this. Third, it is easy to walk the hosting notebook's outline structure and retrieve the text data and other properties, such as category, selection state or outline level, of any entry in the book. The VisualMap demo applet illustrates this capability very well, displaying the notebook's outline structure as an exploded diagram, and the Calc applet performs simple arithmetic on numbers found in its child entries. Fourth, a plug-in can create, delete, and modify entries on the page the plug-in is on (except for its own entry of course). In this way, plug-ins can generate notebook content. For example, the DBQuery demo plug-in runs SQL queries on a MySQL database and displays each row as a new child entry, first removing any existing child entries. You can see already the wide variety of possible applications just in the variety of the demos. The bottom line is that schools, institutions, businesses, and other groups can now easily add powerful interactive capabilities to NoteTaker to support their particular needs. A NoteTaker notebook can now be not only a superb repository and organizer of information, but a kind of custom application itself. We also encourage development of commercial NoteTaker plug-ins to be marketed to our customer base. Q: How do developers ship their plug-in components? Or rather, what do users have to do in order to install and run them from the menu? A: The easiest way to distribute a NoteTaker plug-in is as a single Java jar file, with the applet class name the same as the jar file, and not requiring any special applet parameters. If the jar file is placed into one of the standard folders, e.g., ~/Library/Application Support/AquaMinds/NoteTaker/Plugins/, then it will automatically appear in our Plug-Ins menu. When the menu item is invoked, a new entry is created, the applet is added as an attachment, and then launched. Text files can also be added to the Plugins folder. These can contain a URL to a remote applet and additional applet parameters. So, if you know of a cool useful applet somewhere on the net, you can make it a plugin by creating a text file that references it and any needed applet parameters, then sticking that into your Plugins folder. E.g., create a file called CoCalc.txt in the above-mentioned folder, with this content: http://www.cohort.com/CoCalc.class Then you have the CoCalc calculator available as a NoteTaker Plug-In! All of this is well documented in the Software Development Kit documentation notebook. And as we get more feedback from Plug-In developers, we may add additional ways of running or installing plugins. Q: Are there specific classes of applets or mini-applications that you think are ideally suited for NoteTaker integration? A: Although an applet can do anything, the best NoteTaker Plug-Ins will be small simple applets which each perform a single task very well, and fill specialized needs of NoteTaker users. In this way we can continue to make NoteTaker be superb at what it does without turning it into "bloat-ware", by trying to satisfy everyone by building in all kinds of specialized functionality. There are several immediate opportunities which are of great interest to our current customers. A big one is the area of data visualization, such as the VisualMap example. The other is the area of interaction with external data sources, as illustrated by DBQuery. Both of these demos could be greatly enhanced and extended, other visual metaphors implemented, additional types of databases supported, etc. Also, I could see many more basic utilities such as spreadsheets, diagramming tools, etc. The amazing thing is that there are already a lot of these applets out there in various states. They have mostly gotten stalled because hosting them in a browser was a dead end. In NoteTaker, with persistence and and data interactivity, these lost projects could gain new life. Q: What if you want applets to be centrally served over the Internet? Is that still possible with PCA™ Is there any security issue associated with this approach? A: As mentioned earlier, a text file can be placed in one of the standard plugin folders. This text file can contain a URL to any applet locally or on the internet, and any needed additional applet parameters can be added to subsequent lines in the file. NoteTaker will simply place the contents of the file into the entry and run it as a Plug-In under the security conditions also discussed above. You can manually do the same thing by typing the URL of the applet directly into the entry and double-clicking the resulting Plug-in category icon (a coffee cup image). Q: How big is the typical memory footprint of an applet running inside of NoteTaker? A: That depends on the applet, but it is usually quite small compared to what the Java Virtual Machine itself consumes, which is quite a bit. Fortunately, OS X manages virtual memory very well, and users should notice little or no effects as long as they have a reasonable amount of RAM. Most people recommend at lease 512M of RAM for OS X itself. The same thing happens in previous releases of NoteTaker, or in Safari for that matter, if you happen to view a page with an applet in it. The memory footprint will take a leap. Perhaps Apple will improve this in future Java updates. Q: What version of the Java Virtual Machine is required? A: Applets running as Plug-Ins require Java version 1.4.2, Update 2, or higher. Users should run Software Update and make sure they have the latest version of Java. Q: What version of OS X is required to run NoteTaker 1.9 with plug-in components? A: Applets running as Plug-Ins require OS X 10.3 or higher (Panther). The Plug-ins will not launch in OS X 10.2 or earlier. Q: Are there guidelines in the SDK for UI or themes? A: We highly recommend that all applets use Swing objects for all user interface components, and use the system default (Mac OS) look-and-feel. This provides the highest level of visual integration with NoteTaker's UI and OS X, and the most efficient and reliable applet execution. Q: One of the most compelling demo examples is the DBQuery plug-in which actually runs a live query against a MySQL database running on a remote server site hosted by AquaMinds. That's pretty impressive. Can developers do this same type of query applet using a different SQL back-end system like Oracle or even FileMaker Pro? What is the requirement? A: The only requirement is the integration into the applet of a JDBC driver compatible with the target database. For example, the DBQuery example incorporates the Connector/J JDBC driver without modification. Another JDBC driver could be substituted which could connect to FileMaker, Oracle or other databases. Q: Do plug-ins have any notion of language or native OS X profiles? If I'm running OS X in German, do applets adopt the current language at start-up? A: The example applets are not localized. This was to keep them simpler and thereby enhance their value as programming examples. However, it's perfectly possible to localize java applets, and commercial applets sold as NoteTaker Plug-Ins will be expected to be localized at least for English, French, German, and Japanese, which is what NoteTaker provides currently. Q: How is printing supported by plug-ins? Can floating windows running applets be printed? A: Plug-Ins running within NoteTaker will appear on their page as they look on the screen, albeit possibly at a different width, due to the resizing of the page to the width of the printed page. Floating windows (browser views or plug-ins being shown in separate floating windows rather than in their entries) cannot be printed at this time, but this will probably be supported in a future release. Q: How easy is it to modify an existing applet running under JVM 1.4.2 to support PCA and just work with NoteTaker? A: It's very easy. The easiest is to do nothing. Just drag the class or jar file onto a page, and double-click the coffee-cup category icon. Beyond that, you first need to compile against our NTApplet.jar file which contains the Plug-In API. For persistence, register with the NTNotebook object to be notified when the users saves. When a notification arrives, provide your data, and a name for it, to the NTNotebook instance to be written into the notebook. You can then request the data by name whenever your applet is initialized in the future. To interact with the notebook contents, you can easily walk the whole notebook hierarchy as a tree of NTNotebook, NTSection, NTPage, and NTEntry objects. You can get the text contents of entries, the names of pages and sections, categories, entry levels, set URLs to be displayed elsewhere on the page, or even navigate the notebook to other pages. It's all quite simple. Q: Can you copy and paste from an applet entry to a NoteTaker page or even to another OS X application? A: Yes. Java itself already provides access to the system pasteboard. We provide in addition a way for applets to be notified when the user invokes any of the Cut, Copy, Paste, or Delete commands from NoteTaker's Edit menu while the applet has focus. Q: AquaMinds is providing source code for some of the demo examples. How or what can developers do with it? A: We strongly urge developers to study and emulate the example source code, particularly in the way the Swing GUI is created (usually as a compact toolbar), in the way persistence is implemented, and in the way interaction with notebook content is done. For example, the persistence implementation in all the demos will work even when the notebook is exported as a Web Notebook™. In other words, the last-saved data will still be available to the exported plug-in being viewed as an applet within a Web Notebook, in a standard browser. Q: Can you e-mail notebooks and their plug-ins to another NoteTaker user and still retain all the same attributes including data persistence and the applet's state? A: Yes, all saved applet persistence data is contained within the notebook in which the plugin was invoked, and travels with it. Q: If I've got a technical question or development question about the new SDK, whom or how do I get support? Is there an e-mail address developers should use? A: Support availability will be somewhat limited during this "Technology Preview" phase of the NoteTaker plug-in component architecture, in NoteTaker 1.9. However, we are very motivated to fix any problems which may come to light as developers begin to run with this new platform. We will give priority to helping third party commercial or institutional developers that are working on extending NoteTaker's usefulness to more people and groups. To help us best serve them, developers should first study the SDK documentation notebook, the JavaDoc API, and the many source code examples. If that does not suffice, they may submit questions specific to the NoteTaker Plug-In API (as opposed to general Java development) using the form available from our developer web page, and we will try to respond as soon as we can." Q: As NoteTaker is going cross-platform in 2005, will these same plug-ins work on other versions of NoteTaker running on other platforms? A: We will be providing a similar hosting mechanism in our Windows product, most likely by using Sun's Java Plug-in. We expect it to be fully compatible with applets developed for NoteTaker for OS X. Q: Any other points you want to make about the SDK and new APIs? A: Yes. All this discussion of Java applets can obscure the main point: NoteTaker is now a new and powerful platform for Java programs. It is fundamentally different from viewing applets in a browser or running them from the desktop. In NoteTaker, you start with what is already the best outlining and general information organizing tool in the world, and just easily add the final touch of highly-integrated functionality that makes it perfect for your individual or organizational needs. Notebooks pre-customized with specialized content and applets are now in fact custom applications, easily distributed among organizations, or vended by third parties. We are very interested in supporting third party java developers who wish to sell NoteTaker Plug-In components to NoteTaker users. We believe there will be a good opportunity for the kinds of plug-ins discussed above. |
September 7, 2008
Last Revised:
|
|||||||||||||||||
|
|
|
|
![]() |
|
|
| Copyright ©2008 AquaMinds, Inc. All rights reserved. | Privacy Policy Copyright notice - AquaMinds, AquaMinds NoteTaker and AquaMinds NoteShare are registered and copyrighted - 2008 - AquaMinds Software Corporation. |