InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Lively Kernel: How Web Programming Should Have Been Done From the Beginning?

Posted by Alexander Olaru on Feb 18, 2008

Sections
Development
Topics
Java ,
Javascript ,
Web Frameworks

Started as an experiment at Sun Labs, Lively Kernel aims at bringing the same kind of simplicity, generality and flexibility to web programming that we have known in desktop programming for thirty years and leverages the dynamic aspects of JavaScript to make it possible to create, modify and deploy applications on the fly, using tools built into the system itself.

In a Contrarian Minds article, the project lead Dan Ingalls, provides some background on how the project got started and expresses his views about the beginnings of web programming:

When people decided to do the Web, they started with a text markup language. This was a big step backwards. HTML took off because it had links. It took off and all of a sudden, that's the Web. The truth is there was plenty of computer science and graphical know-how to do that with text and graphics on nearly any computer, but the people doing the Web weren't into that frame of mind.

With time, people started to want more and things got more complex:

So you get a document object model on top, stylesheets added on top of that, and then JavaScript added on top of that to try and get some dynamic behavior -- and it all could have been done much simpler with just a dynamic language and a decent graphics model. It seemed to us that if you began with a dynamic language and structured graphics, like desktop systems of the 1980s, then even Web-based applications could be just as lively and interactive as the best desktop software.

From this, stems a key difference between Lively Kernel and other systems in the same area: the project's focus on uniformity. In contrast with many current client web frameworks that utilize a diverse array of technologies such as HTML, CSS, DOM, JavaScript and XML, Lively Kernel's goal is to build a platform using a minimum number of underlying technologies. Specifically, the chosen underlying technology was JavaScript due to its ubiquitous availability in web browsers and syntactic similarity to other popular languages such as C++ and Java. Thus, according to Ingalls, Lively Kernel provides a new option:

Everything you need is in the browser. There is a dynamic language there. It may not be your favorite, but it's not a bad one either. There is also a graphics system. Not the best, but pretty nice. Hook it all up with a simple user interface and you're having fun the way people should have fun with computing. I don't mean just fun for entertainment, but it's creatively inspiring. It makes you want to do cool stuff.

Lively Kernel's main features include:

  • Programmatic access to the user interface from JavaScript via the Morphic user interface framework. The user interface is built around an event-based programming model familiar to most browsers.
  • Small web programming environment and computing kernel allowing the platform to also function as an integrated development environment (IDE) and making the whole system self-contained and able to improve and extend itself on the fly.
  • Asynchronous networking through the use of asynchronous HTTP, similar to AJAX.

A foundational component of Lively Kernel, Morphic is a user interface framework that supports composable graphical objects, along with the machinery required to display and animate these objects, handle user inputs, and manage underlying system resources such as displays, fonts and color maps. Morphic was originally built in the Self programming system and later incorporated into the Squeak Smalltalk environment.

For the low level access to the browser's graphics engine, Lively Kernel relies upon the Scalable Vector Graphics (SVG) graphics language. SVG is a W3C specification supported by most browsers and its functionality can be accessed through HTML-like declarative syntax as well as programmatically from JavaScript. Internet Explorer implements graphics capabilities through the Vector Markup Language (VML) and as such Lively Kernel does not work with it yet, while Safari provides the best performance and experience with Lively Kernel applications.

As described in the project's FAQ page, the name "Kernel" was selected because the system:

  • Is still reasonably small - less than ten thousand lines of JavaScript code
  • Is intended to be self-contained and extensible - the system capabilities can be enhanced using only the system itself
  • Exhibits various operating system like qualities - such as the ability to run multiple applications simultaneously

The Lively Kernel does not require any installation or plug-ins and as soon as a link is clicked to start the system, all the Lively Kernel code is loaded into the browser and running. The source code is open sourced through a GPL license and is available for download. A disclaimer on the project's website specifies that Lively Kernel is still "an experiment and a research environment in its early stages, and at this point it is probably more appropriate for students, computing enthusiasts and even children than for, e.g., commercial web site designers."

Requiring the newer implemented SVG support in the browser, Lively Kernel would probably not have been able to deliver us in the past from some of the complexities of web programming but it is however an early promise to bring some technology consolidation and possible ease of use for web programmers. "Enter the Lively Kernel", take the Interactive Tutorial or find more information about the project here.

13 comments

Watch Thread Reply

