Open drasko opened 9 years ago
You're probably right. I originally introduced a web page and client side script for test purposes to show how a web page could register proxies for remote things. The client side script library (wot.js) is independent of the UI and perhaps could remain here.
@drasko I was thinking about that too and a separate back in would be the ideal implementation, but since the original implementation included the http server as well as the socket server I wired up Express to have some encapsulation for the web stuff. I didn't want to make that structural change in my the first commit. Also, that's why I started to separate the files into the libs directory so I assume eventually we would have a visible structure for the front end and back-in library files.
I think this project would need a front-end. I believe Dave will have to demonstrate the solution to the target audience and for that we need a front-end as well many IoT developers are not very familiar with web design and perhaps we should give them some idea how WoT can be wired up with web libraries. I think it will be relatively easy to separate the front end from the back-in when we have a release.
@zsoltpardi I think best solution would be to separate repos.
Express is OK but it has nothing to do with frontend. It is very useful to wrap NodeJS and provide us quick API to implement RESTful API (and maybe even this is overkill, as I think that Restify - http://mcavage.me/node-restify/ - would be more lightweight), bu if we need full-blown webapp, I would prefer that we seaprate this in two repos.
As a side note, I think we should discuss more about technology choice and evaluations before jumping to implementations. I guess project chatroom (https://gitter.im/w3c/web-of-things-framework) would be the best place for these discussions.
Definitely agree with more upfront discussion to reduce risk of bad decisions and wasting time on unfruitful implementation work
Restify is a great library, we could use that, as well as Express, one of the most widely used Nodejs libraries for web UI is a legit choice too. Same as with knockout and AngularJS, I assume the community will be rolling out implementations with both Express and restify.
I agree, the best architecture would be separate back-in and front-end.
I can see that PR #37 introduced frontend, making project into webapp with GUI. I thing that this repo should be strictly backend, and the code must be kept simple and tight.
I see it something like Meshblu: https://github.com/octoblu/meshblu, so backend only.
If frontend is needed, we can make a separate repo and think how we can do the integration.