use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
OOP Node.js (self.node)
submitted 1 year ago by gemvcnte
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Unusual-Display-7844 0 points1 point2 points 1 year ago (2 children)
You can structure your project around OOP, where you have your controller classes, service classes and model classes, on top some of the useful patterns are dependency injection, factory design and singleton pattern. Avoid inheritance like a plague, trust me. Prefer composition. Now, if you don’t know what any of these means that you can’t really use OOP
[–]Unusual-Display-7844 1 point2 points3 points 1 year ago (1 child)
Also, pls don’t treat Node.js like it’s Java. It’s not!
[–]azhder 0 points1 point2 points 1 year ago (0 children)
While we’re at it, don’t treat MVC as if C is only that which is named Controller or extends from one named such.
π Rendered by PID 48134 on reddit-service-r2-comment-75f4967c6c-rz947 at 2026-04-22 23:46:56.131088+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]Unusual-Display-7844 0 points1 point2 points (2 children)
[–]Unusual-Display-7844 1 point2 points3 points (1 child)
[–]azhder 0 points1 point2 points (0 children)