Home > Users Guide > Web Frameworks

Quick Nav

See Also

Web Frameworks

Dynamic web page creation needs a convenient and powerful server-side scripting environment. It is slow and difficult to create a functional and appealing dynamic web application using the legacy CGI protocol. Its interface is too low level and it provides little assistance to manipulate server-side data, render UI elements, and manage Ajax interactions.

In contrast, environments such as ESP, Ejscript, or PHP provide much more support for dynamic web content.

Appweb provides a rich set of options to use when creating web pages or web applications. This document compares the alternatives and suggests where each option is best deployed.

Comparison

Embedded Server Pages

ESP is a new web framework that provides templates, caching, Model-View-Controller paradigm, and a set of web controls that are pre-integrated with jQuery. ESP uses "C" language code embedded in web pages for native-speed execution. It is fast, compact and uses "C". For more information, please read Using ESP.

Ejscript

The Ejscript Web Framework is a web application environment that uses server-side JavaScript. It provides an application generator, templating engine, a powerful Model/View/Controller framework, and a library of Ajax view controls. JavaScript is an expressive language, and so Ejscript web apps often need very few lines of code to implement.

Ejscript is not as small as ESP, nor as fast, but is is a very powerful web framework. It is good for embedded web interfaces and async communications services where sufficient memory is available. For more information, please read Using Ejscript.

PHP

PHP is a widely-used general-purpose scripting language that is especially suited for enterprise Web development. It provides an object-oriented programming language, numerous extensions and a broad developer community. The power of PHP comes at a price, it typically has a memory footprint of more than 5 MB for the PHP code alone. For embedded systems, this is often too big and so we recommend using ESP instead for such systems. For more information, please read Using PHP.

CGI

CGI stands for the Common Gateway Interface and it is the legacy extension interface for running external programs to generate dynamic data. It is standard but slow. Unless you have legacy CGI programs or need to run a scripting language via CGI, you are better served by using either ESP or Ejscript. For more information, please read Using CGI.

Summary

For embedded devices and applications: we recommend using ESP. It provides the fastest, most compact web framework without compromising on functionality. Use Ejscript for large applications that have more memory available for execution.

The following table may help summarize the differences:

CGI ESP Ejscript PHP
Target Use Have existing CGI program Web user interfaces, comms services Dynamic embedded web pages and forms Enterprise web pages and forms
Memory (excluding core Appweb) External program 200K plus form code 1MB plus app code 5-20MB plus app code
Performance Slow Fastest Fast page and form processing Medium speed but large memory consumption
Advantages Standard in wide-use Simple fast forms processing Fast, compact and flexible Large base of PHP code and developers
Disadvantages Slow. Limit to forms. Can't design page WYSIWYG Limit to forms. Can't design page WYSIWYG Open source, but still specific to Appweb Large memory footprint

© Embedthis Software LLC, 2003-2012. All rights reserved. Embedthis, ESP, Ejscript and Appweb are trademarks of Embedthis Software LLC.