<commit_before># Frankie
Sinatra's little brother.

- [TOP](#frankie)
- [Motivation](#motivation)
- [Why you might want to use Frankie instead of Sinatra](#why-you-might-want-to-use-frankie-instaed-of-sinatra)
- [Usage](#usage)
    - [Defining routes](#defining-routes)
    - [Request scope](#request-scope)
    - [Filters](#filters)
    - [Middleware](#middleware)
    - [Helpers](#helpers)
- [FAQ](#f-a-q)
- [Contributing](#contributing)

# Motivation
Sinatra is a wonderul gem (in both senses), but it fails at one thing: to be an education tool for programmers. This is not bad thing, since it may not be the ultimate goal of such a framework. My efforts to write __Frankie__ started when I wanted to understand how __Sinatra__ works, and stumbled upon the [base.rb][0]. The majority of the classes that are used by sinatra are in one single file, which makes it nearly impossible for a new person to grasp.

[I've tried to change the situation][1], but unfortunately, my initiative was premature for the sinatra project (considering their plans).

I wanted to understand how sinatra works, but the code was pretty challenging. So I decided I should re-implement the basic things sinatra has. Thus, __Frankie__ was born.

# Why you might want to use Frankie instead of Sinatra
- It's very small (<200 LOC), which is just a little overhead on top of Rack.
- Sinatra is a drop-in replacement for Frankie. Anytime you feel that you need more, you can just change your app to inherit from `Sinatra::Base`, your code will still work, and you will be able to use any of the Sinatra features.<commit_msg>Correct loei count in readme<commit_after># Frankie
Sinatra's little brother.

- [TOP](#frankie)
- [Motivation](#motivation)
- [Why you might want to use Frankie instead of Sinatra](#why-you-might-want-to-use-frankie-instaed-of-sinatra)
- [Usage](#usage)
    - [Defining routes](#defining-routes)
    - [Request scope](#request-scope)
    - [Filters](#filters)
    - [Middleware](#middleware)
    - [Helpers](#helpers)
- [FAQ](#f-a-q)
- [Contributing](#contributing)

# Motivation
Sinatra is a wonderul gem (in both senses), but it fails at one thing: to be an education tool for programmers. This is not bad thing, since it may not be the ultimate goal of such a framework. My efforts to write __Frankie__ started when I wanted to understand how __Sinatra__ works, and stumbled upon the [base.rb][0]. The majority of the classes that are used by sinatra are in one single file, which makes it nearly impossible for a new person to grasp.

[I've tried to change the situation][1], but unfortunately, my initiative was premature for the sinatra project (considering their plans).

I wanted to understand how sinatra works, but the code was pretty challenging. So I decided I should re-implement the basic things sinatra has. Thus, __Frankie__ was born.

# Why you might want to use Frankie instead of Sinatra
- It's very small (~200 LOC), which is just a little overhead on top of Rack.
- Sinatra is a drop-in replacement for Frankie. Anytime you feel that you need more, you can just change your app to inherit from `Sinatra::Base`, your code will still work, and you will be able to use any of the Sinatra features.
{'fraction_non_alphanumeric': 0.08517252098228163, 'fraction_numerical': 0.003108486167236556, 'mean_word_length': 4.249592169657422, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2158792', 'n_tokens_mistral': 947, 'n_tokens_neox': 896, 'n_words': 451}