Tuesday, February 4, 2025

MAD2- List Of viva Questions

 MAD2- List Of viva Questions for Practice 

Questions Releated to VUE

1. What is vue?

2. What is a reactive framework?

3. What is memoization?

4. What is a rainbow table?

5. What is a v-cloak?

6. How can you access the server without using browser and Url?

7. Difference between v-if and v-show?

8.What are vue lifecycles and which all you used?

9.Explain how 'watch' works in vue and where you used it?

10.What are slots?

11.How to implement template inheritance functionality  in Vue? 

12.show me for-directive in vue code?

13.Routes in vue?

14.What are parent & child components?

15.Advantages of vue/react over javascript?

Questions Related to Backend Jobs

1. Difference between memoization and caching?

2. What is celery? Components of celery? Celery Beat?

3.Where did you implement caching?

4.Different btw memcached and redis cache?

5. What all celery jobs have you implemented explain?

6.How to shutdown celery task without using terminal?

7.what is memoization?

8.Explain the Crontab statement in the celery schedule?

Questions Related to DataBase

1. What was the default hashing algorithm in mad1?

2. What is sha26? Can it be decrypted back? How many hashing algorithms do you know?

3.If you want to change the database from sqlite to any other, what all changes should be made in the code?

4.How to index in sqlalchemy?

5.What is dataclass?

6.what is  on delete cascade ?

7.Questions on SQL concepts JOINS, Subquery, Aggregate functions, Group by, Having?

8.Difference of using local storage and cookies?

9.Explain your models?

Questions on HTML

1. What is ajax?

2. Questions on frontend like what type of styling have you used?

Questions Related to Flask

1.Is flask open source?

2.Is  flask use for large applications?

3.What is Api header?

4.How  auth token sent to api?

5.What's CORS?(Cross Object Resource Sharing)

Other Questions

1.What is the need of virtual environment?

2. In network tab of inspect after logging in, go to the payload section  password was visible, question was how to hide that ?

3. Implement a feature to send an email to user whenever a new show is released(BookMyShow App)?

4. What other things are you doing besides this degree? Why are you doing this degree?

5.what is exception class in python?

6.What are technologies used in the app?

7.What is  cron job?

Authentication Related Questions

1.How login/ authentication used in your app?

2.Validation in the form?

3 RoleBasedAccessControl how it's implemented?

--------------------------------------------------------

Questions asked by Level3_12-

 Q1- Viewed Models.py and asked what is parent child relationship?

 A parent-child relationship in models typically refers to a one-to-many or many-to-one  relationship between two tables in a database. The parent table holds the primary data, while  the child table contains related data and often includes a foreign key that references the parent  table.

 Q2- Definitions of ORM, Rest, MVC, DOM:

 ORM (Object-Relational Mapping): A technique that allows you to query and manipulate data  from a database using an object-oriented paradigm.

 REST (Representational State Transfer): An architectural style for designing networked  applications, relying on stateless, client-server communication, typically over HTTP.

 MVC (Model-View-Controller): A software architectural pattern that separates an application into  three interconnected components: Model (data), View (UI), and Controller (business logic).  DOM (Document Object Model): A programming interface for web documents. It represents the  page so that programs can change the document structure, style, and content.

 Q3- What is mvc, show which part of your code comes under model, and which one comes  under controller and view.

 MVC (Model-View-Controller):

 Model: The part of the code that handles data and business logic (e.g., models.py).

 View: The UI part of the code (e.g., HTML templates rendered with Jinja2).

 Controller: The part of the code that handles user input and interacts with the model to update  the view (e.g., Flask routes in app.py).

 Q4- What are Different types of requests?

 The most common types are GET, POST, PUT, DELETE, PATCH, OPTIONS, and HEAD. These  are HTTP methods used to perform operations in web applications.

 Q5- Is it possible to send data thru Get request?

 Yes, data can be sent through a GET request, typically via URL parameters (query strings).  However, it’s less secure compared to POST because the data is visible in the URL.  Q6- What is Get/post?

 GET: Used to request data from a server. The data is appended to the URL as query  parameters.

POST: Used to send data to the server, typically for creating or updating resources. The data is  sent in the body of the request.

 Q7- What is template inheritance and why is that used? , where template inheritance is used in  your code?

 Template Inheritance: Allows you to create a base template (e.g., layout.html) that other  templates can extend. This promotes code reuse and consistency across web pages.  Usage in Code: It is used in Jinja2 templates to manage common layouts and avoid code  duplication.

 Q8- What are JS tags?

 JS tags refer to <script> tags in HTML, used to include JavaScript code in a web page.

 Q9- What are Html ids and classes?

 ID: A unique identifier for an HTML element, used to style or manipulate that specific element.  Class: A way to define a group of elements that can share the same style or behavior.

 Q10- Differentiate between id and name attributes in form.

 ID: Uniquely identifies an element in the DOM. Useful for styling and scripting.

 Name: Used to reference form data after the form is submitted. It doesn’t have to be unique.

 Q11- What are different types of css and what is their precedence?

 Types:

 Inline CSS (applied directly to an element using the style attribute)

 Internal CSS (defined within a <style> tag in the HTML file)  External CSS (linked via a separate .css file)  Precedence: Inline > Internal > External.

 Q12- Order of inline, external, internal.

 Correct Precedence: Inline > Internal > External (based on specificity, inline styles override  others).

 Q13- How to call and handle JS function using ids.

 Call: Use document.getElementById('id').method() in your JavaScript code to target and  manipulate the element with a specific ID.