To the question in the headline by Jim Leonardo Posted
Good idea but... it's too late! by Alexandre de Pellegrin Posted
Too late, too wrong by Robert Sayfullin Posted
Say it with me by Nicholas Piasecki Posted
Re: Say it with me by Rick Graham Posted
The purpose of WEB (a.k.a The Internet) by Farrukh Shahzad Posted
Slow like hell or Squeak? by Steven Devijver Posted
Re: Slow like hell or Squeak? by Alexander Olaru Posted
No IE support = No future by Steve Macdonald Posted
Re: No IE support = No future by Geoffrey Wiseman Posted
Great, more Javascript by Marc Stock Posted
A place for everything. by Rick Graham Posted
Cool idea... by Robin Clowers Posted
  1. Back to top

    To the question in the headline

    by Jim Leonardo

    I think its a qualified "YES".
    Qualified because I haven't looked at their stuff, but clearly, what we're doing with the web now is entirely unsuited to HTML. When we got started with HTML, it was quick and easy to set up a web site. Now, a website is a much bigger effort than an equivalent traditional client server app in many respects.

  2. Back to top

    Good idea but... it's too late!

    by Alexandre de Pellegrin

    OK, OK... Web programming is a headache. But, what's the solution? Building another abstraction layer using poor foundations? I don't think so This solution tries to produce something easier over something hard. Working with SVG, hiding javascript complexity. No, no, no. It's too late for me.
    So, what should we do? Let's think about web philosophy. What's really good with the web? It's mainly its ability to access to informations over a network. The problem is that the web has merged informations and how to display informations in a stack of technologies where newers are always fixing olders. I think that there's no solution with actual browsers. The only solution will probably be in the next generation of web (web 4.0?), when browsers would be replaced by a new generation of display software.

  3. Back to top

    Too late, too wrong

    by Robert Sayfullin

    Absolutely impressive(look at skewed widgets) and absolutely useless. If it comes to web X.0 development we already got tools that way more convenient and proven than Lively.

  4. Back to top

    Say it with me

    by Nicholas Piasecki

    "The browser is not an operating system. The browser is not an operating system."

  5. Back to top

    The purpose of WEB (a.k.a The Internet)

    by Farrukh Shahzad

    I think, Web was not created for chesky pesky graphics and presentation designs, It was based on the concept of exchanging information with peers and others far away.

    So a text based language like HTML was the only best friend at the early era for users to write their knowledge (information) for the web.

    What would it be like (Web now a days) If a web user has to learn C/C++ language to create a webpage :D then world would be full of C/C++ programmers :)

  6. Back to top

    Slow like hell or Squeak?

    by Steven Devijver

    Was the web always supposed to be slow like hell? Or like Squeak?

  7. Back to top

    No IE support = No future

    by Steve Macdonald

    People who think that they can ignore or downplay IE support are simply doomed to fail. Sorry, but I've seen it too many times to count. Most people use IE, and that won't change any time soon.

    You people need to spend an afternoon with an MBA.

  8. Back to top

    Re: Slow like hell or Squeak?

    by Alexander Olaru

    I’ve tried to refer to the "experimental" nature of the project in 3 different places...

    I would not get hang up too much at this point on the performance or the prettiness and I would focus more on the idea.

    The project's website lists the supported browsers and their versions and acknowledges which run the Lively Kernel apps better or not.

  9. Back to top

    Great, more Javascript

    by Marc Stock

    Tell you what, when your technology isn't based on Javascript, give me a ring. Otherwise, I'd just assume stick with the same old crap we have now.

  10. Back to top

    Re: No IE support = No future

    by Geoffrey Wiseman

    You people need to spend an afternoon with an MBA.


    Is that the punishment for failing to support IE?

  11. Back to top

    Re: Say it with me

    by Rick Graham

    No, the browser is not an operating system.

    The browser is a presentation layer. Go look up your network models and see how it fits in from that point of view.

  12. Back to top

    A place for everything.

    by Rick Graham

    The reason the web took off is because HTML is easy. That's not going to change. HTML is still easy, and it will remain easy. At least for simple things.

    The concept of using a browser for a presentation layer with a server back end has been around since the advent of CGI. None of this is new, and we've been doing it for a long time.

    We're putting a nicer face on it now with technologies like SVG. And we've made it work a little smoother with things httprequest, but the web will remain popular for it's ease of publishing. It's just growing is all.

    There is no magic in the Lively Kernel, anyone who can grasp geometry and JavaScript can do all of that stuff.

  13. Back to top

    Cool idea...

    by Robin Clowers

    But I don't think this is what web programming should have looked like from the beginning. One of the reasons the web has become so successful is the simplicity of the technologies behind it, which allowed browsers to be fast even on slow hardware. Lively Kernel (or any similar technology) would have been so slow on 10 year old hardware that no one would have been used it.

    That being said, I think it is a very intriguing idea. Now that hardware is fast enough, it makes a lot of sense to use the browser more like a thin client rather than a simple rendering engine.

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.