[racket] Isn't the web application tutorial too advanced?

From: Ben (yfefyf at gmail.com)
Date: Sun May 4 01:06:01 EDT 2014

Hi Danny,

Thank you for your response. I just reread that section and the
documentation. Luckily, they make some sense to me now.


But your evaluation is not so accurate. When I was reading the tutorial last
time, I did finish the mentioned paragraph before going the the
documentation.

I think the problem is that I was not familiar with some concepts. What is
`send/suspend/dispatch`? What is `embed/url`? What is a `restart`? How do
they
work?

They seemed like magic to me. I don't feel good about magic because they
confuses me.

And there's already some parts that evaded me before that section. For
example:

    ; render-blog-page: blog request -> response
    ; Consumes a blog and a request, and produces an HTML page
    ; of the content of the blog.
    (define (render-blog-page a-blog request)
      (response/xexpr
       `(html (head (title "My Blog"))
              (body (h1 "My Blog")
                    ,(render-posts a-blog)))))

`render-blog-page` takes `a-blog` and `request` as arguments. But I couldn't
find `request` in the body. Is this your mistake? No, probably not. Because
it's
consistent with the comments and `render-blog-page` is called several times
with
exactly the same arguments.

Then I was confused. I thought I must had missed something. Maybe it's a
language feature or a framework feature.

All the way down to Advanced Control Flow part, my confusion accumulated to
a
point that I thought I was not ready for the tutorial. Then I decided to
give
up.


On Sun, May 4, 2014 at 8:29 AM, Danny Yoo <dyoo at hashcollision.org> wrote:

> On Mon, Apr 28, 2014 at 5:27 AM, Ben <yfefyf at gmail.com> wrote:
> > After gaining some basic understanding of web applications, I wanted to
> > develop one in Racket. So I went to the tutorial "Continue: Web
> Applications
> > in Racket". When I reached "6 Advanced Control Flow", I saw
> > `send/suspend/dispatch`. I didn't know what it is, so I clicked on the
> link
> > to see its documentation and saw a very complex starting sentence:
>
> Hi Ben,
>
>
> Apologies for not responding to this in a timely way.
>
> It sounds like you saw the link to the reference documentation, took a
> depth-first approach, and then got stuck in the reference
> documentation, which is not beginner friendly.  Does this evaluation
> sound accurate to you?
>
>
> If so, perhaps we should redirect links so that beginners are not
> directed to the reference documentation.  Perhaps links to functions
> in the tutorial documentation should go to some of glossary that is
> appropriate to a tutorial, rather than directly to the reference
> documentation.  I am not sure what the right approach is.
>
>
> There is a paragraph that is in the Advanced Control Flow section that
> is intended to hand-wave the explanation of what that function is
> doing:
>
> "Let’s look more closely at the send/suspend/dispatch
> mechanism.send/suspend/dispatch consumes a response-generating
> function and gives it another function, called embed/url, that we’ll
> use to build special URLs. What makes these URLs special is this: when
> a web browser visits one of them, our web application restarts, not
> from start, but from the handler that we associate with the URL. In
> the handler phase-1, the use of embed/url associates the link with the
> handler phase-2, and vice versa."
>
> Would it have helped if we were to move that paragraph up closer to
> where we first mention send/suspend/dispatch?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140504/e9d0d204/attachment.html>

Posted on the users mailing list.