Q14- http and HTTPS n fullform, which one is best? Which one is more secure: HTTP or  HTTPS?

 HTTP (Hypertext Transfer Protocol)

 HTTPS (Hypertext Transfer Protocol Secure): HTTPS is more secure as it encrypts data,  providing secure communication over the network.

 Q15- Client server vs distributed architecture.

 Client-Server: A centralized architecture where clients request resources, and servers provide  them.

 Distributed Architecture: Resources and tasks are distributed across multiple servers, often in  different locations.

 Q16- What is Git n its uses, git is distributed or client server?

 Git: A distributed version control system used for tracking changes in source code during  software development.

 Distributed: Git allows each developer to have a complete copy of the repository.

 Q17- How does the network security work between client and server Explain the process.

 Network security involves encryption (e.g., SSL/TLS), secure protocols (e.g., HTTPS), and  authentication mechanisms to protect data integrity, confidentiality, and availability during  communication between client and server.

 Q18- Show the database.

 You would typically connect to the database via an ORM tool like SQLAlchemy in Flask to  retrieve and display data.

 Q19- What is the meaning of public and private campaigns?

 Public Campaigns: Accessible by anyone, visible to the public.

 Private Campaigns: Restricted access, visible only to authorized users or groups.

 Q20- How do we get an element of a particular ID or class in CSS?

 Use #id for IDs and .class for classes in your CSS to style the respective elements.

 Q21- What attribute do we use to start CSS in inline, internal, or external CSS?

 Inline: Use the style attribute directly on HTML elements.  Internal: Use the <style> tag in the <head> section.

External: Link an external stylesheet using the <link> tag.

 Q22- What symbol is used before ID and class in CSS? Where we should use id and where we  should prefer use of class?

 ID: Use # before an ID.

 Class: Use . before a class.

 Use Cases: IDs should be used for unique elements; classes should be used when you need to  apply the same styles to multiple elements.

 Q23- Is Git centralized or distributed?

 Distributed: Git allows multiple developers to work on the same project independently.

 Q24- What other functions does Git have apart from tracking?

 Functions: Branching, merging, version control, collaborative development, and history tracking.

 Q25- What are GET and POST, and what are their differences? Can we use GET to make  changes?

 GET: Retrieves data from the server, and should not be used to make changes.

 POST: Sends data to the server, typically to create or update resources. You should not use  GET to make changes due to security concerns.

 Q26- Can we submit data using GET?

 Yes, but it is not recommended for sensitive data as it is visible in the URL.

 Q27- What security measures does HTTPS use to ensure security?

 HTTPS uses SSL/TLS encryption, digital certificates, and secure key exchange mechanisms to  protect data.

 Q28- What technology is used for templating?

 Jinja2 is used for templating in Flask applications.

 Q29- Are class inheritance and template inheritance the same?

 No, class inheritance refers to object-oriented programming, while template inheritance refers to  reusing HTML structure in web development.

 Q30- What are sessions and cookies, and where are they stored?

 Sessions: Server-side storage for user data. A session ID is stored in a cookie on the  client-side.

 Cookies: Client-side storage for small pieces of data, often used for maintaining session state.

 Q31- What are the advantages of using template inheritance?

 Advantages: Code reusability, maintainability, and consistency across multiple web pages.

 Q32- What is restful API.

 A RESTful API is an application programming interface that follows REST principles, allowing  communication between clients and servers using HTTP methods.

 Q33- What is class and what is object.

 Class: A blueprint for creating objects in object-oriented programming.  Object: An instance of a class that contains data and methods.

 Q34- What are the benefits of using bootstrap.

 Benefits: Responsive design, pre-built components, cross-browser compatibility, and ease of  use.

 Q35- Which templating system is used in your code?

 Jinja2 is used in Flask.

 Q36- Define your database and models.

 The database is structured to store application data, with models defined using an ORM like  SQLAlchemy to represent database tables and their relationships.

 Q37- How you connect your database to your code?

 In Flask, the database is connected using a configuration setting that specifies the database  URI, and the ORM (e.g., SQLAlchemy) manages the connection.

 Q38- Something about class in javascript.

 A class in JavaScript is a blueprint for creating objects with shared properties and methods,  introduced in ES6.

 Q39- In many applications we see that if we login then we can perform tasks and have access  for a long time without getting logged out by itself, what do you think is behind this functionality?  How does this work?

 This functionality is managed by sessions or tokens. Sessions maintain state on the server-side,  while tokens (like JWT) are stored client-side and used for authentication. The session or token  persists across requests, allowing continuous access until it expires or the user logs out.

 *Questions for modifying code*-

 Q40- Change the backend such that the username of user is added in the uppercase only even  if the user provides input in mixed alphabets.

 Q41- Change the frontend such that users can only enter 10 letters as Username.

 Q42- Change the color of navba8r.

 Q43- He also asked me to perform some basic operations like creating campaigns, editing and  deleting them.

 Q44- Signup as sponsor and send ad_request.

 Q45- Restrict the full name to 10 characters. If the character count exceeds this limit, a warning  should be shown on the client side.

 Q46- Store the full name in all capital letters. 













No comments:

Post a Comment

Mangerial Economics Quiz1 solutions Guide

Mangerial Economics Quiz1 solutions Guide  solutions watch on you tube channel