RAD Studio
ContentsIndex
PreviousUpNext
About Web Broker and WebSnap

Part of the function of any application is to make data accessible to the user. In a standard application you accomplish this by creating traditional front end elements, like dialogs and scrolling windows. Developers can specify the exact layout of these objects using familiar form design tools. Web server applications must be designed differently, however. All information passed to users must be in the form of HTML pages which are transferred through HTTP. Pages are generally interpreted on the client machine by a Web browser application, which displays the pages in a form appropriate for the user's particular system in its present state. 

The first step in building a Web server application is choosing which architecture you want to use, Web Broker or WebSnap. Both approaches provide many of the same features, including

  • Support for CGI and Apache DSO Web server application types. These are described in Types of Web Server Applications.
  • Multithreading support so that incoming client requests are handled on separate threads.
  • Caching of Web modules for quicker responses.
Both the Web Broker and WebSnap components handle all of the mechanics of page transfer. WebSnap uses Web Broker as its foundation, so it incorporates all of the functionality of Web Broker's architecture. WebSnap offers a much more powerful set of tools for generating pages, however. Also, WebSnap applications allow you to use server-side scripting to help generate pages at runtime. Web Broker does not have this scripting capability. The tools offered in Web Broker are not nearly as complete as those in WebSnap, and are much less intuitive. If you are developing a new Web server application, WebSnap is probably a better choice of architecture than Web Broker. 

The major differences between these two approaches are outlined in the following table:  

Web Broker versus WebSnap  

Web Broker 
WebSnap 
Backward compatible  
Although WebSnap applications can use any Web Broker components that produce content, the Web modules and dispatcher that contain these are new.  
Only one Web module allowed in an application.  
Multiple Web modules can partition the application into units, allowing multiple developers to work on the same project with fewer conflicts.  
Only one Web dispatcher allowed in the application.  
Multiple, special-purpose dispatchers handle different types of requests.  
Specialized components for creating content include page producers, InternetExpress components, and Web Services components.  
Supports all the content producers that can appear in Web Broker applications, plus many others designed to let you quickly build complex data-driven Web pages.  
No scripting support.  
Support for server-side scripting allows HTML generation logic to be separated from the business logic.  
No built-in support for named pages.  
Named pages can be automatically retrieved by a page dispatcher and addressed from server-side scripts.  
No session support.  
Sessions store information about an end user that is needed for a short period of time. This can be used for such tasks as login/logout support.  
Every request must be explicitly handled, using either an action item or an auto-dispatching component.  
Dispatch components automatically respond to a variety of requests.  
Only a few specialized components provide previews of the content they produce. Most development is not visual.  
WebSnaplets you build Web pages more visually and view the results at design time. Previews are available for all components.  

For more information on Web Broker, see Using Web Broker. For more information on WebSnap, see Creating Web Server Applications Using WebSnap.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!