To create web pages with dynamic data, you need a convenient and powerful server-side scripting environment. Using the legacy CGI protocol is slow and difficult to create great looking web pages because you cannot see the result until it is rendered. In contrast, environments such as Embedded Server Pages or PHP allow you to see what the page will look like in WSYWIG tools like Dreameweaver.
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. Embedded Server Pages (ESP)Embedded Server Pages (ESP) are a collection of technologies developed by Mbedthis to provide embeddable, standards-based dynamic web page generation. Similar in its ultimate goal to PHP, Active Server Pages (ASP) and Java Server Pages (JSP), Embedded Server Pages enables the elegant creation of web pages by embedding scripting in the HTML page to access and compute dynamic data. This allows the use of page layout tools such as Dreamweaver to create and layout the page. Embedded Server Pages was designed exclusively to be suitable for embedding in applications and devices. It provides a close binding between your application and the web page to be displayed, making it very easy to generate dynamic data. The AppWeb ESP architecture allows multiple scripting engines to be used at the same time. AppWeb is provided with server-side Embedded JavaScript which implements a subset of the ECMA-262 standard ECMAScript. Other scripting engines such as TCL, Perl or Python may also leverage this open scripting architecture in the future. Embedded Server pages has a very small memory footprint (~45K including the JavaScript) and yet offeres powerful features like:
PHPPHP 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 1-2 MB for the PHP code alone. For embedded systems, this is often too big and so we recommend using Embedded Server Pages for such systems. CGICGI 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 PHP or ESP. EGIThe Embedded Gateway Interface (EGI) was implemented by Mbedthis as an in-memory, faster replacement for CGI. It can be used to migrate and accelerate CGI programs by running them inside the AppWeb address space. However, in most cases ESP can do everything that EGI could be used for and so ESP or PHP is a better choice.Custom HandlersOccasionally, you may require total control over how the HTTP server should respond to a request. AppWeb allows you to create your own custom HTTP handler that can respond and process selective HTTP requests. This is useful if you have custom HTTP protocol extensions, proprietary authentication or authorization procedures or specific request timeout requirements.ComparisonIn summary, We recommend using ESP for embedded applications and PHP for enterprise applications. The following table summarizes the differences between the various page creation alternatives.
|
Quick Nav
ESP |