All Questions
9 questions
0
votes
1
answer
58
views
Nodejs Module Pattern And Caching
The question is about nodejs module pattern code structure.
My goal is to initialise the module at one time and export the module using module.export
so that, it's ...
2
votes
0
answers
293
views
Undo/Redo implementation using Memento pattern Javascript
Relatively new to the Design patterns, Generally my works are writing function for the needs.
But now i need to implement a undo redo functionality, so i just read about the different patterns which i ...
2
votes
0
answers
628
views
Cron expression parser
Problem
Write a command line application or script which parses a cron string and expands each field
to show the times at which it will run.
~$ your-program "*/15 0 1,15 * 1-5 /usr/bin/find"...
4
votes
2
answers
380
views
web scraper for emails and links
I created a class to scrape URLS, parse and validate emails and get internal links.
How can I achieve the SOLID principles in this class written in Javascript to make a web scraper?
...
4
votes
1
answer
5k
views
"Clean Architecture" design pattern with Node.JS and MongoDB
After some time poorly designing my web applications' backends (mixing database calls with the controller, etc.), I have decided to try the "Clean Architecture" approach.
In this example I have a ...
1
vote
1
answer
261
views
Using Bluebird with fs to read a file within each of an (variable length) array of directories
I'm reading an array (of unknown length) of modules package.json files in order to extract the "style" property and store it in an array of its own:
...
2
votes
0
answers
67
views
Signing timestamped API queries
The following code should prove to offer sufficient security for public API so my main concern is about design flaws in process. It is meant to describe the process and eventually get included in ...
5
votes
1
answer
395
views
Creating an async consumable object in Node
Background
I have a situation where I have fixed number of objects with their own routines that would need to be called with the same initial message.
To accomplish this, I have a Factory that ...
1
vote
1
answer
273
views
Is this factory method a good approach?
We are beginning to learn Node.js and we are not always sure if we do it the right way. We have a strong object oriented background so the adoption is not always easy. Right now we implemented a ...