webui icon indicating copy to clipboard operation
webui copied to clipboard

Idea: Development scaffolding similar to front-end

Open jinzhongjia opened this issue 1 year ago • 5 comments

Recently when I was trying to develop the front end, I found that the overall development experience was not very good. Maybe we can try to refer to elecron-vite

Make similar scaffolding to help development

jinzhongjia avatar Jun 28 '24 14:06 jinzhongjia

But I think this is not the main demand at the moment.

jinzhongjia avatar Jun 28 '24 14:06 jinzhongjia

electron-vite is a build tool that aims to provide a faster and leaner development experience for Electron

It's a good idea to have a build tool that helps to speed up the development process. However, let us think about how to add similar tools for every wrapper depending on the wrapper language and needs while we keep the core as simple as possible (c compiler, and a make file).

hassandraga avatar Jun 28 '24 15:06 hassandraga

for other wrappers, the role of webUI is better the smaller it is, it’s just a binary protocol between the backend and frontend.

The webUI itself does not serve as a backend, for example, in the case of deno.js and this, in my opinion, is more good than bad.

For the C++ version, etc. maybe everything is different

tvortsa avatar Jun 29 '24 17:06 tvortsa

In fact, the current difficulty is that if we combine webui with front-end vue react, then we have to introduce a different port js webui.js into index.html during development. When using packaged files, we need to directly introduce webui.js And the code of backend is also different between develop and release

It would be nice if these differences could be smoothed out.But I haven’t thought of a solution for price comparison at the moment.

jinzhongjia avatar Jul 07 '24 13:07 jinzhongjia

Just adding my .02$

I quite prefer that I have the freedom to implement whatever development tools I like into the development workflow in WebUI.

I think that one option would be to provide examples as part of the WebUI documentation of how existing frontend tooling like tsc, rollup/webpack can be easily integrated into a WebUI based development set up.

Modern dev tools like mise could come in quite handy in devising such examples.

(I am currently in the process of integrating mise watch, tsc + rollup for a webui-go project. The tooling is not quite ready to share yet though)

cwegener avatar Jul 08 '24 10:07 cwegener

Just an update to this, here is a WebUI Server + React example: https://github.com/webui-dev/webui/tree/main/examples/C/react

Screenshot

AlbertShown avatar Nov 25 '24 16:11 AlbertShown

Normally, you develop your web app using any framework you want, front-end and back-end, then instead of the traditional copy-paste the URL into the browser to access the app, instead of that you add webui.js to your HTML, then you create a new minimal app using language you like to create the main entry to WebUI to lunch your back-end server, then lunch the WebUI window like a normal desktop app.

AlbertShown avatar Jan 29 '25 19:01 AlbertShown