Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8569389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:19:23+00:00 2026-06-11T18:19:23+00:00

Regarding the BoilerplateJs example, how should we adjust those modules to be intercommunicate in

  • 0

Regarding the BoilerplateJs example, how should we adjust those modules to be intercommunicate in such a way once the user done any change to one module, the other related modules should be updated with that change done.

For example, if there is a module to retrieve inputs from user as name and sales and another module to update those retrieved data in a table or a graph, can you explain with some example ,how those inter connection occurs considering event handling?

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:19:24+00:00Added an answer on June 11, 2026 at 6:19 pm

    In BoilerplateJS, each of your module will have it’s own moduleContext object. This module context object contains two methods ‘listen’ and ‘notify’. Have a look at the context class at ‘/src/core/context.js’ for more details.

    The component that need to ‘listen’ to the event, should register for the event by specifying the name of the event and callback handler. Component that raise the event should use ‘notify’ method to let others know something interesting happened (optionally passing a parameter).

    Get an update of the latest BoilerplateJS code from GitHub. I just committed changes with making clickCounter a composite component where ‘clickme component’ raising an event and ‘lottery component’ listening to the event to respond.

    Code for notifying the Event:

    moduleContext.notify('LOTTERY_ACTIVITY', this.numberOfClicks());
    

    Code for listening to the Event:

    moduleContext.listen("LOTTERY_ACTIVITY", function(activityNumber) {
       var randomNum = Math.floor(Math.random() * 3) + 1;
       self.hasWon(randomNum === activityNumber);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Regarding PHP security with cookies and sessions, this is what i have done so
Regarding the backwards-incompatible change of Watir 0.5.x Finding elements by :class now matches partial
regarding regex (specifically python re), if we ignore the way the expression is written,
Regarding the jquery ui widget factory... What is the best way to have a
Regarding the Asset packager plugin for RoR . Is there a way to configure
Regarding those articles: Update Panels and JSON Alternatives Why ASP.NET AJAX UpdatePanels are dangerous
Regarding the example in wikipedia: http://en.wikipedia.org/wiki/Coroutine var q := new queue coroutine produce loop
Regarding Update and Insert triggers for MS SQL Server, is there a way to
Regarding the HashTable (and subsequent derivatives of such) does anyone know what hashing algorithm
Regarding Servlet 3.0 programmatic security, when a session times out there is no way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.