流程即代碼:低代碼 & 雲研發 IDE —— Uncode

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在先前的一系列《","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/phodal/cloud-dev","title":"","type":null},"content":[{"type":"text","text":"雲研發:研發即代碼","attrs":{}}]},{"type":"text","text":"》文章裏,我們介紹了軟件工程的代碼化閉環。同時,在《","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/phodal/water/","title":"","type":null},"content":[{"type":"text","text":"Water:雲研發架構模式","attrs":{}}]},{"type":"text","text":"》介紹了設計這樣的開發環境裏,我們所需要的一些模式。今天呢,作爲這一系列的落地實踐,我們將介紹","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"雲研發 IDE","attrs":{}},{"type":"text","text":"的設計思想,以及如何實現,當然還有一點兒早期代碼:","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/inherd/uncode","title":"","type":null},"content":[{"type":"text","text":"https://github.com/inherd/uncode","attrs":{}}]},{"type":"text","text":"。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一次聲明:這是一個概念性 IDE 的設計,暫不適合任何生產環境。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在開始真正閱讀之前呢,爲了能更好地讓大家理解,我們要回顧一下軟件工程行業:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"DevOps 理念","attrs":{}},{"type":"text","text":"在國內的軟件行業有了長足的發展,在包括傳統企業(銀行、製造業)在內的公司裏已經廣泛接受,並進行了大規模推廣。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"雲原生技術","attrs":{}},{"type":"text","text":"已經成爲市場的主流趨勢。雲遷移與遺留系統上雲是市場的一大熱門話題。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"中臺方法論","attrs":{}},{"type":"text","text":"在實踐上還缺少真正的成功案例。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"低代碼/無代碼平臺","attrs":{}},{"type":"text","text":"逐漸成爲新的建設目標。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"雲開發","attrs":{}},{"type":"text","text":"有了越來越多的中小規模應用案例。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"AI 生成代碼","attrs":{}},{"type":"text","text":"正在被小範圍驗證。","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從整個行業而言,人們的關注點一直是","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"如何提升技術生產力?","attrs":{}},{"type":"text","text":" 現在技術到了一個新的階段了,而需求的轉換大大限制了人們的開發速度。於是無論我們的 DevOps 和雲開發實施得再好,也會陷入需求與技術隔離的瓶頸。這就是爲什麼我們需要","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/phodal/cloud-dev","title":"","type":null},"content":[{"type":"text","text":"雲研發","attrs":{}}]},{"type":"text","text":" 理論體系 :),通過代碼化的方式,一站式解決需求到設計,再到代碼的問題。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於雲研發理論來說,我已經設計好了理論基礎、軟件架構、開發模式,並且對其中的一系列東西進行了驗證,如:","attrs":{}},{"type":"link","attrs":{"href":"https://www.phodal.com/blog/document-as-code/","title":"","type":null},"content":[{"type":"text","text":"文檔代碼化","attrs":{}}]},{"type":"text","text":"、","attrs":{}},{"type":"link","attrs":{"href":"https://www.phodal.com/blog/requirement-as-code/","title":"","type":null},"content":[{"type":"text","text":"需求代碼化","attrs":{}}]},{"type":"text","text":"、","attrs":{}},{"type":"link","attrs":{"href":"https://www.phodal.com/blog/charj-lang/","title":"","type":null},"content":[{"type":"text","text":"代碼的代碼化","attrs":{}}]},{"type":"text","text":" 等。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們需要一個容器,把這些內容、模式、代碼整合到一起,這就是 Uncode,一個概念性的雲研發 IDE。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"Uncode,一個雲研發 IDE","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Uncode 是一個面向雲研發時代設計的下一代概念性 IDE。特性:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"流程化爲領域語言。Process as code","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一切皆 DSL。萬物代碼化","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"填空式/選擇式編程。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"開發環境即流程。","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"簡單來說,你可以在這個 IDE 上完成:需求的編寫,轉換需求爲設計,設計關聯代碼,禪模式編程,開發完即可上線。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"與之相對比的是,傳統的一站式 DevOps 門戶,儘管你可以通過跳轉來完成,但是無法相互關聯和設計。與之相近的是 GitOps,即將應用系統的聲明性基礎架構和應用程序存放在 Git 版本庫中。但是它們都不閉環,也不完整。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"雲研發 IDE 模式:流程即領域語言","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"回到軟件開發上,我們的軟件開發需求始於一個大特性或者史詩故事,這些故事會轉換爲一個 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"feature","attrs":{}}],"attrs":{}},{"type":"text","text":",如 Cucumber 中的:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"codeblock","attrs":{"lang":"gherkin"},"content":[{"type":"text","text":"# author: Phodal HUANG\n# status: doing\n# language: zh-CN\n功能: 第一個用戶故事\n\n 場景打開 Uncode\n 假如我在 Terminal 工具裏\n 當輸入 uncode\n 那麼則能在 Uncode IDE 裏打開當前項目\n","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"需求設計人員在這一步之前,將需求轉換爲了故事,故事與特性之間的關係記錄在這個 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"feature","attrs":{}}],"attrs":{}},{"type":"text","text":" 中。開發人員從 IDE 中看到需求,標記了對應的狀態 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"status","attrs":{}}],"attrs":{}},{"type":"text","text":",就可以進入代碼的設計階段。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在設計這個階段,我們先設計了 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"design","attrs":{}}],"attrs":{}},{"type":"text","text":" 的三種類型:","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"flow","attrs":{}}],"attrs":{}},{"type":"text","text":"、","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"model","attrs":{}}],"attrs":{}},{"type":"text","text":"、","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ui","attrs":{}}],"attrs":{}},{"type":"text","text":",對應於流設計、模型設計和 UI 設計。而我們要在 Uncode 中實現的部分便是需求與模型、流和 UI 的綁定。圍繞模型,我們還得構造統一的領域語言,用於自動化關聯接口與設計。從模式上來說,這個和無代碼/低代碼的開發是相似的。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"唯一不同的是描述方式。使用領域特定語言來描述內容,我們才能對系統進行合理地重構。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"雲研發 IDE 模式:一切皆文件","attrs":{}}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Linux/Unix下的哲學核心思想是『一切皆文件』。","attrs":{}}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在現今的開發環境之下,我們在看板上挑選卡片,又或者是通過低代碼編輯器生成,使用的存儲介質都是數據庫。而數據庫這些東西並不存在於開發環境中,而是放置於遠程服務器上。這就造成了另外一個痛點,無法簡單反向關聯、需求與代碼隔離等等。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"於是,作爲雲研發 IDE 的第二個模式,將所有的內容使用文件保存,並且使用版本管理工具(如 Git)進行管理。如我們的需求以類似於代碼的形勢存儲在數據庫中,可以實現以下特性:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“不可僞造”","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“全程留痕”","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“可以追溯”","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“公開透明”","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“集體維護”","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"沒錯,這就是一個區塊鏈系統。一旦需求發生了變化 ,你可以即刻感知到。不過,一旦你的代碼與模型不相符合,你的代碼就無法提交,或者模型被自動修改 :(。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"雲研發 IDE 模式:開發環境即流程","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"作爲一個集成開發環境,現有的 ","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"一站式 DevOps 軟件研發管理協作平臺","attrs":{}},{"type":"text","text":" 都應該只被當作管理和展示用途。而從設計本身來說,一個 Dashboard 和一個開源工具,本身就分工。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們在代碼庫上有了需求,那麼我們可以藉助於 IDE:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"將需求以看板的形式在本地重新可視化出來。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"將設計領域的語言在本地可視化出來,並將之與代碼進行關聯。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"高亮需要所有修改的代碼塊。如 Controller、View 等。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"將模型的修改反向關聯到設計上,以實時追蹤設計的正確性。","attrs":{}}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們還可以做一些不那麼正確的事情 ,如鎖定開發人員的修改範圍。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"雲研發 IDE 模式:填空式/選擇式編程","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於軟件架構師來說,人們經常有這麼一些痛點:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"面對的是缺乏經驗的開發者,難以快速地推進系統的開發。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"開發者缺乏對系統的瞭解,在錯誤的地方修改錯誤的代碼。","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因此,回到 ","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/notyy/TypeFlow","title":"","type":null},"content":[{"type":"text","text":"TypeFlow","attrs":{}}]},{"type":"text","text":" 的觀點上,我們既然已經設計好了模型,設計好了輸入和輸出,那麼我們一定能生成中間的方法及其返回值,併爲其設計一個 mock 的對象。如:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"codeblock","attrs":{"lang":"java"},"content":[{"type":"text","text":"@RequestMapping(\"/\")\nString home() {\n return \"Hello, World!\"\n}\n","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這種模式對於業務應用開發來說,非常易於實現 —— 生成綁定過程中的各類函數等等。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"選擇式編程","attrs":{}},{"type":"text","text":"。而一旦我們在組織內的所有代碼都被索引之外,我們有能力通過識別輸入和輸出,以及對應的方法名,就能在 IDE 中推薦對應的方法讓你選擇。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"雲研發 IDE 基礎要素","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"就這麼一看,我們只需要搞好 IDE 的事情即可。然而, 並非如此,我們還要做的事情還有一些:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"開發即部署。即 local dev 便是 dev server,可直接接入現有的系統。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"萬物即 DSL。具備一定等級的程序語言設計能力。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"API 的 API。即將現有的內部、外部 API 進行抽象化設計,以提供快速可用的 API。","attrs":{}}]}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"開發即部署 —— 雲開發環境","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從開發層面來看,我們一直在往復地浪費本地環境和線上開發環境,與此同時還有對應的測試運行時間、構建時間等。我們需要一個於","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"雲開發環境","attrs":{}},{"type":"text","text":"的機制。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"加速聯調、測試過程","attrs":{}},{"type":"text","text":"。當我們的本地環境上雲之後,一旦需要與其它系統對接時,所有的開發、測試效率將大大提升。譬如說,我們的接口需要多提供一個參數,傳統模式之後,我們要在本地運行,再通過流水線構建和部署。而現在,不再需要這個過程了,只需要配置好 Gateway,輕輕鬆鬆進行開發。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"加速環境搭建","attrs":{}},{"type":"text","text":"。我們不再需要在本地配置開發環境,只需要 1-click 就可以在本地 IDE 裏直接調試。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"市面上已經有一個勉強配合的概念:","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/nocalhost/nocalhost","title":"","type":null},"content":[{"type":"text","text":"Nocalhost","attrs":{}}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"抽象的抽象:DSL","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於需求、設計、開發、測試等的抽象,一直是我在去年研究的重點,它包含了:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"需求的抽象","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"設計化爲抽象","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"架構描述語言","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":1,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"統一建模語言","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"版本管理抽象","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"構建工具抽象","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"即將這一系列的步驟轉換爲領域特定語言 —— 只有將流程、工具、行爲進行抽象,我們才得以優化整個系統。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"膠水設計:API 的 API","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"軟件開發是一項複雜的團隊活動。在一個系統裏,我們要與大量的內、外部系統進行關聯。而爲了簡化開發人員的負擔,我們需要提供一個新的 API 來將現有的 API 進行封裝。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如在現有的模式之下,爲了記錄一個日誌,我們需要在依賴管理工具中引入對應的依賴,再添加相當的代碼。而所有的 API 都是在更新的,這一系列應該將由 IDE 本身來完成。在這種模式之下,我們只需要輸入對應的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"snippets","attrs":{}}],"attrs":{}},{"type":"text","text":",便能完成這一系列的自動化過程操作。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"技術細節","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後,我們還是回到代碼上:","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/inherd/uncode/","title":"","type":null},"content":[{"type":"text","text":"https://github.com/inherd/uncode/","attrs":{}}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"架構設計","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我決定使用我設計的新架構設計套路來展示一上 Uncode IDE 的架構。由於不確定性較大,現有的系統是一種介於單體與微架構 + 模塊化的方式設計的,我想了想後來就稱之爲","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"流體模式","attrs":{}},{"type":"text","text":"。一種在持續演進的過程中,不斷進行不可預料地拆分架構單元的模式。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在驅動方式上,由四種模式構成:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"模塊化。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"管理和過濾器。主要進行領域特定語言的設計","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"搭檔模式(sidecar)。將諸如語言解析等獨立爲進程,通過進程調用來實現跨平臺","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"容器橋。將 UI 展示與邏輯相隔離,讓 IDE 的大部分組件與 UI 無關。","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"同時系統的物理設計上,打算採用","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"領域驅動","attrs":{}},{"type":"text","text":"的方式進行。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"框架選型","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"考慮到這是底層開發 + 系統編程,我們:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"使用 Rust 來作爲主要開發語言","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":2,"align":null,"origin":null},"content":[{"type":"text","text":"在 UI 展示上,暫時使用 Tauri(WebView 容器) + React 來展示需求(本地看板)與設計(建模等)。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":3,"align":null,"origin":null},"content":[{"type":"text","text":"使用 TypeScript 作爲 UI 部分開發語言","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":4,"align":null,"origin":null},"content":[{"type":"text","text":"使用 RPC 作爲與多個 DSL 的通信協議","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":5,"align":null,"origin":null},"content":[{"type":"text","text":"……","attrs":{}}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"依舊地,這個項目將繼續在 Inherd 小組上開發~~。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"FAQ 及其它","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼:","attrs":{}},{"type":"link","attrs":{"href":"https://github.com/inherd/uncode/","title":"","type":null},"content":[{"type":"text","text":"https://github.com/inherd/uncode/","attrs":{}}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"vs Intellij IDEA or VSCode / Theia","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"並非完全競爭關係,編碼這部分的功能,還是這兩貨比較流行。Uncode 不會在前期造這方面的輪子,只是顯式地集成它們,或者被集成。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Uncode 優先解決 DevOps 的本地化,將其融入開發的開發過程的問題。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"其它","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後一次聲明:這是一個概念性 IDE 的設計,暫不適合任何生產環境。","attrs":{}}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章