Tools for designing web based interfaces for erlang otp
1 / 13

Tools for Designing Web Based Interfaces for Erlang/OTP - PowerPoint PPT Presentation

  • Uploaded on

Tools for Designing Web Based Interfaces for Erlang/OTP. Martin Gustafsson. Program. Why Web Based User Interfaces. httpd the Webserver in Erlang/OTP. How to use and develop with WebTool. Best Desing of Web Based Tools, with Erlang/OTP. Why Web Based User Interfaces. Easy for the user.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Tools for Designing Web Based Interfaces for Erlang/OTP' - noel-solis

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript


  • Why Web Based User Interfaces.

  • httpd the Webserver in Erlang/OTP.

  • How to use and develop with WebTool.

  • Best Desing of Web Based Tools, with Erlang/OTP.

Why web based user interfaces
Why Web Based User Interfaces

  • Easy for the user.

  • Fast development,

    • Easy to Learn.

    • Fast Development.

  • The tool can be used from the network.

  • Easy to generate printable reports.

Problems with web based user interfaces
Problems with Web based User Interfaces

  • Takes little more time to start than command-line tools.

  • Interaction with the files system.

  • Browser incompabilities.

  • Security is problem,

    • Functionality that can stop the Erlang node.

    • Data transfer between server and client is not secure.

Httpd the webserver in erlang otp
httpd -The Webserver in Erlang/OTP

  • Support for Basic User Authentication.

  • Support for SSL.

  • Support for creation of Dynamic Web Pages.

  • httpd is a Apache styled Webserver.

The functionality of httpd
The functionality of httpd







Creation of dynamic web pages
Creation of dynamic Web Pages

  • CGI

  • Eval Scheme

    • Ex: http://server:port/EvalSchemAlias/mod:func(AnyArg)

  • Erl Scheme

    Ex: http://server:port/ErlSchemeAlias/mod/func

    The Webserver will return the result of calling



index(Env,Input) ->





Env, http_user_agent,other), case

mod_browser:getBrowser(Ag) of

{{msie,_},_} ->


{{netscape,_},_} ->



menu(nav) ->

“<LAYER NAME=\”popup\” VISIBILITY=\”hidden\”>



<A HREF=./start>

Start tool







Starting webtool
Starting WebTool

  • Create a *.tool file for each tool and save it in the directory MyTool-vsn/priv/FileName.tool

    • Ex: {version,1.2},[{config_func,{webappmon,configData,[]}}]

  • Start WebTool.

    • Ex: webtool:start().webtool:start(Path,Port).

  • Point a browser to http://HostName:Port/

Callback function for WebTool

  • WebTool use the callback function to receive configuration data for the tool.

  • Configuration data is needed for:

    • Creating links from WebTool to the tool.

    • Configuration of the Webserver.

    • Data about how to start and stop the tool.

Developing tools to be used via webtool
Developing tools to be used via WebTool

  • The tools must export a callback function that returns the configuration data needed by WebTool.

    • Example:configData()-> Application=my_app RealPath=code:priv_dir(Application), {mytool,[{web_data,{“URL”,”Linktext”}}, {alias,{erl_alias,”VPath”,[“Module”]}}, {alias,{“VirtualPath2”,RealPath}}, {start{{Mod,Func,Arg},{Mod,Func,Arg}}}]}.

Design principles for web based tools
Design principles for Web based Tools

  • A N-layered solution has many advantages

    • Easier to update the code

    • If well designed the logic module might be possible to use as a command-line version.


Module that

generates the

User Interface

logic Module