Skip to content

Revamp "Continue: Web Applications in Racket" #131

Open

Description

@sorawee

Here's a list of improvements that I wish to see:

Better spacing

The following image shows one of the issues.

Screenshot 2023-11-11 at 9 58 58 AM

There's too much space before the box, and not enough space after the box.

Consistent usage of contract

There's a weird mix of HtDP-style signature and actual Racket contract throughout the tutorial, which is confusing. We should pick one style and use it consistently.

Slightly off-topic, but while I know that the tutorial's target audience is readers of the first edition of HtDP, I'm not sure if that makes sense anymore.

Use appropriate tags

Several @tt should have been @litchar.

Linkify code

All links under #lang web-server/insta are broken.

Consistent naming

Right now, functions whose name is prefixed with render- are used in two different ways: they might return an xexp/c or a response?. It would be nice to make things consistent. Perhaps make-XXX-request for functions that return response? and render-XXX for functions that return xexpr/c?

Avoid "request" as an argument name.

This is to avoid incorrect linkified text.

Activity

  1. sarna commented on Nov 12, 2023

    @sarna

    One aspect that confuses me: the tutorial uses functions from web-server/http/bindings (request-bindings, extract-binding/single, etc.) Meanwhile, the docs for this module effectively say these functions are deprecated:

    These functions, while convenient, could introduce subtle errors into your application. Examples: that they are case-insensitive could introduce an error; if the data submitted is not in UTF-8 format, then the conversion to a string will fail; if an attacker submits a form field as if it were a file, when it is not, then the request-bindings will hold a bytes? object and your program will error; and, for file uploads you lose the filename. Therefore, we recommend against their use, but they are provided for compatibility with old code.

    If you recommend against their use, why are they in the tutorial?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions