Giter Club home page Giter Club logo

Comments (4)

coreybutler avatar coreybutler commented on June 27, 2024

I think a standard naming syntax makes sense as long as it is just a part of the project. Developers should have a choice in which syntax they follow.

The <event-namespace>.<event-target>-<event-name> syntax works well for JET, but the event namespace seems redundant and unnecessary within the core NGN lib. Each of the components are their own namespace. The exception to this are data stores, which relay events from models to the store. In this case, they are already namespaced, though they use record. instead of model..

from ngn.

gbdrummer avatar gbdrummer commented on June 27, 2024

Agreed on the first point.

I didn't mention it, but my intent was for the first two portions to be optional, ie only added when necessary. I just want to make sure that any events that do fire are descriptive enough that its obvious what they are doing, ie I don't wanna see a random event called "update" for example (maybe that is already the case).

The only other thing I want to look at is what we're actually naming things, and then make sure we are consistent. For example, in NGNX we have this common pattern:

this.properties.on('field.update', change => {...})

This makes total sense with NGN Data Models v1, although without knowledge of those, an event called "property.update" would make more sense to a user in this instance. I'd like to open up some discussion about the overall nomenclature so that we have synchronicity between all these different elements (again, mostly specific to JET).

from ngn.

gbdrummer avatar gbdrummer commented on June 27, 2024

On that note, should this issue be moved to JET?

from ngn.

coreybutler avatar coreybutler commented on June 27, 2024

I think an overview of the current event naming syntax is warranted. Your point about this.properties makes sense. That particular event would be relevant to JET, but it originates in the data model. In NGN 2, we can also have stores to represent properties, and we now have a relay function. The relay function would be more appropriate in this case because it would allow us to rename events within the context of how they're being relayed "up the chain".

I think this issue is a good place to keep track of our conversation. As we conclude around specific points, they should be added to the original issue. In the meantime, I will add this issue to the roadmap for NGN 2.

Additionally, for discussion purposes, I could extract all the events from NGN 2 via metadoc.... but it would be alot nicer if the doc site was done :)

from ngn.

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.