HTML5 web apps have the advantage of cross-platform deployment – of a single set of files – on all platforms (operating systems) via web browsers. Web apps don’t have all the functionality of desktop apps and smart phone apps but they do have the main functionality we are looking for. LiveCode has cross-platform deployment on the desktop and as smart phone apps but you have to build and deploy a separate distribution for each platform. Web deployment is under development in LiveCode version 8 but our initial experiments show that loading the first app is very slow (2-3 minutes). In contrast, HTML5 web apps load very fast.
Layout of LiveCode screens (“cards”) is easy and fast. Just drag and drop both active (e.g., buttons and widgets) and graphical elements. You can easily change the appearance and locations of elements with script when the app is running – so far it seems more easily than in HTML5. For HTML5 apps, we are using the desktop tool MACAW. In that tool, you can also drag and drop elements onto a page, then generate HTML and CSS files but not nearly as easily as LiveCode.
Bottom line of initial impressions? LiveCode wins in ease of development and power. HTML5 wins in deployment – one set of files across all platforms. We are leaning to devoting our efforts for future development to HTML5, although we are going to keep an eye on LiveCode in case it dramatically speeds up its web apps.
We are pretty happy with MACAW. It definitely speeds up the process of learning CSS and laying out a web page. One very nice thing is that it generates standalone HTML and CSS files – you do NOT have to link your site to a proprietary library.
The advantage of this approach is that we can develop new apps quickly using LiveCode, which is a rapid app development tool.
This is very new technology for LiveCode and we expect much improvement in the near future. Get the free, open-source “Community” edition of LiveCode here (link).
Reactor Lab is a desktop app with Internet connectivity. Is that the best way to do things, or should we move to web apps?
A nice set of web apps has been written by Professor Anthony Butterfield at the University of Utah. Anthony did his MS in Chemical Engineering at UCSD with our faculty. Here is a LINK to his web site with web apps.
Reactor Lab was built using LiveCode. Get the free Community version at LiveCode.com. LiveCode is great because it is cross-platform: write once and deploy on many platforms. Another advantage is that the stack model and scripting language are very stable in the sense of supporting past versions: some of the script dates from 1993 and HyperCard.
In most cases in Reactor Lab, the speed of LiveCode is sufficiently fast. The most demanding lab using math computations in LiveCode script is Division 7 Biological Reactions, Lab 3 Immobilized Enzyme Profiles. In that lab, as the user moves a slider to change an input parameter, LiveCode solves a second-order, ordinary differential equation using the iterative shooting method, and then updates the graphics.
Calculations in the dynamic Catalyst Pellet are too demanding to run in LiveCode script. That lab has a detailed, elementary-step simulation of carbon monoxide oxidation over a porous solid catalyst. A function was written in C++ to do finite-difference integration of a set of partial differential equations. The external is then compiled separately on Mac and Windows to make an “external” (.bundle on Mac, .dll on Windows). The LiveCode stack calls this external to do the calculations. The advantage of an external is that it is fast. The disadvantage is that you must compile a separate executable for each platform.
When the Catalyst Pellet external was written in 2008, we used Revolution 4, where Revolution was the earlier name for LiveCode. The Catalyst Pellet and its external ran great when we finished it but it is not compatible with later versions of LiveCode. Therefore we pulled the dynamic Catalyst Pellet out into its own standalone app. The problem presumably is that the interface specification between externals and LiveCode changed. The stack and its external initially appear to run in LiveCode 7, but there appears to be a memory leak and a crash ensues. We haven’t had the time to keep the external up to date. The original version posted in the Download section works well.
The speed at which LiveCode 7 updates the card graphics appears to have slowed from previous versions. This may be related to the addition of resolution independence and higher resolution target displays. To speed things up, we lock the screen before changing many separate elements in the display, then unlock the screen when everything on the card has been updated.
An archival copy of SimzLab was added to the Download page. Reactor Lab was removed and the “on line” functions do not work in this copy of SimzLab. This copy does contain working copies of PureWaterLab, the Control Lab, and a heat exchanger simulation.
The Download page at this site was updated. The Reactor Lab app can now be downloaded from this site. Also, the dynamic Catalyst Pellet app can be downloaded. See the Screenshots & videos link for a movie showing the dynamic Catalyst Pellet in action.
We closed the SimzLab project in order to concentrate our efforts here with Reactor Lab. An archival copy of SimzLab is posted at the Download page here at the Reactor Lab site. As we get time, we will incorporate some of the PureWaterLab and Control Lab modules from SimzLab into Reactor Lab.
We closed the PureWaterLab project in order to concentrate our efforts here with Reactor Lab. PureWaterLab modules are incorporated in the archival copy of SimzLab, which can be downloaded from the Download page here at the Reactor Lab site. As we get time, we will incorporate some of the PureWaterLab modules into Reactor Lab.
The notes for CSTR thermal effects in the Resources section, CRE Notes, were revised to add CSTR dynamics.