- Be clear with requirements.
- get reference websites from the client
- Be very clear with the end of requirements. (How your website will look & how it will function at last.)
- Start with creating masters of the website, because they are the base of the project. masters like (Country, State, City), etc. (Masters according to projects)
- Masters are the base of the website. Be careful, clear with your masters.
- Developers must have meetings with clients at least once a week.
- Developer should not worry about the cost of the project & should ask Any questions about the project, features, no of expected users, High-end features (even if the client is not paying that much. dev should not worry about that. developers should worry about code, scalability)
- Ask client / Project manager if you want this feature, that features, roles and permission, delete options, etc.
- While understanding the requirements always go with real-life scenarios. (Like SRK, Salma, Amir Khan).
- Get Project Documentation from Manger / Co-ordinator OR form the responsible person
Sunday, 30 January 2022
Wednesday, 17 November 2021
How to introduce yourself?
Introduce yourself
Q. Interviewer Question: Do i want to hire this person? Give reasons why
interviewer should hire you?
---> Your name, Tech Stack you have worked on
---> Don't add clg name, place
---> YOu can add your frameworks
---> Avoid grammatical error
---> Add your load at very top.
---> Be very specific to the roles you are interviewing
---> Mentioned Few hobbies
---> Add things which can add value, so interview can talk to you more
---> Make your intro more intresting!
---> Add background if related
---> Try for 1 Mark Answer!
---> Also talk outside of tech at the end of intro. people want to work with
intresting people.
Q.) How to showcase project? ( 19 Nov 2021 )
1) Make a story on your project as well.
2) MVP
3) Can you explain your project in 30-40 sec. ( Showcase basic idea. )
4) Give Contetx About project
5) Login / Register basic Crud is present (add/edit/property) present
6) Show how the added property Looks like
7) Describe about map.
8) At last talk about your stack! talk imp
Saturday, 13 November 2021
How to host website on AWS
Launch an Instance
Choose Amazon Machine Image (AMI)
Choose EC2 Instance Types (General Purpose t2)
Configure Security Groups (Security Groups are like firewalls that define what
type of traffic we want to allow.)
Add InBound rules.
Review Instances
Click on Download Key Pair to download key pair and keep it safe.
After a successful launch of instance, you will be taken to the Instance screen.
When the status of Server change from pending to running, you can SSH into
your Server to perform access.
SSH into our machine and install the webserver.
Check your public address from instance details or assign an elastic IP.
you will get a .pem (Privacy Enhanced Maifile )
connect with ssh from a terminal
Now install apache on AWS & database
Install Nodejs ( node -v )
Install MongoDB
Install Pm2
Install Git
Host React JS App or other
After everything is installed Connect with Gitlab
Wednesday, 3 November 2021
Sunday, 17 October 2021
What is Redux? Why use Redux? When use Redux?
Why use Redux?
- Redux helps us to avoid the problem of prop drilling!
- Instead of asking data to parent components, you can directly get that from the store.
- Create Big apps with Redux if your app shares a lot of data between components you should use Redux.
- Store, Reducers, Actions, Constants
- Data can be separated using `Multiple reducers` & will be stored in a single Store.
- in Index.js import Provider & Store. And then Wrap <App /> component with Provider.
Redux Devtools Extension.
- To view states in our dev tools. you can see state movements.
- you have to add/connect your app redux dev tools extension.
- const store = createStore(rootReducer, composeWithDevTools());
Add to Cart Example:
- What is Action: Send data from React to Store. if you click on the `Add to cart` button data will be shown to the cart.
- Reducer: Gets data from action & pushes data to store. check for the action & push data accordingly!
- container:
- Connect React with Redux: (mapStateToProps & mapDispatchToProps)
- Shopping Types
- Shopping Actions
- Shopping Reducers
- Get to know about Connect function in Redux.
Amazed:
- By just adding `+` before `action.payload.qty` type `string` value has been converted to type `number`
console.log("action.payload.qty ===> ", action.payload, " type ===>",
typeof +action.payload.qty)
Friday, 15 October 2021
Hoisting In JavaScript
- Before saying anything checkout the below example.var x = 8;function getName(){console.log('My name in Rahul More');}getName();console.log(x)
- What do you think is the output of the above code?
Yes, you guess that right. you will get output as you guessed it right. - But here is a trick. what if we do something like this?getName();console.log(x)var x = 8;function getName(){console.log('My name in Rahul More');}
- Now can you guess what the will be the output?
It's running Function getName but we got `undefined` for x - But if we remove `x = 8` from we will get an error that `x is not defined`.
Undefined Vs Not Defined
- Accessing variables & functions before declaring is known as Hoisting in JS.
- the function is working as it is even if we moved that at TOP but Variable is not working properly.
- Even before executing the code memory got allocated for variables, functions for other things.
Tuesday, 12 October 2021
Asynchronous JavaScript & Event Loop
- Javascript is a Synchronous single-threaded language. it can do 1 thing at a time.
- Call stack present in the JS engine all code executes in the call stack.function a(){console.log('I am a()');}a();console.log('End')
- Whenever the js engine runs the code it runs from top to bottom. it runs line by line.
- Function a will be allocated memory & will be stored in call stack.
- a() will be pushed at a call stack & function a is executed. after executing a will be popped out from the call stack.
- And so on...
WEB API's
- setTimeOut()
- DOM API'S ( document.getElementByID() )
- fetch
- localStorage
- console
- location
These are not part of javascript, These are part of Browser. WEB API's present in the global object window.
window.console.log('Rahul More')
We can even write like this to get an appropriate output. but we don't have to write `window` each time because it's present in Global Object. so we can write it as
console.log('Rahul More')
Example
console.log('start');
setTimeout(function cb() {
console.log('Callback')
}, 5000);
// this will go to callstack after 5 seconds as we
// have passed this delay! Through the call back queue.
console.log('end');
The above code can generate output like this
Event Loop & Callback
- Callback goes the call stack through the callback queue.
- The event loop continuously checks in Callback QUEUE for callback & adds it to the call stack.
Call Back Queues
- A lot of calls back stored in CB queues & pushed into call stack one by one using an event loop.
Micro stack Queues.
- Fetch API.
- Fetch API doesn't work like other web APIs like setTimeOut(), DOM APIs, instead of fetch APIs go inside Micro stack Queue.
- It is like call back queue But has a higher priority than Call Back queue as you can see that in the image.
What comes inside Micro Stack Queues
- Promises
- Mutation Observer.
What comes inside Micro Stack Queues
- SetTimeOut
- DOM API'S.
Starvation.
- Suppose there are a lot of tasks in the Micro stack queue & one task is creating another task in the Micro stack queue then the task in the callback queue will not get a chance to execute because of priority reasons.
- This is known as starvation. starvation of the tasks inside the callback queues.