ADMIN PAGES: [3 weaks]
login/signup
index -> charts and statistics
stores -> show all stores (enable/delete store)
store -> edit / add
new stores requests -> show all stores requests (delete store request)
new stores request (show all details and approve)
products (show all / delete)
products -> add / edit
categories
abd qaddora changed 2 years agoView mode Like Bookmark
CORE MODULES
GLOBALS
global classes example (Math class)
cont val = Math.abs(-5);
global functions example (fetch)
fetch('https://jsonplaceholder.typicode.com/todos/1')
.then(response => response.json())
.then(json => console.log(json))
abd qaddora changed 2 years agoView mode Like 2 Bookmark
TASK 1
Open git bash on your desktop.
Create a new directory called git-test.
Create an index.html file inside this directory using the terminal and create a simple page with HTML tags.
Create a new repo on GitHub.
Initialize git in your directory on your PC.
Use git commands to push your folder to the GitHub repo.
Create a new branch on the local repo called styling.
Add a new file called style.css in the new branch and push changes in the new branch.
Try to clone this repo in another folder.
abd qaddora changed 2 years agoView mode Like Bookmark
import
import {Row , Col} from 'antd';
basic grid
The grid is divided into 24 part
span -> how many parts of all 24 parts should this col use
<Row>
<Col span={8}>Hello</Col>
abd qaddora changed 2 years agoView mode Like Bookmark
NOTE: YOU HAVE TO READ REDUX ARTICLE AT FIRST
1. Installistion
npm i redux react-redux
2. Create the store
At first we define the reducer and pass the initState
const reducer = (state = initState , action) => {
//some actions logic
return state;
abd qaddora changed 2 years agoView mode Like Bookmark
Deadly Sins: list of common software defects that can have serious consequences, including security vulnerabilities, data loss, and system failure.
referred to as Sins because they can be avoided with proper care and attention to detail during the software development process.
TOP DEADLY SINS EFFECTS:
Integer Overflows
SQL Injection
Command Injection
XSS
Race Conditions: occurs when two or more threads or processes access shared data at the same time.
Failing to Handle Errors
abd qaddora changed 2 years agoView mode Like Bookmark
introduction
HTTP is stateless protocol so the browser save the state and send it to the server in the requests example auth token saved in the cookies.
How browser handel cookies?
backend tell the browser to save this in the cookies.
the browser store the data in the cookies.
when the user request the site the browser find the cookies related to this site and send the cookies with the request.
example request to facebook.com
//COOKIES STORE
abd qaddora changed 2 years agoView mode Like Bookmark
Definition
review: product is distributed to reviewers who examine it and give feedback.
find the error in review make the cost less to fix than they would cost if they were found in test.
Software Review: systematic inspection of a software to find and resolve errors and defects in the software during the early stages of Software Development Life Cycle (SDLC).
All work products in a software project should be either reviewed (Static Test) or tested (Dynamic Test)
Static Test: usually performed manually to verify any type of documents (requirements , specifications ...etc)
abd qaddora changed 3 years agoView mode Like 1 Bookmark
Global varibels
__filename -> full fill path
__dirname -> parent folder full path
require -> global function used to import modules
module -> info about current module
process -> info about current the host device
Modules
1. make your modual
abd qaddora changed 3 years agoView mode Like Bookmark
Get DB Object
// Initialize Cloud Firestore and get a reference to the service
import { getFirestore } from "firebase/firestore";
const db = getFirestore(app);
Create Collection and add a Document into it
Collection create automatically when you add a document to it
import { collection, addDoc } from "firebase/firestore";
abd qaddora changed 3 years agoView mode Like Bookmark
Initialize App
initializeApp(firebaseConfig) ➡ This function return the firebase App object
A Firebase App is a container-like object that stores common configuration and shares authentication across Firebase services. After you initialize a Firebase App object in your code, you can add and start using Firebase services.
import { initializeApp } from 'firebase/app';
const app = initializeApp({
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
abd qaddora changed 3 years agoView mode Like Bookmark
Portals : provide a way to render an element outside the root div
ReactDOM.createPortal(child, container)
Child : is the element that you want to render outside the root
Container : is the container div that you want to render element inside it
HTML INDEX FILE WITH PORTAL DIV
<html>
abd qaddora changed 3 years agoView mode Like Bookmark
memento: a saved snapshot of the state of an object for possible later use
Shallow copy: copy just primitive data types
make the class implements the clonable interface
override method clone (Make it public)
when you want to copy an object just call the clone method
Deep copy: copy the object with all inner objects
how do we can perform deep copy?
by saving the object into a file and then read into another object.
abd qaddora changed 3 years agoView mode Like Bookmark