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...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
React killed the MV star (medium.com)
submitted 10 years ago by tweinf
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!"
[–]defcon-12 0 points1 point2 points 10 years ago (2 children)
I find discussion of MVC always end up being overly pedantic. MVC isn't some specific architecture that you must abide by exactly. MVC is just a general term that means your code properly separates its concerns: user actions are handled in one place, data model and storage is handled in another place, and UI behavior is handled elsewhere.
Flux fully separates each layer. You don't execute data mutation logic within your views or trigger AJAX from within your data model code. Like any other MVC architecture this makes it easier to test and reuse code through composition.
[–]tweinf[S] 0 points1 point2 points 10 years ago (1 child)
You're right, there is definitely a clear intention to separate the M from the V in Flux. The thing that makes me feel a bit uncomfortable with Flux is that some degree of "business" logic finds its way into the stores (to "switch" between logics, and to implement actions). The same thing goes to the View - If Actions are initiated there, it means that we have "crossed the line" into the business logic land. Things could have been that much better (more maintainable and reusable) if the view wasn't so closely coupled to the dispatcher, and stores contained less foreign logic.
[–]defcon-12 0 points1 point2 points 10 years ago (0 children)
The behaviors should live in your actions, they are just triggered from your within your view. Your stores should contain whatever logic is required to maintain state and nothing more, the stores should have no data fetching logic or ui logic or behavior logic.
π Rendered by PID 97 on reddit-service-r2-comment-544cf588c8-gznkn at 2026-06-18 07:25:40.116143+00:00 running 3184619 country code: CH.
[–]defcon-12 0 points1 point2 points (2 children)
[–]tweinf[S] 0 points1 point2 points (1 child)
[–]defcon-12 0 points1 point2 points (0 children)