应用框架
可用Glaze 实时应用,以及 Ol'ista Web 服务器与 Web 应用
17 个类别,共 208 个节点
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 支持等级
- 第 1 级(拟定)
- 所属包
- 网络应用 Glaze 实时 事件应用
网络应用
使用 Ol'ista 提供网页与 Web API 服务,以图实现处理程序,并请求网络服务。
Glaze 实时
主要面向二维图形的实时交互媒体框架:提供绘制循环、精灵、输入映射等,适用于游戏与模拟。
事件应用
提供启动事件与事件图的运行时——事件驱动的文档需要它。
实时应用
实时应用清屏关闭麦克风绘制圆弧绘制圆绘制椭圆绘制渐变A rectangle shaded smoothly from one colour to another, top to bottom or left to right: a sky, a fade, a highlight.绘制图像绘制直线绘制多边形绘制折线A line through several points, joined smoothly: a path traced between two tiles, a trail behind a comet, a graph.绘制四边形绘制矩形绘制圆角矩形A rectangle with rounded corners: a button, a panel, a card.绘制精灵绘制文字绘制平铺图像An image repeated across a rectangle, shifted by an offset: a texture of grain or cloth, a scrolling background.音频输出Where this application's sound comes out.音频输出(如已连接)The audio output if one was attached, and null if this run has been silent.已请求关闭Whether the application has asked to stop.光标可见Whether the application wants a cursor shown.调试中Whether the application draws its own frame-rate readout.期望的背景颜色What Clear paints when it is given no colour of its own.Desired Frame RateThe frame rate the application asks for, in hertz; 0, the default, for as fast as the display allows.期望的窗口大小The size the application wants.期望的窗口标题The window's title.已用时间Milliseconds the last frame took.帧缓冲区The pixels.输入Where the pointer is and which keys are down.在更新循环中Whether a frame is being drawn.是否正在光栅化Whether this window rasterizes, or merely records.请求的光标What cursor the application would like.输出端Where drawing goes: the framebuffer's rasterizer by default, or whatever was composed in.存储Per-run storage a node can keep something in, cleared when a run starts.获取实际窗口大小获取已用时间获取鼠标按键状态获取鼠标位置获取录音设备The recording devices on this machine, by name, for Open Microphone.获取声音电平How loud the sound is now: 0 for silence, 1 for a sine at full scale, over the newest 2048 samples, about 45 ms - what a level meter shows.获取声音频谱How loud each part of the sound is now, from the bass on the left to the treble on the right: bands spaced evenly in pitch from 40 Hz to 16 kHz, each 0 at -60 dB or quieter and 1 at full scale - the bars of a spectrum visualizer.获取声音波形The newest samples of the sound, oldest first, for an oscilloscope to draw: each -1 to 1.获取存储获取窗口大小Get design-time or specified window size.隐藏光标按键是否按下声音是否在播放创建精灵打开麦克风Starts listening to a microphone, so the measuring nodes can hear it: pass what this returns as their Microphone.播放片段Plays a clip from memory - one the audio nodes made, generated rather than recorded.播放音乐Plays a music file, looping by default: WAV, OGG/Vorbis, FLAC or MP3.播放信号Plays a signal, synthesized as it plays, until it is stopped: the same on both sides.播放音效Plays a sound file once: WAV, OGG/Vorbis, FLAC or MP3.播放立体声信号Plays a stereo signal - a panned voice, a stereo reverb or chorus - synthesized as it plays, until it is stopped.呈现Make sure every draw has reached the pixels, then answer them.请求关闭Ask to stop after this frame.设置光标设置帧率Paces the frames at a steady rate, so every frame's delta is the same and motion is smooth: 60 for most games, 120 for a fast one; 0 for as fast as the display allows.设置循环设置总音量The volume of everything at once, on top of each sound's own: a game's volume setting.设置声像设置音高设置音量设置窗口背景设置窗口大小设置窗口标题Set the window's title.显示光标显示调试信息精灵碰撞停止所有声音Stops everything playing, fading it out over some seconds.停止声音Stops a sound, fading it out over some seconds; 0 stops it at once.已初始化Window is created.按键按下A key went down.Key UpA key came back up.Mouse DownA pointer button went down - a click begins, a drag starts.Mouse UpA pointer button came back up - a click ends, a drag drops.启动Divooka procedural program entry, equivalent to "Main" in many programming language.更新Called once per frame.
数据库结果
创建数据库结果What a statement gave back: the rows it read, and what it changed.分解相等首行转为 JSONThe first row as a JSON object, one property per column - what an endpoint that reads one record sends - or null when there is no row, which a handler answers with 404.列The names of the columns, in order.最后插入的行 IDThe row id of the last row inserted on this connection.记录Each row as a dictionary from column name to value - the shape a graph reads a field from by name.行数How many rows came back.行The rows, each one value per column: text, a whole number (System.Int64), a real number (System.Double), bytes, or null.受影响行数How many rows the statement inserted, changed or deleted.标量值The first value of the first row, or null when there is none - the answer to a SELECT count(*).获取哈希码转为 JSONThe rows as a JSON array of objects, one property per column - what an endpoint answering with JSON sends.转为文本The result in one line.相等运算不等运算
Ol'ista 网站构建器
创建目录浏览功能创建目录服务功能创建 FTP 服务器功能创建实时聊天功能创建安全静态页面功能创建服务器创建静态文件功能创建用户登录功能创建 Web API 功能映射端点An endpoint answered by any function - one of the document's own graphs, Routine or Function - whose inputs are filled from the request by name, the way an ASP.NET Core minimal API fills a lambda's parameters.提供服务This blocks the executing thread until the server is shut down - when the program ends, or when the run it belongs to is stopped.启动Starts a server and returns while it runs, so the rest of the program can use it - call it, test it, show its address - and then stop it.停止Stops a server OilstaWebsiteBuilder.Start started, and releases its port.设置地址设置端点设置根文件夹
Web 应用开发
创建 Web 应用一个还没有端点的新 Web 应用。映射 DELETE用一个函数应答某个路由上的 DELETE 请求。映射回退应答所有没有端点或文件应答的请求——例如 404 页面,或单页应用的首页。映射 GET用一个函数应答某个路由上的 GET 请求:/todos/{id} 会填入名为 Id 的输入。映射分组把另一个应用的端点放到一个前缀(如 /api)之下,与 ASP.NET Core 的路由组相同:先在单独的应用中建好分组的端点(如需密钥,也在那里要求),再映射该分组。映射多种方法用同一个函数应答某个路由上多种方法的请求——HEAD、OPTIONS 或其他任何方法。映射 PATCH用一个函数应答某个路由上的 PATCH 请求。映射 POST用一个函数应答某个路由上的 POST 请求;记录或类类型的输入从 JSON 正文读取,简单输入从正文的字段或表单读取。映射 PUT用一个函数应答某个路由上的 PUT 请求。要求 API 密钥为目前已映射的每个端点要求密钥:没有该标头或密钥不符的请求以 401 应答。运行运行应用,直到程序结束——以提供服务为任务的程序的最后一步。启动在后台启动应用,并立即返回它应答的地址——适用于把提供服务作为其中一步、调用自身、然后停止的程序;运行超过“最长秒数”后会自行停止。停止停止由“启动”启动的应用并释放其端口;停止一个已经停止的应用不会做任何事。启用 CORS允许其他网站的页面在浏览器中调用此应用(CORS):列出允许的来源,或用 * 表示任何来源。启用 OpenAPI根据应用的路由及其处理函数的输入,在一个路径上用 OpenAPI 3 文档描述应用的端点——Swagger UI、Postman 和代码生成器读取的正是它。记录请求日志每个请求向程序的输出打印一行——方法、路径、状态码和耗时。提供静态文件提供一个文件夹中的文件——页面、脚本、图片——访问文件夹本身的地址时提供其 index.html。
端点响应
应用数据库
默认文件名The local database file when nothing names one.路径变量The variable naming the local database file.网址变量The variable naming the platform database's address.批量执行Runs several statements as one: either all of them take effect, or - when any is refused - none does.描述Where this app's database is, in words.执行Runs a statement that changes something - CREATE, INSERT, UPDATE, DELETE - and says how many rows it changed.按名称参数执行Runs a statement that changes something, with its values named as AppDatabase.QueryNamed names them, and says how many rows it changed.插入Runs a statement that inserts one row and gives back the new row's id.按名称参数插入Runs a statement that inserts one row, with its values named as AppDatabase.QueryNamed names them, and gives back the new row's id.查询Runs a statement that reads - a SELECT - and gives back its rows.按名称参数查询Runs a statement that reads, with its values named: :name in the SQL takes the value of name in Values - a web request's parameters, as an endpoint's handler receives them.语句A statement for AppDatabase.Batch.使用数据库Uses Provider from now on, closing the one in use.设置值The values with one more - or one replaced - for a named statement: a request's parameters plus what the handler worked out, a password's hash or a time, without changing the request's own.
数据库语句
Web 结果
错误请求400 Bad Request:客户端发送的内容有误,用 JSON 错误说明。冲突409 Conflict:与已有的内容冲突——名称已被占用,或所编辑的内容已在此期间被更改。已创建201 Created:说明新内容在哪里,并以 JSON 附上它。禁止访问403 Forbidden:已知请求来自谁,但不允许其进行此操作。无内容204 No Content:已完成,没有要返回的内容。未找到404 Not Found,附带 JSON 错误。成功200 OK,值以 JSON 发送;本身已是 JSON 的文本按原样发送。问题详情采用 ASP.NET Core 的 Results.Problem 所写的 RFC 9457 形式的问题:状态码、标题和详情,类型为 application/problem+json。状态码任意状态码,附带 JSON 正文,用于其他节点没有对应名称的应答。未授权401 Unauthorized:请求没有说明身份,或说明有误。
Web 应用
Glaze 精灵
QuickServe 网页服务
响应
HTML 响应A web page: the HTML as it is, sent as text/html.JSON 响应A JSON answer: the text as it is, sent as application/json.重定向Sends the visitor's browser to another address - after a form is posted, to the page that shows the result (303, See Other).文本响应A plain text answer.添加标头The same response with one more header - a Location, a Set-Cookie, a Cache-Control - replacing one of the same name.
网页文本
哈希密码A password made safe to store: salted and stretched (PBKDF2 with SHA-256), so the stored text cannot be turned back into the password.HTML 编码A value as page text: <, >, & and quotes escaped, so what a visitor typed is shown and never run.JSON 文本A value as a JSON string, quotes included and everything that needs it escaped - to put into a JSON template made with Format, e.g. {{"title": {0}}}.验证密码Whether a password is the one a stored hash was made from (by Hash Password).