Skip to content

saribe/js-nation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 JS-Nation 2022 📺 🍿 🎬 📽

Hello👋 there! Welcome to JS-Nation Should we have business logic in the UI? workshop. The propose of this document is to guide you our develop the steps of this workshop... Good luck, ping Sam for any help 🔔.


💡 The general idea

Some decisions made may seam not obvious, but once you understand the concept you will see clearly the matrix.

This architecture will try to make you cry with it's Onion Architecture, it is based on the inversion of control principle. It's composed of multiple concentric layers interfacing with each other towards the domain.

Some hight level concepts and tips:

  • Dependencies only point inwards. An inner layer should never rely on anything from an outer layer.
  • Web/UI is a delivery mechanism. It is not the center. it is external.
  • The Domain is independent of frameworks or libs.
  • The Application is independent of frameworks or libs.
  • The UI adopted the react framework.
  • Organize your code around the business rules, not frameworks.
  • Dependency rule Keep details away from the core.
  • Make everything easy to test.

ℹ️ Usage

# In the project directory, you can run:

npm start

# Runs the app in the development mode.\
# Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

# The page will reload if you make edits.\
# You will also see any lint errors in the console.

npm test

# Launches the test runner in the interactive watch mode.\
# See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

npm run build

# Builds the app for production to the `build` folder.\
# It correctly bundles React in production mode and optimizes the build for the best performance.

# The build is minified and the filenames include the hashes.\
# Your app is ready to be deployed!

# See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

🏗 Contributing

throw new NotImplementedException();

🤔 Disclaimer

Front-end development is software development.

Nothing used here is new or an attempt of creating a new framework.

DDD is business pattern created in 1970s to solve business problems, we are implementing a software solution to solve the business requirements of OLX. DDD was introduced to the software industry in 2004.

Object Oriented Programming (OOP) do not invalidate any of the other design patterns in place.

🧠 The mindset and ideology

  • The UI is definitely important but not the main/only focus.
  • Low coupling + high cohesion = THE GOAL.
  • Keeping your domain pure (no libraries or frameworks dependencies) makes it easier to test, maintain, and iterate on.

About

Should we have business logic in the UI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published