Skip to main content

Questions tagged [revealing-module-pattern]

This pattern is like the module pattern; it focuses on public & private methods. The difference is that the revealing module pattern was engineered as a way to ensure that all methods and variables are kept private until they are explicitly exposed; usually through an object literal returned by the closure in which it’s defined. It also allows the developer to avoid a lot of `this.` in the code.

-3 votes
1 answer
131 views

Here is a class that I have implemented in order to sort rows of parameters in the form of an array of strings. ...
MigMax's user avatar
  • 15
2 votes
0 answers
53 views

I've been working on a project to make myself more comfortable with NodeJS, especially Express and TypeScript. Searching and reviewing a lot of approaches of the people, providing bootstraps for it, I ...
Pascal Schrage's user avatar
4 votes
1 answer
2k views

Feature requirements. I can move a square box. I can resize a square box by stretching four edges. Many square boxes can exist. I've implemented moving and resizing square boxes by module pattern. Of ...
gentlejo's user avatar
  • 155
0 votes
1 answer
448 views

I've recently been learning about the revealing module pattern, and it seems like a really good way to structure code in many cases. However, I find myself wanting to use it like a class, so I'm ...
ReeseyCup's user avatar
0 votes
1 answer
76 views

I'm learning about the Javascript module pattern from an array of online sources. The following suits my basic needs at the moment: ...
sansSpoon's user avatar
  • 173
3 votes
1 answer
217 views

I'm keen to get some feedback on how I have utilized the Revealing Module pattern here. This code is part of a web application that is used by the public. The purpose of this code is to encapsulate ...
JTech's user avatar
  • 143
3 votes
1 answer
434 views

I want to understand better how to make re-usable components that I can create multiple instances of, and I think the revealing module pattern comes handy, however, I'm not sure I'm implementing it ...
Carlos Valencia's user avatar
2 votes
0 answers
99 views

Making long story short, I got a chance to jump from DevOps to Software Development (Frontend). Because I'm quite new to JS design patterns, I need some quality advice about the job I've done recently....
xsimonzx's user avatar
2 votes
1 answer
150 views

Here is a vanilla JS module that I wrote for sorting and searching an array. I would appreciate feedback on the design of the module as I'm new to writing javascript in modules and don't know if I'm ...
Joseph Palomino's user avatar
7 votes
2 answers
1k views

I been getting into javascript patterns and would love to get some feedback. I notice that I got some general helper functions. Is this a good approach of dealing with it? ...
Dejan.S's user avatar
  • 196
2 votes
1 answer
78 views

I have recently been getting into the habit of leveraging the revealing module pattern for all my code. I used this guide for inspiration, but my code doesn't feel as elegant. ...
Antonio Pavicevac-Ortiz's user avatar
2 votes
0 answers
170 views

What follows is the JavaScript written for a Google Maps API implementation (for an image gallery that shows image, location, description, next and prev buttons, etc.). I have a JSON ...
sarath's user avatar
  • 51
1 vote
1 answer
115 views

I have the following piece of code which hides an element when a specified date was reached. I would like to get some tips about do's and don'ts. Specifically, I'm interested in: improvements brought ...
Christopher Hill's user avatar
3 votes
1 answer
173 views

After reviewing this approach: Rock-Paper-Scissors with the revealing module pattern I decided to write an alternative where the Revealing Module Pattern is used for the UI, model, and controller. I ...
konijn's user avatar
  • 34.4k
5 votes
1 answer
334 views

In my ongoing effort in learning advanced JavaScript I tried to develop the traditional rock paper scissors game by using the famous revealing module pattern. I'm not comfortable yet with what has to ...
Antonin Cezard's user avatar

15 30 50 per page