arduino-create-agent icon indicating copy to clipboard operation
arduino-create-agent copied to clipboard

Refactor

Open matteosuppo opened this issue 9 years ago • 4 comments

This project would probably benefit from a refactor.

We could organize the code in different packages:

main: starts things up, manage the daemonization server: manage the http and websocket server StartServer: start a http and https server and serves the requests discovery: searches for serial and network ports Loop: starts a Loop updating the list of ports found monitor: dialogues with serial and network ports Open: open a port to communicate, returns a channel where you can push info Close: close a port to stop communicating program: upload a sketch on a board connected to a port Program: program a port

matteosuppo avatar Jul 17 '15 08:07 matteosuppo

The Discovery/Monitor/Upload "separation of responsibilities" is followed in the Java IDE too.

To increase the amount of code reuse, one suggestion that was proposed in the past, was to create a set of command-line tools for dealing with each step, so the Java IDE and the Web IDE can both connect to these tools via stdin/stdout. Currently we do that only for the "Upload" part (because we already have avrdude and bossac).

cmaglie avatar Jul 17 '15 08:07 cmaglie

@matteosuppo @mastrolinux Is there any plan to proceed on this refactor? It would be really useful to the frontend, since the logic to handle this stuff is crazy.

AlbyIanna avatar Jul 19 '19 12:07 AlbyIanna

Yes, most of these features are now in the arduino-cli project. We should be able to integrate them here within the next 2 months.

mastrolinux avatar Jul 19 '19 15:07 mastrolinux

Cool. Maybe we should migrate to jira issues then.

AlbyIanna avatar Jul 19 '19 16:07 AlbyIanna