RAD 是一個零相依性的前端框架,專為使用 Dart 建立高效率的 Web 應用而設計。它讓開發者能在無外部相依的情況下建立快速、可擴展的 Web 應用,專注於簡潔與效率。RAD 專為 Web 打造,利用 Dart 的能力以最少的開銷提供響應式使用者介面。此框架非常適合對效能與輕量架構有嚴格要求的專案。其乾淨的設計促進快速開發,並容易整合至現有的工作流程中。
適用情境
建構高效率的Web應用程式
建立輕量級單頁應用
使用 Dart 快速原型設計
開發伺服器端渲染的網頁內容
與 Flutter Web 項目整合
主要特色
零外部依賴
針對網頁效能進行優化
最小化樣板程式碼
Dart 原生語法
內建路由與狀態管理
輕量且模組化的架構
適合對象
尋求輕量級 Web 框架的 Dart 開發者
優先考慮速度和效率的專案
Flutter Web 開發人員擴展 Web 功能
希望設定和配置最少的團隊
前端開發人員避免使用重型框架
使用建議
與更大的框架相比,生態系統有限
仍在發展,社區資源較少
不適合複雜的後端密集型應用
需要熟悉 Dart
最適合無需支援舊版瀏覽器的現代網路瀏覽器
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
Rad
Rad is a frontend framework for creating fast and interactive web apps using Dart. It has all the best bits of Flutter(StatefulWidgets, Builders) and React(Hooks, Performance), and allows you to use web technologies(HTML and CSS) in your app.
Function runApp will finds a element having id=output in your HTML page, create a Rad app with it, and then displays "hello world" inside of it. As you might have guessed it, Text('hello world') is a widget, a special purpose widget provided by the framework that we're using to display desired text on the screen. Rad provides number of widgets that you can use and best thing about widgets is that you can compose them together to create more widgets and build complex layouts.
Flutter widgets
Following widgets in Rad are inspired from Flutter:
These widgets has same syntax as their Flutter's counterparts. Not just syntax, they also works exactly same as if they would in Flutter. Which means you don't have to learn anything new to be able to use them.
React hooks
Similar to React, we have number of hooks that you can use to power-up your widget functions.
There's also an alternative syntax for all HTML widgets:
div(
children: [
p(innerText: 'Hey there!'),
]
)
Apart from syntax/names, HTML widgets are composable and has same semantics in the sense that they can be composed and mixed together with other widgets. For example,
In above example, a Span widget is containing a ListView widget. Further, that ListView is containing a StatefulWidget and a Span widget. The point we're trying to make is that HTML widgets won't restrict you to 'just HTML'.
Provides an enhanced development experience for developers working with the Rad Framework. With its powerful features, this extension makes it easier for developers to write and manage code, saving time and increasing productivity. Extension's top features are:
Visual JSX: Transforms your HTML widgets into a visually appealing, JSX-like syntax.
Click to See Preview
HTML2Rad: Converts your HTML markup directly into Rad's HTML widgets.
Click to See Preview
Reference
Below is the list of available widgets and hooks in Rad. Some widgets are named after Flutter widgets because they either works exactly same or can be used to achieve same things but in a different way(more or less). All those widgets are tagged accordingly.
Tags:
exact: Exact syntax, similar semantics.
same: Exact syntax with few exceptions, similar semantics.