Starcounter
HomeDownloadDocsCommunity
2.3.2
2.3.2
  • Starcounter Documentation
  • Getting Started
  • Starcounter
    • Collapsing the Stack
      • Complexity and Scalability Tradeoff
      • The Future of Micro-Services
      • 10 Benefits of Collapsing the Stack
    • Integrated Database and Web Server
  • Hello World - Tutorial
    • Create a Database Class
    • Create a Real Time UI
    • First Interactive UI
    • Computed Properties
    • Expense Tracker
    • Cancel and Delete
    • The Next Step
  • Guides
    • Database
      • Database Classes
      • Data manipulation
      • Object Identity and Object References
      • Querying with SQL
      • Data Types
      • Relations
      • Inheritance
      • Sharing data
      • Database Configuration
      • Comparing Database Objects
      • Referential Integrity and Constraints
    • SQL
      • Identifiers
      • Path Expressions
      • Data operators
      • Joins
      • Aggregates
      • Comparisons and Logical Operators
      • Sorting
      • Fetch
      • Offset Key
      • Indexes
      • Literals
      • Query Plan Hints
      • Reserved words
      • Query for Database Classes
      • SQL Isolation Between Applications
    • Transactions
      • Short-Running Transactions
      • Long running transactions
      • Using Transactions
      • Running Background Jobs
      • Commit Hooks
      • Post-commit hooks
    • Typed JSON
      • JSON-by-example
      • Code-Behind
      • Data Bindings
      • Callback Methods
      • Responding with JSON
      • Accepting JSON in Requests
      • Primitive Arrays and Single Value Types
      • Typed JSON Internals
    • Blendable Web Apps
      • Starcounter MVVM
      • Palindrom
      • Client-Side Stack
      • Sessions
      • HTML Views
      • App Shell
      • Web Components
      • View Attaching
      • View Composing
      • HTML Compositions
      • HTML Views Blending Guidelines
      • Avoiding CSS conflicts
      • Debugging
    • Network
      • HTTP
      • Internal Self Calls
      • Middleware
      • Anonymous or Substitute Handlers
      • URL Aliases and Redirects
      • Network Gateway
      • Static File Server
      • WebSocket
      • Avoiding URI conflicts
      • TCP Sockets
      • UDP Sockets
    • Publishing Apps
    • Working with Starcounter
      • Release Channels
      • Installation
      • Starting and Stopping Apps
      • Administrator Web UI
      • Star CLI
      • StarAdmin CLI
      • StarDump CLI
      • Working in Visual Studio
      • Error Log
      • Using HTTPS on NGINX
      • Using HTTPS on IIS
      • Run Starcounter in Production
      • Weaver
      • Investigating App Crashes
      • Configuration Structure
      • Database Refactoring
      • Using Unload/Reload to Modify Database Schema
      • Kernel Questions and Answers
      • Log Files
  • Cookbook
    • Attach an HTTP Request to an Existing Long-Running Transaction
    • Cookie-Based Authentication
    • Timestamp on Object Creation
    • Creating Strongly Typed JSON Collections
    • Migrating From 2.2 to 2.3+
    • Multiple Pages
    • Icons
    • Proposed Project Structure
    • Acceptance Testing with Selenium
    • Requesting a User to Authenticate
    • How to delete unused tables and columns
Powered by GitBook
On this page
  • Introduction
  • Mapping File
  • Entry Point URI
  • UI Metadata
  • App Icon
  • Required and Sample Data
  • Required Data
  • Sample Data
  • Settings Page
  • Submitting to the App Warehouse
  1. Guides

Publishing Apps

PreviousUDP SocketsNextWorking with Starcounter

Last updated 7 years ago

Introduction

If your app is blendable, it might be used in complex UI systems consisting of multiple apps coming from different vendors.

To make sure that apps play well together, we recommend that you follow certain conventions.

These conventions exist for two reasons:

  1. to prevent conflicts between apps in the same database

  2. to provide a common ground, expectable user experience

Mapping File

Each app that have blendable views should have a <AppName>.map.md file which contains the list of them.

The file should be provided at the root of the App Warehouse package. If the app is open source, the file should be provided in the code repository, preferably at the root.

Every view must be explained in the file and preferably illustrated with a screenshot.

In the future, the information in this file is used for automated blending as well as for .

Sample Images.map.md ():

# Blendable views

## /images/partials/contents/{[Simplified.Ring1.Content](https://github.com/Starcounter/Simplified/blob/master/Ring1/Content.cs)}

Shows a simple page for `Content` preview, image or video. In case of unexisting
content, shows empty file preview image.

![screenshot](docs/screenshot-content.png)

Entry Point URI

Every blendable web app should have the entry point URI that follows the pattern /<appname>, e.g. /kitchensink (lowercase).

When you access this URI, the app main screen should be presented.

If there is no main screen, show a splash screen saying that the app is running.

Handle.GET("/people", () =>
{
    return Self.GET("/people/organizations");
});

UI Metadata

By convention, a blendable web app must provide a metadata JSON that responds to the app-name blending token.

The response JSON can consist of the following properties:

Property

Explanation

name

Required. Human readable app name.

description

Optional. Short (single sentence) description of the app.

html

Optional. URI to a view that contains the app icon.

Handle.GET("/cssvariablesmanager/app-name", () => new AppName());
Blender.MapUri("/cssvariablesmanager/app-name", "app-name");
{
  "name": "CssVariablesManager",
  "description": "CssVariablesManager",
  "html": "/cssvariablesmanager/AppIcon.html"
}

App Icon

The icon is an image (preferably inline SVG) in the HTML file which path is provided as the html property in the app-name metadata.

<template>
    <svg slot="cssvariablesmanager/app-icon" viewBox="0 0 185 185" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <use xlink:href="/cssvariablesmanager/images/cssvariablesmanager.svg#css-file" />
    </svg>
    <template is="declarative-shadow-dom">
        <slot name="cssvariablesmanager/app-icon"></slot>
    </template>
</template>

Required and Sample Data

The app should not create required nor sample data without the user's consent.

Required Data

If the app requires any data to operate (for example a list of the world's countries in the Country table), it should present a nagging information with a button that creates the data:

  • on the top of the main page

  • possibly in every view that needs the required data

Sample Data

If the app offers some nice-to-have sample data, it should offer a button that creates this data:

  • on the main page, in a welcome message that is dismissible once (not per user)

Settings Page

If your app is configurable, it's good for to provide a user interface for changing the app settings.

By having a settings page mapped to the common token, your configuration UI can appear along settings pages from other apps. This is good because it gives the end user a single go-to place to configure all apps.

The common pattern is to have the settings page addressable by /<appname>/settings, blended to the token settings.

The settings page might contain a button to do a "Factory Reset" of the app (restores required data) or a "Sample data" button that populates the database with sample data.

Sample and prefab apps that have a settings page:

Submitting to the App Warehouse

To make your app discoverable by others, you're invited to publish it in the App Warehouse.

Submitting apps to the App Warehouse requires an invitation.

Sample MainHandlers.cs ():

System apps and navigation apps like will display a link to the entry point URI using the app name from this metadata. They will also use the icon, if provided.

Sample MainHandlers.cs ():

Sample BlendingHooks.cs ():

Sample AppName.json ():

Check out the cookbook to learn more about icons.

Sample AppIcon.html ():

on the

for more information.

testing purposes
source
source
Launchpad
source
source
source
Icons
source
https://github.com/Starcounter/Products
https://github.com/Starcounter/SignIn
Contact Starcounter
Settings page