Skip to content

Instantly share code, notes, and snippets.

/flow.diff Secret

Created September 15, 2014 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3a51432be7b7440c33fd to your computer and use it in GitHub Desktop.
Save anonymous/3a51432be7b7440c33fd to your computer and use it in GitHub Desktop.
diff --git a/lib/Mojolicious/Guides/Growing.pod b/lib/Mojolicious/Guides/Growing
index 8dd0a8f..183b7ad 100644
--- a/lib/Mojolicious/Guides/Growing.pod
+++ b/lib/Mojolicious/Guides/Growing.pod
@@ -203,6 +203,31 @@ fun thanks to automatic reloading.
Just save your changes and they will be automatically in effect the next time
you refresh your browser.
+=head2 A birds-eye view
+
+It all starts with an HTTP request like this, sent by your browser.
+
+ GET / HTTP/1.1
+ Host: localhost
+
+Once the request has been received by the web server, it will be passed on to
+L<Mojolicious>, where it will be processed in a few simple steps.
+
+ 1. Check if a static file exists that would meet the requirements.
+ 2. Try to find a destination with the router, like an action.
+ 3. Dispatch the request to this destination.
+ 4. Process the request, maybe generating a response with the renderer.
+ 5. Return control to the web server, and if no response has been generated
+ yet, wait for a non-blocking operation to do so.
+
+In our case the router would have found an action in step 2, and rendered some
+text in step 4, resulting in an HTTP response like this being sent back to the
+browser.
+
+ HTTP/1.1 200 OK
+ Content-Length: 12
+ Hello world!
+
=head2 Model
In L<Mojolicious> we consider web applications simple frontends for existing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment