appweb官网资料总结1

一、Getting Started:

On Windows, Appweb is managed by two programs:

1、The Appweb Manager
Windows services run in the background with little interaction with the user. So to provide more convenient access to manage Appweb.
If Appweb fails, Appman will automatically restart it.
操作方法:控制面板->管理工具->服务->Embedthis Appweb .

2、The Appweb Monitor
 runs and is accessible from the windows system tray (taskbar notification area). You can start and stop Appweb using either the manager or Monitor programs.

二、Configuring Appweb
including what ports and addresses to listen to, what modules to load, where to find the web pages and how to log requests.

2、配置方法:
1、Appweb API
2、appweb.conf:
The configuration file may include other configuration files。
Compatibility with the Apache configuration file but there are a few differences.
F:/appweb_p/appweb-6.0.0/doc/dist/users/directives.html

3、配置文件:
."#" character are comments and are ignored
.支持Include Directives,Conditional Directives。
.The configuration file is parsed in a single top-to-bottom pass. The order of directives is important as certain directives depend on others. For example, you must define the Home before using the LoadModule directive. 

4、Configuration Blocks:
Global Directives:全局目录
Route Blocks:The block is created by the Route directive.
Virtual Host Blocks:A Virtual host block defines a group of directives that apply to a virtual sub-server. A virtual server may be associated with a virtual server name or with an IP address. Virtual hosts enable you to segment the web server to serve unique content for different domains or IP addresses.

三、Web Frameworks
Appweb provides a rich set of options(four options) to use when creating web pages or web applications.

1、Embedded Server Pages:
ESP is a new web framework that provides templates, caching, Model-View-Controller paradigm, and an application and scaffold generator.

2、Action Handler
The action handler is a simple Appweb request handler that maps URIs to C functions.
The action handler is ideal for simple bindings from URI to C code.

3、PHP Framework
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.

4、Common Gateway Interface (CGI)
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. 


四、Using Loadable Modules
An Appweb loadable module is a discrete(分离) unit of functionality that may be linked into Appweb to enhance the core HTTP server. Loadable Modules may be dynamically loaded via shared libraries or DLLs


mod_cgi Common Gateway Interface (CGI) handler
mod_esp Embedded Server Pages (ESP) handler
mod_ejs Ejscript Server-Side JavaScript) module
mod_ssl     Secure Sockets Layer (SSL) module


指定模块方法:
The LoadModule directive will load a module and activate it for processing.
On Windows, this directive will load libmyModule.dll. On Linux, it will load libmyModule.so. If the module is statically linked into Appweb, the Load Module directive will not need to load it.

例:LoadModule myModule lib/libmyModule


指定搜索目录:
Appweb will look for the module in the directory specified relative to the directory defined by the Home directive. Appweb will search other directories if a LoadModulePath directive is specified. 
例:LoadModulePath "../macosx-x64-debug/bin"
 ESPAction HandlerCGI
Target UseWeb user interfaces, comms servicesSimple C functions to serve contentHave existing CGI programEnterprise web pages and forms
Memory (excluding core Appweb)200K plus app code5KExternal program20-50MB plus app code
PerformanceVery fastFastVery slowMedium speed but large memory consumption
AdvantagesEfficient and powerful frameworkSimple, fast processingStandard in wide-useLarge base of PHP code and developers
DisadvantagesNo enterprise connectivity to MySQLNo web templates or higher-level functionalitySlow. Limit to forms. Low functionalityLarge memory footprint

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值