Specilist Engineer
LTIMindtreeSoftware Development Engineer (Full Stack)
Tata Consultancy ServicesSoftware Development Engineer (Frontend)
Opalina TechnologyFrontend Engineer
Lynkit
VSCode
Jira

snyk

Eclipse
Hi, my name is Adil, and I'm from India. Now, I have been living in Delhi for the last five years and working on React and JavaScript sites, actually. My tech stack is primarily React, JavaScript, and so on. Here, I'm working at TCS to manage client-side applications that use technologies like React, Node, and MongoDB. My domain of expertise is in the pharmaceutical industry. This is my introduction. Thank you.
For monitoring, we can use Node.js to print the paper trail to logging and use it for a longer period of time, so we'll save the database for everything. And for performance, we write the list called an e6 way backend service on the structured way to improve performance, and we write an asynchronous way to any issue.
How do you ensure that your components are using different projects? Ensure that your components are these are visible. And so the idea of the components are visible across different points. When we write components in real JS, we write in a way, like, my state component is different from the stateless component, so that we can pass data from one component to another component. So, suppose there's a form component or there's a UI component. We just change, so what we have created is a button component. We'll use this button component throughout our application. We pass it as a prop for styling or some width. So, this way, we can use the component throughout our application, the button component, or any other filled components. In this way, we can use them.
To improve the load time, we can implement lazy load in the ideas. So, we can use lazy load components, and you know, we can use the suppose we are loading the website, so there are different components. Every component, we can separate call from header, separate call from body, separate call from sidebar, there's a different call. So we can use an asynchronous way in that way. So every component faces data from the backend individually, and then the screen is rerendered, not at one time. There are some different timings. The header will load first and then just a fraction of a second later, the sidebar and the body will load. In this way, we can use a synchronized way to achieve this.
So SQL injections, when we post any data when we use any post method or any from postman to Node.js, and so we first of all check the validated data from suppose there was a 2-field input, number and email. So must be number field, must be type of number, and email field such with that email checker. We can use a validate checker so that we can verify the length of this field length of the variable so that we can not give the limit of the length, you can pass any string, any long string. Any okay. So in this way, we can reduce the SQL injection. We can check the length, type, and not just put raw data inside the MySQL. We have to check. We have to implement a middleware here. So we have to check every field. Every field. Not just blindly put the raw data coming from the front end to inside the database. So this way, we can prevent these SQL injections. We can check also there's another script from coming from any field from the UI side. So we had to check this thing.
For this, suppose my MongoDB connection is getting dropped or not active, MongoDB connection. So that time, we can get a 500 error. If my try catch is throwing an error, this might be some misconfiguration of the user model or we pass the parents as the IDs we are passing as the ID from UI, just get the user. And so this way, my try block gets fail, then we reach out to, then my call goes to the catch block, and they will send a 500 error. So this way, we can get a 500 error.
Here, suppose if you do not provide any ID, file update the user, then we go, then we get an error means, okay, then we fall when we do not provide any email and we just check, then we put the request, then we get an email is required. So we necessarily have the ID in params and body. We have applied to email so that it will work. And if this email is not and if the ID is not in my database, then we simply return user not found. So in this line, if user not found, then we do not update the user by ID and update. It will not work if the user is not found in my database. So this way, it might get wrong if the ID is not found in my database because we are going to update the user by ID and update. And if the ID is not present, then we will go wrong here. So we can ensure that here, the ID must be present in my database, then we can update this try block code. Then this code will work. Must be present the user ID. So here, this part gets wrong if the user is not found. We ensure that before we find the user by ID and update, we can also write a line above, "Find the user by ID." If the ID is found, then we go to update. If the ID is not found, then simply send the user not found. So this line, we can write in two lines.
For scaling a moment, we database, we can use MongoDB cluster to use multiple replicas, say, to scale the MongoDB. MongoDB minimum, we can amend a 3 node of the MongoDB to scale the applications. 3 node, at least 3 cluster we can use.
Yeah. When we try to, you know, when we don't try to organize the components or we don't check the rerendering happens, so they can then we can lose from a bottleneck because and suppose we are writing and we're using a useEffect hook and we pass an array, then my then this component is in the end, then it's after my application gets crashed. So we have to check we have to write when we write hooks in a hooks API and like when we write a very clear way and recheck again when we write this thing.
We can write a small functional component and then win together to add one component, so that we can reduce the class component to a functional component. So if for a class component, there are multiple responsibilities, then we can simply reduce the complexity into small React components. In this way, we can use this.