Where should I create data models?

Thanks a lot for this quick yet elaborate answer. If I get this straight,

  • ServerService.create({name:"Server1", ip:"1.1.1.1"}) or similar would be used for instantiating a new Server

  • ServerService.tcpXYZ(thisServer:Server) would be used to communicate with thisServer then save(…) a local copy of the file list for example

  • ServerListService would be the one using ServerService.create() and then storing the server parms in the list of server

  • ServerViewEditPages would also use ServerService.methodsXYZ to rename/readdress/refreshInfo/refreshFilesList/loadFile

And yes rename/readdress/andOtherParms are exposed to allow the user to modify them without having to delete/add the server causing a reload of file list. The server’s file list is stored locally, takes a while to load and the server connection parms change more frequently than the list.

1 Like