Coder Social home page Coder Social logo

Comments (9)

egekorkan avatar egekorkan commented on July 2, 2024 1

Yeah it's not super urgent but should not how we teach node-wot for sure

from website.

egekorkan avatar egekorkan commented on July 2, 2024 1

Issue can be closed after the merge of the PR linked above

from website.

danielpeintner avatar danielpeintner commented on July 2, 2024

3.Also, there is no name displayed on the page/tab. Similarly, the hands-on page displays thingweb-thingweb. Could you take a look at it @danielpeintner ?

33eb9f2 fixes the issue

from website.

fatadel avatar fatadel commented on July 2, 2024

@egekorkan Thank you very much for your feedback!

  1. I couldn't really understand this point. If there is an event you usually also want to subscribe to that particular event, don't you? Otherwise, nothing will happen when the event is emitted, which seems quite silly for me. So, the code shows how to do it. I know that I could simply invoke the notify function when there are no sufficient resources, but the idea was to show how events can be used in that case. Additionally, instead of just notifying, the event handler (or listener, whatever you call it) can be much more sophisticated and it's just simplified for the sake of the example.

  2. I am aware of the readallproperties method but this was done intentionally. The idea was to show the usage of uriVariables with Property Affordances, and, as we have discussed in Telegram, this usually involves having another property for the same data since you cannot read/write to the same property within your own read/write handler.

from website.

egekorkan avatar egekorkan commented on July 2, 2024

About the second point, all good!

About the first one:

You subscribe to an event as the Consumer and not really as the Exposed Thing itself. Once you call the emit function, the event is sent to its subscribers on all protocols. What is very important to show is that there is no Event Handler in the Exposed Thing, you do not handle events, you emit them.

from website.

fatadel avatar fatadel commented on July 2, 2024

I have handlers in both client and server Thing.
So, you suggest removing the server part and leaving it only inside the client?

from website.

egekorkan avatar egekorkan commented on July 2, 2024

That is what I would suggest to not give the wrong impression. You can however say that such a behavior is possible.

from website.

fatadel avatar fatadel commented on July 2, 2024

I will resolve this as soon as the PRs for the coffee machine + oAuth will be merged in order to avoid merge conflicts. I hope it is not asap, @egekorkan?

from website.

fatadel avatar fatadel commented on July 2, 2024

@egekorkan
Please find out these two PRs closing this issue:
eclipse-thingweb/node-wot#248
#20

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.