應用框架
可用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).