Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define "web application" #1097

Open
mgiuca opened this issue Sep 4, 2023 · 9 comments
Open

Define "web application" #1097

mgiuca opened this issue Sep 4, 2023 · 9 comments

Comments

@mgiuca
Copy link
Collaborator

mgiuca commented Sep 4, 2023

As @prime2358 points out in #1096, the term "web application" appears 125 times in the spec, but is never actually defined.

This is definitely the right place to define this term. The web app manifest originally was just metadata but it has become essentially the definition of a web app, including the "scope" and "id" which together form the identity of an application.

It is actually quite hard to put into words what a "web application" is, because it is essentially a website governed by the rules laid out in this spec. But I think it deserves a clear definition before it is referenced 125 times.

The closest we have to a definition is "A web application that is installed is known as a [sic] installed web application", but this merely defines "installed web application" in terms of "web application" which has no definition.

@aarongustafson
Copy link
Collaborator

As Jeremy Keith so often says, defining a web app is an awful lot like defining brunch.

Here's my attempt at an intentionally broad definition:

A web application is any website with some degree of interactivity. That interactivity could be within the website itself (e.g., enabling a user to accomplish specific tasks) or the nature of the way the website allows itself to be interacted with (e.g., enabling a user to access it via an icon in the host OS).

@mgiuca
Copy link
Collaborator Author

mgiuca commented Sep 4, 2023

I'm not really a fan of that definition (perhaps as a general concept, but not in terms of what we want to capture here). That definition is trying to classify individual websites as "web apps" or "not web apps" (e.g. "Gmail is a web app, Wikipedia is not", or some such).

What I think we are interested in here is not a classification that can be applied to site A but not site B. Rather, it's a definition of the object we create when we process a manifest. So, it's basically an object that exists in a particular set of URLs (the scope), has a unique identity (the id), and a bag of metadata (the name, icon and other properties defined in the manifest) including capabilities (e.g. file handlers). It can be installed (which creates a local client-side object mirroring the "app" object on the server) and launched (which dynamically creates a browsing context with the metadata applied).

(I'd make my definition more formal but this is the lines along which I'd like to define it.)

My definition is almost tautological: the web app is defined as, essentially, the object described by the manifest. But I think that's exactly it. We currently define the application manifest as "a JSON document that contains startup parameters and application defaults for when a web application is launched" (without ever defining "web application"). I think we should define "web application" as the object having those parameters, and the "manifest" as the document that describes the application.

@aarongustafson
Copy link
Collaborator

It's funny, my attempt was to make it as broad a definition as possible. Wikipedia certainly has the capacity for interactivity depending on how you use it, but I was thinking even a static documentation site could be a web app if set up to be used offline and installed using manifest details.

That said, I get where you're coming from and I support the definition being focused on how the manifest plays into it. In my mind, something is a web app if you intend it to be or a user believes it to be. All other distinctions are moot. So I like the tautology to be honest as it fits the purpose relative to this document.

+1 for “For the purposes of this document, a “web application” is the object described by the members of a Web App Manifest.” (or similar)

@benfrancis
Copy link
Member

This is going to be fun 🙂

The definition of a web app is something I've blogged about in the past, and Alex Russell's blog post is an often quoted source for the definition of a "Progressive Web App".

Wikipedia has a decent definition of a web application:

"A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection."

The Web App Manifest specification arguably describes a special class of web applications, that is installable web applications.

If I was to attempt a concise and relatively broad definition of an "installable web application" from an end user's point of view, I would say something like:

"An installable web application is an interactive website which can be installed locally on a user's device in order to receive special treatment from a user agent, such as a custom application launcher, additional permissions or an enhanced display mode."

However, it sounds like what @mgiuca was hoping for is a definition of the internal representation of an installed web application (i.e. an App object) inside a user agent, from the point of view of an implementer of this specification. I would suggest that's a couple of steps removed from defining the term "web application", but if that's what you're looking for then I might start with something like:

"An App object is an internal representation of an installed web application inside a web user agent, derived from a collection of metadata parsed from a Web App Manifest during an installation process. Those metadata can be used by a user agent to give special treatment to a collection of web resources within a defined URL scope and identified by a unique identifier."

@alancutter
Copy link
Contributor

Should sites with manifests that haven't been installed be considered web apps or is the installation process the actual instantiation of it?

@marcoscaceres
Copy link
Member

marcoscaceres commented Sep 18, 2023

I think it's the actual installation that matters (and OS integration/management).

I'm worried about us formally defining it, because other specs also talk about "web applications" (e.g., push API)... and their definition covers web pages that haven't necessarily been installed (with the exception of Safari, which requires an installed web application).

Similarly, HTML talks about a "web application", but never formally defines it.

Personally, I think we should still to "installed web application" and maybe update Web Manifest to only really talk about those to avoid confusion.

@aarongustafson
Copy link
Collaborator

Personally, I think we should still to "installed web application" and maybe update Web Manifest to only really talk about those to avoid confusion.

I like this approach, but wonder: should it be “installed” or “installable”? After all, some Manifest keys are used prior to installation. Especially so when we consider the App Info supplemental keys, but even name and short_name.

@marcoscaceres
Copy link
Member

That’s a good point. All web pages are potentially “installable” (if they have a manifest or not doesn’t matter), but their characteristics change once they are “installed”. So, we would need to check in which context either concept is being used.

@mgiuca
Copy link
Collaborator Author

mgiuca commented Sep 22, 2023

Agree on avoiding the term "web application" and always "installable web application" (i.e. "web application" is any website that considers itself an app, not a technical term we need in specs; "installable web application" is this formal concept, which can apply to any site, but that's OK, we're just defining what it means to be installable, to have an app ID, etc.)

I think there are two distinct concepts, "installable" and "installed".

An installable web application is something that exists on the server side: it's a website, with a manifest (or just an implied default manifest), a scope and an id. Installable web applications can be installed by a user agent.

An installed web application is a concept on the client side. It's the object that's created within the user agent when an installable web application is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants