Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Component Based Architecture [Javascript]

Q. Using vanilla javascript without any frameworks - what is a pattern for large scale component based architecture?

I understand the idea of components being split out into individual sections, and having their own structure, methods and api. However I don't know how to tie it all together. Where does the business logic reside? How do you structure the project, where do you include all the methods etc.

My experience is monolithic whereby everything is coupled too tightly. Any clarification on this would be much appreciated, feels like I'm running around in circles.

Note: When I'm talking about component based architecture, I'm referring to this idea

like image 224
jsldnppl Avatar asked Dec 01 '17 09:12

jsldnppl


People also ask

What is component-based architecture in React JS?

React. js, a JavaScript library, introduced a concept called Component-Based-Architecture, a method for encapsulating individual pieces of a larger user interface (aka components) into self-sustaining, independent micro-systems.

What is JavaScript component?

The core ecosystem of JavaScript consists of 3 main components which are ECMAScript, JavaScript Engine, and the JavaScript Runtime. It all starts with understanding what is ECMAScript and how is it different from JavaScript and followed by an understanding of the JavaScript Engine and the JavaScript Runtime.

What is component-based framework?

1. A Web application framework that encapsulates the processing logic into modular components with the implementation details of request handling abstracted, independent from the incoming request protocols at the transport level. Learn more in: Java Web Application Frameworks.

Is React a component-based framework?

The component-based framework we are using is called React. Developed by Facebook for its home page and released to the world's open source community in 2013, React is a framework that allows developers to make components for web pages that can be shared across teams.


1 Answers

You can read more about Object-Pattern and Module-Pattern

  • https://learn.jquery.com/code-organization/concepts/

Here is a link to a lot of common patterns:

  • https://addyosmani.com/resources/essentialjsdesignpatterns/book/
like image 103
Crappy Avatar answered Sep 22 '22 06:09

Crappy