<commit_before>h2. BeepBeep a simple web application for Erlang

BeepBeep is a simple Web Application framework for Erlang inspired by Rails and Merb. It follows the 
principle of convention over configuration - meaning if you follow the code structure layout and a few
rules when building your app, it'll require no extra work on you behalf to map Url requests to your 
Controllers and Views.

BeepBeep is built on "MochiWeb":http://code.google.com/p/mochiweb/ and "ErlyDTL":http://code.google.com/p/erlydtl,
providing a super fast web server and the abiity to define your templates with the Django template language.

h3. Features
	
 * A script to generate a new web application (based on mochiweb's approach)
 * Session Server to store your application state
 * Before filter on your controllers for things like authentication 
 * Django templates for the view

h3. Getting Started

 # download the code
 # CD into the beepbeep directory
 # run make
 # generate a new web application by running  ./script/new_beep.erl YouAppName "DestinationDirectory

This will create a web app with everything you need. It includes a Sample controller (main_controller.erl).
To run the sample:
 * Cd into the new application's directory you created above and start the server: ./start-server.sh
 * Open a browser and visit "http://localhost:8000

h3. How it works:

You write a controller similar to how you'd write a "gen_server" based app, but in our
case you use the included "gen_controller" behavior. In the controller you define the functions
you want to expose to requests.  BeepBeep will automatically map Url requests to controller and
functions (or actions). For example a request to "/hello/show" would map to the "hello_controller" 
and invoke the "show" function. 

Here's a controller example:

<pre>
 <code>
%% hello_controller.erl
-module(hello_controller).

-export([index/1]).
-export([handle_request/2, before_filter/1]).

-behaviour(gen_controller).
-include("beepbeep.hrl").

show(Params) ->
    gen_controller:call(?MODULE,index,Params).

%% Callback for show
handle_request(show,Params) ->
    Data = [{name,"BeepBeep"}],
    {render, "hello/show.html",[{data,Data}],Params}.


%% Callback filter hook
before_filter(Params) ->
    {ok}.

 </code>
</pre>

From "handle_request" we return a tuple that tells the framework what template to use. Templates<commit_msg>more changes README.textile<commit_after>h2. BeepBeep a simple web application for Erlang

BeepBeep is a simple Web Application framework for Erlang inspired by Rails and Merb. It follows the 
principle of convention over configuration - meaning if you follow the code structure layout and a few
rules when building your app, it'll require no extra work on you behalf to map Url requests to your 
Controllers and Views.

BeepBeep is built on "MochiWeb":http://code.google.com/p/mochiweb/ and "ErlyDTL":http://code.google.com/p/erlydtl,
providing a super fast web server and the abiity to define your templates with the Django template language.

h3. Features
	
 * A script to generate a new web application (based on mochiweb's approach)
 * Session Server to store your application state
 * Before filter on your controllers for things like authentication 
 * Django templates for the view

h3. Getting Started

 # download the code
 # CD into the beepbeep directory
 # run make
 # generate a new web application by running  ./script/new_beep.erl YouAppName "DestinationDirectory

This will create a web app with everything you need. It includes a Sample controller (main_controller.erl).
To run the sample:
 * Cd into the new application's directory you created above and start the server: ./start-server.sh
 * Open a browser and visit "http://localhost:8000

h3. How it works:

You write a controller similar to how you'd write a "gen_server" based app, but in our
case you use the included "gen_controller" behavior. In the controller you define the functions
you want to expose to requests.  BeepBeep will automatically map Url requests to controller and
functions (or actions). For example a request to "/hello/show" would map to the "hello_controller" 
and invoke the "show" function. 

Here's a controller example:

<pre>
 <code>
%% hello_controller.erl
-module(hello_controller).

-export([show/1]).
-export([handle_request/2, before_filter/1]).

-behaviour(gen_controller).
-include("beepbeep.hrl").

show(Params) ->
    gen_controller:call(?MODULE,index,Params).

%% Callback for show
handle_request(show,Params) ->
    Data = [{name,"BeepBeep"}],
    {render, "hello/show.html",[{data,Data}],Params}.


%% Callback filter hook
before_filter(Params) ->
    {ok}.

 </code>
</pre>

From "handle_request" we return a tuple that tells the framework what template to use. Templates
{'fraction_non_alphanumeric': 0.08044528460407477, 'fraction_numerical': 0.004620877966813695, 'mean_word_length': 4.42369020501139, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6149055', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1320, 'n_words': 599}