Erlang  Web 
Scalable & Reliable web framework 
 

ErlLounge,  Kraków

Lipiec  2009 

(wersja  rozszerzona dla czytelników  off-line;))

Dziś 

Dlaczego? 

Kto? 
 
 

Jak  to działa? 

OUT 

IN

OUT 

 

 {rodzaj, URL pattern, {moduł, funkcja}}.

  {dynamic, "^/index.html$", {main, home}}.

  {dynamic, delegate, "^/user", "config/dispatcher/user.conf"}.

  {static, "^/about$", "about.html"}.

  {static, "^style.css$", enoent}. 

OUT 

OUT 

IN 

IN 

Annotations 

Annotations 

-module(my_utils).

-export([logme/4]).

-include_lib("eptic/include/e_annotation.hrl"). 

?BEFORE.

logme(AnnArgs, Mod, Fun, ControllerArgs) ->

    io:format("~s~n", [AnnArgs]),

    {proceed, ControllerArgs}. 

-module(controller).

-export([my_fun/0]).

[…] 

?LOGME("Calling my_fun").

my_fun() ->

    wpart:fget("post", "id"),

    […]

Budowanie  formularzy 

Formularze 

 

  article.hrl 

-record(article, {

           id,

           text,

           hide

          }). 

-record(article_types, {

templates/article.html 

<wpart:form type="article"

    action="/article/create" />

Caching 

   {dynamic, "^/blog/list", {blog, list}, [{cache, persistent]}.

   {static, "^/faq$", "doc/faq.html", [{cache, normal}]}.

<wpart:cache id="left_menu"  groups="menus" type="persistent">

   SOME CONTENT

</wpart:cache>

Cache  - Invalidacja 

 

?INVALIDATE(["^/blog/list"]).

update_blog() ->

    [update your database here...] 

    {template, "blog.html"}. 
 
 

?INVALIDATE_GROUPS(["menus"]).

update_menu() ->

    [update your database here...] 

    {template, "blog.html"}. 

Distribution 

Stress  testing 

Stress  testing 

 

Plugins 

Przykłady 

Przykłady 

Przykłady 

Przykłady 

Przykłady 

Zasoby 
 

 
 

Pytania

Więcej  -> 
http://www.erlang-web.org
 
 

Dziękuję