[regext] Re: Extensions: Styling conventions for object class names and JSON names #40
"Andrew Newton (andy)" <andy@hxr.us> Fri, 10 January 2025 16:15 UTC
Return-Path: <andy@hxr.us>
X-Original-To: regext@ietfa.amsl.com
Delivered-To: regext@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3B8C7C14F74E for <regext@ietfa.amsl.com>; Fri, 10 Jan 2025 08:15:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hxr-us.20230601.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j-P5zxVoX_in for <regext@ietfa.amsl.com>; Fri, 10 Jan 2025 08:15:31 -0800 (PST)
Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 036CAC14F603 for <regext@ietf.org>; Fri, 10 Jan 2025 08:15:30 -0800 (PST)
Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-54020b0dcd2so3168567e87.1 for <regext@ietf.org>; Fri, 10 Jan 2025 08:15:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hxr-us.20230601.gappssmtp.com; s=20230601; t=1736525728; x=1737130528; darn=ietf.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TXnJEBF7Y4RZe/ZR5XbXYIxx8HswwVjKLiBL4A63QWg=; b=eKb6I/ZbNQnvkr6nhfHceceTsvwxQgyK8hrInqqonzMfWgx63M5JG9AHX5lY6jMahc btnYMitbgEs7zLDf8/a2PNE/Jyf4FfFkFuhXtbvJoZvHza4KY7GXU9nSBi2s+NSxDdOf RbEWLc7ZW80m1qBfRW6kqt2Edz4ROoV21vm6E3uoZyVQUp6Fh07OI4JMxc/zJPubWJ/x yFJ0f+t8AmubCVK4QyrysF1gCqbR+iwQgqQahTfd0wvH+PhPHWhs5B1/nOCG/Dh+py1K LLJ3Sod1Kx9hhewYWoiH4lEHZ/N+48GZJ04JkU31GFFxIl3JyeiiHmHv/qBBle0ZT91K IlNQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736525728; x=1737130528; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TXnJEBF7Y4RZe/ZR5XbXYIxx8HswwVjKLiBL4A63QWg=; b=W9ZKnFpwrYFbVMiLhZHjwAMEp22Q6qoAOU37ScU6SfS/Re+W7wS6HPDGbia/qEicnw KM0gvtNnzZ30ZMbLOmKel7R9p2YgpthtYjdheENUwiwMRHHFck3bv7zWMIAp0aNoXo3b rInnrgN+jamOVRPtfdq3r/QDIRQBadIa5DVdG2mtawQdowwFzlpPDL7lc0y/LWHkyZ0+ nyvuXun6sOfcZD6gWe+XWoO+flb/XP4Iv6NEFKb5Ukn3tHCehHw8vWeC2ztRk7t2rhEf ntukxbhMBqxU2G9UdZANGrdf3Ar00M/xIdiu/Rcb9aBLEMuuPdOT93nZI0WFryi/awZx 5wuA==
X-Gm-Message-State: AOJu0Yw/o8T1xAz8tWdgUWyx8lU3McFdB2qGEhcHFouoXv2LU98pINSo sX6k3t/NhgHp8gKr3gIWNbl77ueAAyQXTQSfkYeIefza3fZvTXV5kNbaT3hMZMgYrBgaGPHhc9d 3O2SxpUOpTtgqAPcF6c0Q32aRRuohyHom2sSiJscMlOnxtoeH
X-Gm-Gg: ASbGnctUEQ5gGYnXH5fzHkHxD/3V/KsgEkzcPfibyqZRFRecDQWvGN6zYuXYHESa/ir fLsLFVYlxHu6lNDocX83tn/f7YmIBTQC5HVY=
X-Google-Smtp-Source: AGHT+IERqV3UePx+wEWlyj4Sf17ayboHFkmK3ng6DU/GT2vz8tf2F/gutfyX70j02XlnkWKzHMJOXLH+DQzwhW9+bC4=
X-Received: by 2002:a19:5514:0:b0:540:2fd2:6b85 with SMTP id 2adb3069b0e04-5428c1e0235mr1902469e87.13.1736525728056; Fri, 10 Jan 2025 08:15:28 -0800 (PST)
MIME-Version: 1.0
References: <PH7PR15MB60848D5346C277DBE289F450C9152@PH7PR15MB6084.namprd15.prod.outlook.com>
In-Reply-To: <PH7PR15MB60848D5346C277DBE289F450C9152@PH7PR15MB6084.namprd15.prod.outlook.com>
From: "Andrew Newton (andy)" <andy@hxr.us>
Date: Fri, 10 Jan 2025 11:15:17 -0500
X-Gm-Features: AbW1kvadYA76RQiwpjaFLGfMYqx3EKqBYsXc8wjnO_kLMe1wtT7WhZJCWXBJnBk
Message-ID: <CAAQiQRf4=m4ff7FOa-gCDCf8a6MG_FgNUPY-sZqMN0GV8y-POw@mail.gmail.com>
To: Jasdip Singh <jasdips@arin.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: 3VZ2YJ35YBPHRS6IDS6PCBOR35AUOA42
X-Message-ID-Hash: 3VZ2YJ35YBPHRS6IDS6PCBOR35AUOA42
X-MailFrom: andy@hxr.us
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-regext.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "regext@ietf.org" <regext@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [regext] Re: Extensions: Styling conventions for object class names and JSON names #40
List-Id: Registration Protocols Extensions Working Group <regext.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/regext/IgVhTN1uUgbpAZun6UcQEepP83U>
List-Archive: <https://mailarchive.ietf.org/arch/browse/regext>
List-Help: <mailto:regext-request@ietf.org?subject=help>
List-Owner: <mailto:regext-owner@ietf.org>
List-Post: <mailto:regext@ietf.org>
List-Subscribe: <mailto:regext-join@ietf.org>
List-Unsubscribe: <mailto:regext-leave@ietf.org>
I am good with camelCasing and stating that violation of the recommendation for URL encoding could lead to interoperability issues when the object class name is to appear in a URI. -andy On Fri, Jan 3, 2025 at 4:39 PM Jasdip Singh <jasdips@arin.net> wrote: > > https://github.com/anewton1998/draft-regext-rdap-extensions/issues/40 > > > > > Section 2.4.3, paragraph 3 > > >> It is RECOMMENDED that object class names comprise lowercase ASCII characters, and that the "_" (underscore) character be used as a word separator. Though "objectClassName" is a string and [RFC9083] does define one object class name with a space separator (i.e. "ip network"), usage of the space character or any other character that requires URL-encoding is NOT RECOMMENDED. When object class names are also used in URLs, extensions MUST specify that the names are to be URL-encoded as defined in [RFC3986] if the object class names contain any characters requiring URL-encoding. > > > > > I don't think we need such recommendation. > > > > [JS] In our opinion, we need some constriction since the current definition is just a string. > > > > > First: why only lowercase with underscore? There does not seem to be any explanation. > > > > [JS] Lowercase has been the de facto convention so far. As for the underscore, the idea was to do better than white spaces and reduce the URL-encoding overhead. > > > > > URL path segments are case-sensitive. Especially with the notion of underscore being a separator between extension identifier and name, usage of underscore in name itself is even counterproductive. Actually if the extension identifier would contain underscore and the name would contain underscore and the separator will also be underscore it will be impossible to figure out which part is which. > > > > [JS] Why/when is such figuring out (parsing) useful? > > > > [TH] Although it's not strictly necessary for a client to parse the name, I think it's useful to be able to see at a glance that a string is for object X from extension P, rather than having to consider the role of each segment in the string. But this may be a moot point if his separate camel-casing suggestion in this respect is accepted (which I think would be a good idea). > > > > > Second: mandating extensions to say something already defined by http (URL-encoding of path segments) on one side not needed on the other side even harmful in the current version. Here it does not tell where to URL-encode > > > > [JS] Doesn’t URL-encoding connote sufficiently? > > > > > It is not required in JSON values for example (or in other words JSON defines its own encoding for certain characters). > > > > [JS] Of course. > > > > [TH] I think the argument here is that the sentence '[w]hen object class names are also used in URLs...' could be read as 'an object class name that is never used in a URL does not need to be URL-encoded anywhere, but an object class name that is used (even once) in a URL needs to be URL-encoded everywhere'. As with the previous part, this becomes moot if camel-casing is recommended. (I suppose there is a chance that somebody goes ahead and uses a character that requires URL encoding notwithstanding the recommendation, but in that case it's implicit that URL encoding is required in the URL only.) > > > > > Section 2.4.7, paragraph 1 > > >> The styling convention used in [RFC9083] for JSON names is often called "camel casing", in reference to the hump of a camel. In this style, the first letter of every word, except the first word, composing a name is capitalized. This convention was adopted to visually separate the namespace from the name, with an underscore between them. Extension authors SHOULD use camel casing for JSON names defined in extensions. > > > > > Why is it recommended and what are the negative consequences of not following this recommendation? > > > > [JS] Because of the precedence/status quo. > > > > > Also this is somehow inconsistent when 2.4.3. is actually recommending the opposite when it comes to object class name. > > > > [JS] That’s an interesting observation. Perhaps, object class name could also be camel-cased for consistency with JSON member names? > > > > [TH] Per earlier comments, I think this is a good idea. > > _______________________________________________ > regext mailing list -- regext@ietf.org > To unsubscribe send an email to regext-leave@ietf.org
- [regext] Extensions: Styling conventions for obje… Jasdip Singh
- [regext] Re: Extensions: Styling conventions for … Andrew Newton (andy)