Web UI Components
This page should give an overview over the different parts of the Web UI and their function.
luci-web: Web Framework
luci-web is the LuCI web framework which follows a MVC-like pattern. It is coroutine-safe and itself consists of several modules.
luci.dispatcher
This the MVC-style dispatcher which collects dispatching information from controllers and handles client requests by invoking the appropriate controller. It is also responsible for ensuring the proper interaction of all luci-web modules.
luci.http
LuCI HTTP abstracts HTTP-Specific commands for use in the framework. It forms the connector between framework and the underlying Server Gateway Interfaces. luci.http uses the LuCI HTTP-Protocol stack and offers environment and content decoding and parsing facilities and is used to fetch headers and content from client requests and prepares the content produced by LuCI to be transmitted.
luci.i18n
This modules offers internationalization functions supporting caching, multiple language handling and independent translation tables.
luci.sauth
The Session authentication provides a session-cookie based authentication facility with pre-defined session validity times.
luci.template
luci.templating is a compiling template engine consisting of a regex based parser, a memory and/or file-based cache, and a dynamic object builder. This engine converts text-based template files with special markups into Lua-objects offering a fast and reliable templating method. Compiled templates are safed as Lua bytecode and each template can be invoked with different object scopes.
luci-sgi
The Server Gateway Interfaces connect the web framework to a variety of web servers:
- sgi-cgi: The native CGI connector for CGI/1.1 compliant webservers
sgi-wsapi: A binding to the Lua WSAPI offering CGI, FastCGI and Xavante connectors
- sgi-luci: A handler for the native luci-httpd non-forking HTTP-Daemon
- sgi-webuci: A bnding to the OpenWRT boa/webuci application-server
luci-cbi (optional)
The Configuration Binding Interface connects the OpenWRT UCI engine to the web framework. It uses so-called CBI-Models that describe the transistion of UCI-schemes to XHTML-Forms. The CBI itself handles form creation, input validation, loading and saving of the configuration data.