The Lively Kernel is an
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
web programming environment, developed by
Dan Ingalls
Daniel Henry Holmes Ingalls Jr. (born 1944) is a pioneer of object-oriented computer programming and the principal architect, designer and implementer of five generations of Smalltalk environments. He designed the bytecoded virtual machine that m ...
when he was at
SAP
Sap is a fluid transported in the xylem cells (vessel elements or tracheids) or phloem sieve tube elements of a plant. These cells transport water and nutrients throughout the plant.
Sap is distinct from latex, resin, or cell sap; it is a s ...
Research. It supports desktop-style applications with rich graphics and direct manipulation abilities, but without the installation or upgrade troubles of conventional desktop applications. Development began at
Sun Microsystems
Sun Microsystems, Inc., often known as Sun for short, was an American technology company that existed from 1982 to 2010 which developed and sold computers, computer components, software, and information technology services. Sun contributed sig ...
Laboratories in
Menlo Park, California
Menlo Park ( ) is a city at the eastern edge of San Mateo County, California, San Mateo County in the San Francisco Bay Area of California, United States. It is bordered by San Francisco Bay on the north and east; East Palo Alto, California, Eas ...
, and later moved to the
Hasso Plattner Institute in
Potsdam-Babelsberg
Babelsberg () is the largest quarter (urban subdivision), quarter of Potsdam, the capital city of the Germany, German state of Brandenburg. The neighbourhood is named after a small hill on the Havel river. It is the location of Babelsberg Palace an ...
near Berlin.
Overview
The Lively Kernel is a graphical composition and integrated programming environment written fully in the
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
using standard browser graphics (W3C Canvas or SVG). It is thus accessible to any browser as a web page, and it begins operating as soon as the web page is loaded. It is able to edit its own code and graphics, and through its built-in WebDAV support, it can save its results or even clone itself onto new web pages. Along with its application development abilities, it can also function as its own integrated development environment (IDE), making the whole system self-sufficient with no tools except a browser.
Shapes, widgets, windows, IDE all on a Web page
The Lively Kernel uses a
Morphic graphics model to add behavior to a
scene graph
A scene graph is a general data structure commonly used by vector-based graphics editing applications and modern computer games, which arranges the logical and often spatial representation of a graphical scene. It is a collection of nodes in a g ...
built from browser graphics. Simple graphics are thus assembled into such standard
graphical widget
A graphical widget (also graphical control element or control) in a graphical user interface is an element of interaction, such as a button or a scroll bar. Controls are software components that a computer user interacts with through direct m ...
s as
sliders,
scrollbar
A scrollbar is an interaction technique or widget (GUI), widget in which continuous text, pictures, or any other content can be Scrolling, scrolled in a predetermined direction (up, down, left, or right) on a computer display, window (computing) ...
s, text views, lists and
clipping
Clipping may refer to:
Words
* Clipping (morphology), the formation of a new word by shortening it, e.g. "ad" from "advertisement"
* Clipping (phonetics), shortening the articulation of a speech sound, usually a vowel
* Clipping (publications ...
frames. A simple
windowing system built from these widgets offers object inspectors,
file manager
A file manager or file browser is a computer program that provides a user interface to manage computer files, files and folder (computing), folders. The most common Computer file#Operations, operations performed on files or groups of files incl ...
s (browsers) and
code browser
A code browser is an editor, sometimes with folding or other advanced layout capabilities, designed to structure source code or, by extension, other kinds of text file. Since it is typically aware of the syntax (and, to some extent, the semantics) ...
s. Even the rudimentary demo pages thus have the ability to edit and test new code in a simple code browser while the system is running.
Lively has been used to build simple web sites, including its own tutorial, and also a client-side
Wiki
A wiki ( ) is a form of hypertext publication on the internet which is collaboratively edited and managed by its audience directly through a web browser. A typical wiki contains multiple pages that can either be edited by the public or l ...
system that stores its pages in a versioned repository. Content can vary from relatively static pages of text to fully dynamic models that look and behave like
Adobe Flash
Adobe Flash (formerly Macromedia Flash and FutureSplash) is a mostly discontinuedAlthough it is discontinued by Adobe Inc., for the Chinese market it is developed by Zhongcheng and for the international enterprise market it is developed by Ha ...
simulations. The Lively Kernel achieves complex dynamic behavior without any specific animation support (it does not use the animation features of SVG), but by simple scheduling of multiple
green thread
In computer programming, a green thread is a thread that is scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system (OS). Green threads emulate multithreaded environments without relying on a ...
processes in JavaScript.
Text and transformations
The Lively Kernel includes its own multifont text editor written in JavaScript. It includes support for centering, justification and similar rudimentary text composition abilities. Working in Lively thus has much the same feel as working in a web page design program, except that the on-the-fly text layout is not being done in an offline composition program, but it is the built-in dynamic behavior of text in the Lively Kernel.
The liveliness of Lively graphics becomes even more apparent when manipulating the scale and rotation handles for objects and text. The whole code browser can be used when tilted 20 degrees on its side. Because the text editor is made up entirely of lively graphics, it works correctly even if rotated or scaled, as do the scroll bars, clipping frames, and the rest of the entire
user interface
In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine fro ...
.
Cross-browser compatibility
The Lively Kernel depends on browser support for JavaScript and SVG or Canvas graphics, all now part of the W3C standards. As of 2009, this means that it runs in Safari, Firefox, Chrome and Opera browsers.
While this requirement might seem less compatible than HTML, Lively is actually more compatible across the browsers on which it runs than is HTML. This is because there is more uniformity among JavaScript, SVG and Canvas implementations than there is from one HTML implementation to another. Except for one small initial file, the Lively Kernel code base is entirely free of tests for which client browser is being used.
As of 2011, Lively Kernel runs best in
WebKit
WebKit is a browser engine primarily used in Apple's Safari web browser, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles starting with the PS3, the Tizen mobile operating systems, the Amazon K ...
-based browsers such as
Safari
A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
for Macintosh, or
Chromium
Chromium is a chemical element; it has Symbol (chemistry), symbol Cr and atomic number 24. It is the first element in Group 6 element, group 6. It is a steely-grey, Luster (mineralogy), lustrous, hard, and brittle transition metal.
Chromium ...
or
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
for Windows. Running in Internet Explorer (Windows) requires
Google Chrome Frame. Testing in all popular browsers is planned for the next release.
Integrated development environment
Lively includes an integrated development environment of considerable power, designed to work via
WebDAV
WebDAV (Web Distributed Authoring and Versioning) is a set of extensions to the Hypertext Transfer Protocol (HTTP), which allows user agents to collaboratively author contents ''directly'' in an HTTP web server by providing facilities for conc ...
with a local set of a dozen or so source JavaScript files synchronizable with a versioned repository. If the user opens a SystemBrowser, all the JavaScript source files are listed in the file pane of the browser. If the user clicks on one of these files, it will be read, parsed (by an OMeta JavaScript parser) and displayed similar to a
Smalltalk
Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
browser with functions or class definitions listed and, for each class, all the method names are shown. The user can click on a method name, edit its code in the bottom pane, and then save the new definition. The new definition will be checked for syntax and, if correct, it will be stored back in the .JS file. Moreover, if in "eval mode" (the usual case), the method will be redefined in the system that is running. This allows non-critical changes to be made without any need to restart Lively or any of the applications being developed. When all the source files are loaded, a rapid scan will find every reference to a selected text, and present all the code bodies that match in a separate sub-browser.
The Lively IDE includes object inspectors and morph style panels for controlling fills, borders, and text styles. There are also facilities for debugging at error points and profiling for performance tuning, but these have not been pushed, owing to the improving quality of such run-time support in all the major browsers.
Lively Wiki
The IDE operates on its source code files in a versioned repository to manage evolution of the Lively code base. The same approach has been used to empower users with control over active web content in the form of a client-side Wiki. Because Lively includes facilities to edit the content in its worlds (scene graphs and other content), and to store that content as web pages, a WebDAV connection allows Lively to store new versions of its page content while it is being incrementally developed. As each new version is saved, it is viewable from the rest of the Internet and prior versions can be retrieved in cases of error or change of mind. It is notable that this Wiki style of evolving web content extends to all the textual, graphical, and scripting content in Lively, as well as to any new forms that may be defined, yet without any need for a Wiki server of any kind. All that is required is a server providing a HTTP WebDAV interface. Increasing amounts of the Lively Project content is now maintained in this manner.
Lively for Qt
Lively for
Qt is another implementation of Lively Kernel in which the ''kernel'' parts in JavaScript are replaced by functions from the Qt framework in
C++.
Lively for Qt inherits most of the basic functionality (such as the implementation of widgets, layout management, core event handling and core JavaScript support) from Qt. Lively for Qt retains the exceptionally interactive nature (the "liveliness") of the Lively Kernel, e.g., by allowing the user interface and application source code to be edited on the fly. However, in Lively for Qt the development work is performed using the familiar, well-documented ''application programming interfaces'' (
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
s) of the Qt platform.
Example code
// ClockMorph: A simple analog clock
Morph.subclass(“ClockMorph”, );
References
External links
*
{{Rich web applications
JavaScript
JavaScript libraries
Rich web application frameworks
Software using the MIT license
Web frameworks
Ajax (programming)
Articles with example JavaScript code