Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_96

Share your experience Add your viva experience here
215 Questions
20 Sets
0 Topics
0 Reviews
Tips for this examiner: Know your code thoroughly and ensure you have a reason for each decision you took

Student reviews

No student reviews for this proctor yet.

Approved viva sets

  1. 1
    level2
    Times asked 4
  2. 2
    Download project from portal
    Times asked 4
  3. 3
    Demonstrate the project
    Times asked 3
  4. 4
    Demonstrate daily reminder or monthly mail functionality
    Times asked 2
  5. 5
    Change daily reminder timing and show it
    Times asked 2
  6. 6
    Show mail and daily reminder working
    Times asked 2
  7. 7
    Login as doctor → go to Developer Tools → Applications → LocalStorage → change role to admin and update URL → why are you able to access admin screen?
    Times asked 2
  8. 8
    Where are all frontend URLs stored?
    Times asked 2
  9. 9
    Where is caching implemented in your project?
    Times asked 2
  10. 10
    When cache.clear() deletes all data, how will you clear cache for only one specific route (e.g., doctor edit)?
    Times asked 2
  11. 11
    What are the benefits of Vue.js (including from user perspective)?
    Times asked 2
  12. 12
    Difference between v-if and v-show in depth
    Times asked 2
  13. 13
    When to use which
    Times asked 2
  14. 14
    How to decide
    Times asked 2
  15. 15
    If you want to send data globally to all components, how will you do it?
    Times asked 2
  16. 16
    What is emit? Is it a variable or something else?
    Times asked 2
  17. 17
    Can Unique Key be used for making connections (relationships)?
    Times asked 2
Advice: The proctor was very polite and approachable, gave sufficient time to explain answers, and communicated well, but asked many in-depth questions.
  1. 1
    Why vue js
    Times asked 1
  2. 2
    Diff btw v-if v-show
    Times asked 2
  3. 3
    Given a senstitive info senario ,v-if v-show which would u use and why
    Times asked 2
  4. 4
    Asked about models(will be impressed if normalized and scalable)
    Times asked 2
  5. 5
    Asked to change nav bar color to red
    Times asked 2
  6. 6
    Asked about benefits of vue js
    Times asked 2
  7. 7
    Asked about virtual doom
    Times asked 2
  8. 8
    Diff btw primary key vs unique key
    Times asked 1
  9. 9
    What is used to update value from child component to parent component(this.emits() )
    Times asked 2
  10. 10
    What is this.emits() means
    Times asked 1
  11. 11
    Asked to show signin vue and asked about show signin route js fetch request code
    Times asked 2
  12. 12
    Asked to demo celery monthly report,remainder for student.
    Times asked 2
Advice: He is chill guy,he focus on core functionality demo and theory,not much of code change ,just read the previous questions, you are good to go
  1. 1
    15 min late Intro first 1.id verification 2.full Demo 3.change navbar bg colour to red 4.SHow caching in ur project
    Times asked 1
  2. 2
    explain a line of code from login.vue 8.Questions from models.py
    Times asked 2
  3. 3
    v-if vs v-show (when to use v-show)
    Times asked 1
  4. 4
    Virtual DOM Thats all i remember, Viva over in 30 mins
    Times asked 1
Advice: Just chill and go through all the previously asked questions. you will pass easily. ALL THE BEST
  1. 1
    Be thoroughly familiar with your code, especially the database implementation, as the examiner places significant emphasis on it.
    Times asked 2
  2. 2
    Expect detailed questions about every aspect of your code. You must have a solid reason for each choice, or else he will point out why it is a bad approach. 3.simple tasks like changing the background color
    Times asked 2
  3. 3
    If you struggle with implementation, the examiner may shift to theory-based questions. Happened in my case
    Times asked 2
Advice: Know your code thoroughly and ensure you have a reason for each decision you took
  1. 1
    Introduce my app
    Times asked 2
  2. 2
    Benefits of using VueJS
    Times asked 2
  3. 3
    Why do we use VueJs rather than other JavaScript frameworks?
    Times asked 2
  4. 4
    If you add new data in a table for which cache is already there, so cache will have old data. What to do in the backend?
    Times asked 2
  5. 5
    Change in CSS for navbar
    Times asked 2
  1. 1
    Demonstration of all the functionalities of project
    Times asked 2
  2. 2
    which tokenization are you using
    Times asked 2
  3. 3
    tested the page which can only be accessed by admin by copying the URL and opening it in the incognito mode
    Times asked 2
  4. 4
    what is virtualDOM
    Times asked 2
  5. 5
    how does a parent communicates with a child
    Times asked 2
  6. 6
    how do we pass props
    Times asked 2
  7. 7
    give me an example where you will use v-if vs v-show
    Times asked 2
  8. 8
    asked me to change the colour of navbar
    Times asked 2
  9. 9
    tell me about redis and how u used it in your project?
    Times asked 1
  10. 10
    tell me about message broker
    Times asked 2
  11. 11
    async functions in JS
    Times asked 2
  12. 12
    ...it went smooth he was very calm and understanding.
    Times asked 2
  1. 1
    1.Vast demo of application
    Times asked 2
  2. 2
    2.Ask about how your access tokens are working?
    Times asked 2
  3. 3
    3.Redis
    Times asked 2
  4. 4
    4.Vue-Props
    Times asked 2
  5. 5
    5.which function will you use to pass data child to parent?
    Times asked 2
  6. 6
    6.Vuex and vue-routers
    Times asked 2
  7. 7
    8.full knowledge of database
    Times asked 2
  8. 8
    9.Primary ,unique and foreign keys
    Times asked 2
  9. 9
    10.Authorization and Authentication
    Times asked 2
  10. 10
    11.Some questions from javascript itself like event-loop ,promises
    Times asked 2
  11. 11
    12.v-if and v-show
    Times asked 2
  1. 1
    Demaonstration of app with showing every feature in detail.
    Times asked 2
  2. 2
    What is vuejs?
    Times asked 2
  3. 3
    Why do we use vuejs , HTML CSS not enough?
    Times asked 2
  4. 4
    Why vue and not react?
    Times asked 2
  5. 5
    My project : https://youtu.be/m1PYFowZMYU?si=wN7D54LutjL7Ppm4
    Times asked 2
  1. 1
    Vue vs Vuex
    Times asked 1
    Official solution

    SimpleUngli rakhe to 4-line formula — panic ki jagah structure.

    1) File ka role: model / Flask route / Vue SFC / celery task / config
    2) Input kahan: JSON, params, token, props, $route
    3) Kya kaam: query, cache, validation, .delay()
    4) Output: jsonify, this.items, email, redirect

    Unknown keyword: import, decorator, if, commit — har ka reason. Bluff mat.

    Suggested flow1) Kaunsi layer?
    2) Input?
    3) DB/cache/task?
    4) Response/UI?

    Project example: Booking POST: jwt, seats check, commit, 201, Vue list push.

    Viva tipUnknown keyword: import, decorator, if, commit — har ka reason. Panic mat.

  2. 2
    Fetch and Promise
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  3. 3
    Var vs let
    Times asked 1
    Official solution

    SimpleUngli rakhe to 4-line formula — panic ki jagah structure.

    1) File ka role: model / Flask route / Vue SFC / celery task / config
    2) Input kahan: JSON, params, token, props, $route
    3) Kya kaam: query, cache, validation, .delay()
    4) Output: jsonify, this.items, email, redirect

    Unknown keyword: import, decorator, if, commit — har ka reason. Bluff mat.

    Suggested flow1) Kaunsi layer?
    2) Input?
    3) DB/cache/task?
    4) Response/UI?

    Project example: Booking POST: jwt, seats check, commit, 201, Vue list push.

    Viva tipUnknown keyword: import, decorator, if, commit — har ka reason. Panic mat.

  4. 4
    cookies and JWT implementation
    Times asked 1
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  5. 5
    sending data over form
    Times asked 1
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  6. 6
    What is Routes and Route.js file
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  1. 1
    level2
    Times asked 4
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    Download project from portal
    Times asked 4
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  3. 3
    Demonstrate the project
    Times asked 3
    Official solution

    SimpleDemo script pehle se practice karo, 5-7 minute, saari roles.

    Suggested flow

    1) Register/login user 2) Admin login — CRUD 3) Approval/blacklist 4) Booking/apply 5) Search 6) Validation edge (slots 0, duplicate) 7) Logout
    Bolte-bolte dikhao: 'Yahan overbooking rokta hoon'. Code tab kholna jab poochhein.
    Crash ho to debug calmly: terminal error, typo, DB path.
    Mandatory features skip mat karna — examiner list tick karta hai.

  4. 4
    Demonstrate daily reminder or monthly mail functionality
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  5. 5
    Change daily reminder timing and show it
    Times asked 2
    Official solution

    SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.

    Scheduled vs user-triggered dono dikhao. Missing feature honestly.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) redis
    2) worker
    3) beat
    4) crontab now
    5) logs + MailHog

    Example

    CELERY_BEAT_SCHEDULE = {
      'daily-reminder': {
        'task': 'jobs.daily_reminder',
        'schedule': crontab(hour=18, minute=0),
      },
    }

    Project example: Change schedule current time. MailHog. Export button 202.

  6. 6
    Show mail and daily reminder working
    Times asked 2
    Official solution

    SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.

    Scheduled vs user-triggered dono dikhao. Missing feature honestly.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) redis
    2) worker
    3) beat
    4) crontab now
    5) logs + MailHog

    Example

    CELERY_BEAT_SCHEDULE = {
      'daily-reminder': {
        'task': 'jobs.daily_reminder',
        'schedule': crontab(hour=18, minute=0),
      },
    }

    Project example: Change schedule current time. MailHog. Export button 202.

  7. 7
    In appointment table, why did you use separate date and time columns instead of a single datetime?
    Times asked 1
    Official solution

    SimpleAlag date/time: filter aaj ke shows, forms alag. Single DateTime sorting easy. Honest.

    Why separate date and time columns.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: If one datetime, say that.

  8. 8
    Login as doctor → go to Developer Tools → Applications → LocalStorage → change role to admin and update URL → why are you able to access admin screen?
    Times asked 2
    Official solution

    SimplelocalStorage browser mein key-value string store karta hai — tab band hone pe bhi rehta hai. Token/theme ke liye use.

    Example

    localStorage.setItem('token', jwt)
    const t = localStorage.getItem('token')
    localStorage.removeItem('token')

    Viva tipSensitive password mat rakho. XSS se steal ho sakta hai — HttpOnly cookie safer for session.

  9. 9
    Where are all frontend URLs stored?
    Times asked 2
    Official solution

    SimpleUngli rakhe to 4-line formula — panic ki jagah structure.

    1) File ka role: model / Flask route / Vue SFC / celery task / config
    2) Input kahan: JSON, params, token, props, $route
    3) Kya kaam: query, cache, validation, .delay()
    4) Output: jsonify, this.items, email, redirect

    Unknown keyword: import, decorator, if, commit — har ka reason. Bluff mat.

    Suggested flow1) Kaunsi layer?
    2) Input?
    3) DB/cache/task?
    4) Response/UI?

    Project example: Booking POST: jwt, seats check, commit, 201, Vue list push.

    Viva tipUnknown keyword: import, decorator, if, commit — har ka reason. Panic mat.

  10. 10
    Where is caching implemented in your project?
    Times asked 2
    Official solution

    SimpleHaan Redis routes X demo hit miss. Nahi: kaise add karte — decorator + redis + invalidation.

    Don't lie. Examiner code dekhega.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: If yes open decorator. If no 4-step plan.

  11. 11
    When cache.clear() deletes all data, how will you clear cache for only one specific route (e.g., doctor edit)?
    Times asked 2
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  12. 12
    What are the benefits of Vue.js (including from user perspective)?
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  13. 13
    Difference between v-if and v-show in depth
    Times asked 2
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  14. 14
    When to use which
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  15. 15
    How to decide
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  16. 16
    In Vue.js, how do you pass data between different components (props, emit)?
    Times asked 1
    Official solution

    SimpleProps parent→child values. Emit child→parent signal. Basic communication.

    Difference props and emit.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: Card props venue emit select.

  17. 17
    If you want to send data globally to all components, how will you do it?
    Times asked 2
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  18. 18
    What is emit? Is it a variable or something else?
    Times asked 2
    Official solution

    Simpleemit = child parent ko chillata hai: 'delete 5'. Props down, events up.

    this.$emit('delete', id). Parent @delete="removeRow".

    Grandchild: chain emit ya Vuex/provide.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    this.$emit('delete', id)
    // parent: <Child @delete="removeRow" />

    Project example: BookingRow emit cancel → parent list se hata + API DELETE.

  19. 19
    Can Unique Key be used for making connections (relationships)?
    Times asked 2
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
Advice: The proctor was very polite and approachable, gave sufficient time to explain answers, and communicated well, but asked many in-depth questions.
  1. 1
    First demo
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    Diff btw v-if v-show
    Times asked 2
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  3. 3
    Given a senstitive info senario ,v-if v-show which would u use and why
    Times asked 2
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  4. 4
    Asked about models(will be impressed if normalized and scalable)
    Times asked 2
    Official solution

    SimpleNormalisation: redundant data kam, tables todna. 1NF atomic, 2NF partial dep hatao, 3NF transitive dep hatao.

    Viva tip

    Exampleuser address alag table vs har booking mein dubara store.

  5. 5
    Asked to change nav bar color to red
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  6. 6
    Asked about benefits of vue js
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  7. 7
    Asked about virtual doom
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  8. 8
    What is used to update value from child component to parent component(this.emits() )
    Times asked 2
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  9. 9
    Asked to show signin vue and asked about show signin route js fetch request code
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  10. 10
    Asked to demo celery monthly report,remainder for student.
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

Advice: He is chill guy,he focus on core functionality demo and theory,not much of code change ,just read the previous questions, you are good to go
  1. 1
    explain a line of code from login.vue 8.Questions from models.py
    Times asked 2
    Official solution

    Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  2. 2
    what is vue js and its advantages
    Times asked 1
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

Advice: Just chill and go through all the previously asked questions. you will pass easily. ALL THE BEST
  1. 1
    Be thoroughly familiar with your code, especially the database implementation, as the examiner places significant emphasis on it.
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  2. 2
    Expect detailed questions about every aspect of your code. You must have a solid reason for each choice, or else he will point out why it is a bad approach. 3.simple tasks like changing the background color
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  3. 3
    If you struggle with implementation, the examiner may shift to theory-based questions. Happened in my case
    Times asked 2
    Official solution

    SimpleTheory = concepts: ORM, MVC, auth vs authz, Jinja inheritance, sessions. 1-line def + project example.

Advice: Know your code thoroughly and ensure you have a reason for each decision you took
  1. 1
    Introduce my app
    Times asked 2
    Official solution

    Simple30 second: naam, degree, project kya hai, stack (Flask + Jinja + SQLAlchemy + SQLite).

    Example

    Main Priya, IITM BS. MAD1 mein parking/ticket app — Flask backend, Jinja templates, session login, SQLite.
  2. 2
    Virtual DOM
    Times asked 1
    Official solution

    SimpleVirtual DOM memory tree. Diff, sirf farq real DOM pe. Fayda kam DOM ops. Nuksaan chhote page overhead.

    Vue/React. jQuery direct DOM. Lose reactivity Vue2 new property bina set.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: v-for list patch, poora innerHTML nahi.

  3. 3
    Benefits of using VueJS
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  4. 4
    Why do we use VueJs rather than other JavaScript frameworks?
    Times asked 2
    Official solution

    SimpleVue React Angular UI frameworks. Vue course choice.

    What are JavaScript frameworks.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Project example: Vue.

    Project example: Vue.

  5. 5
    Primary key vs Unique key
    Times asked 1
    Official solution

    SimplePrimary key row ka unique identity — usually id Integer autoincrement.

    Example

    id = db.Column(db.Integer, primary_key=True)
  6. 6
    Show database models
    Times asked 1
    Official solution

    Simplemodels.py har table ki class hai — columns, PK/FK, relationships. Yeh Model layer hai.

    Viva mein file khol ke bolo:
    1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
    2) Har table ka kaam 1 line
    3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
    4) Constraints: unique email, nullable, default status

    Example skeleton

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True, nullable=False)
        role = db.Column(db.String(20), default='user')
        bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')

    ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
    Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.

  7. 7
    If you add new data in a table for which cache is already there, so cache will have old data. What to do in the backend?
    Times asked 2
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  8. 8
    Change in CSS for navbar
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  1. 1
    Demonstration of all the functionalities of project
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    which tokenization are you using
    Times asked 2
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  3. 3
    tested the page which can only be accessed by admin by copying the URL and opening it in the incognito mode
    Times asked 2
    Official solution

    SimpleServer-Sent Events: server → browser one-way stream (text/event-stream). WebSocket full duplex hai; SSE simpler notifications ke liye.

    Example

    # client
    const es = new EventSource('/stream');
    es.onmessage = (e) => console.log(e.data);
  4. 4
    what is virtualDOM
    Times asked 2
    Official solution

    SimpleVirtual DOM = UI ka lightweight JS copy. Change pe diff → minimal real DOM update. Vue/React isliye tez re-render.

  5. 5
    how does a parent communicates with a child
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  6. 6
    how do we pass props
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  7. 7
    difference between primary key and unique key
    Times asked 1
    Official solution

    SimplePrimary Key table ki main identity hai (ek hi), Unique Key extra unique column ho sakta hai (kai).

    PK: NOT NULL + UNIQUE, sirf ek clustered identity. Example: id
    Unique: duplicate nahi, lekin NULL allow ho sakta hai. Example: email, username

    UNIQUE + NOT NULL + AUTO_INCREMENT PK jaisa behave karta hai, lekin table ki official PK nahi. Relationships/FK generally PK ko refer karti hain.
    Isliye alag Primary Key rakhna better hai.

  8. 8
    give me an example where you will use v-if vs v-show
    Times asked 2
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  9. 9
    asked me to change the colour of navbar
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  10. 10
    tell me about message broker
    Times asked 2
    Official solution

    SimpleRedis. Alternative RabbitMQ. Course Redis because cache bhi.

    Between Flask client and Celery worker.

    Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.

    Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: broker_url redis://localhost:6379/0

  11. 11
    async functions in JS
    Times asked 2
    Official solution

    Simpleasync function promise return karti hai. await us promise ka result wait karta hai — callback hell kam.

    Example

    async function loadLots() {
      const res = await fetch('/api/lots');
      const data = await res.json();
      return data;
    }
  12. 12
    ...it went smooth he was very calm and understanding.
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  1. 1
    1.Vast demo of application
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    2.Ask about how your access tokens are working?
    Times asked 2
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  3. 3
    3.Redis
    Times asked 2
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  4. 4
    4.Vue-Props
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  5. 5
    5.which function will you use to pass data child to parent?
    Times asked 2
    Official solution

    SimpleChild → parent: $emit / defineEmits. Parent @event sunta hai.

    Example

    // child
    this.\$emit('saved', payload)
    // parent
    <Child @saved="onSaved" />
  6. 6
    6.Vuex and vue-routers
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  7. 7
    7.what is vuejs and their benifits?
    Times asked 1
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  8. 8
    8.full knowledge of database
    Times asked 2
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  9. 9
    9.Primary ,unique and foreign keys
    Times asked 2
    Official solution

    SimpleForeign key dusri table ke PK ko point karti hai — relationship banati hai.

    Example

    lot_id = db.Column(db.Integer, db.ForeignKey('lot.id'), nullable=False)
  10. 10
    10.Authorization and Authentication
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  11. 11
    11.Some questions from javascript itself like event-loop ,promises
    Times asked 2
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  12. 12
    12.v-if and v-show
    Times asked 2
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  1. 1
    Demaonstration of app with showing every feature in detail.
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    What is callback function?
    Times asked 1
    Official solution

    SimpleCallback = function jo baad mein call hoti hai jab async kaam complete. Example: setTimeout(fn, 1000).

    Example

    function done(err, data) { if (err) return console.error(err); console.log(data); }
    fs.readFile('a.txt', done)
  3. 3
    What is vuejs?
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  4. 4
    Why do we use vuejs , HTML CSS not enough?
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  5. 5
    Why vue and not react?
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  6. 6
    What is redis?
    Times asked 3
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  7. 7
    What is celery?
    Times asked 6
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  8. 8
    My project : https://youtu.be/m1PYFowZMYU?si=wN7D54LutjL7Ppm4
    Times asked 2
    Official solution

    SimpleHTTP postcard (koi padh le). HTTPS envelope (TLS lock).

    Same headers, encrypted channel. MITM se password/token bachao. Local viva HTTP OK.

    HTTP/1.1 version keep-alive. TCP neeche, TLS security layer, SMTP mail alag.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: Dev localhost http. Production https:// + cert.

    Viva tipProtocols: HTTP/HTTPS app, TCP transport, TLS security, SMTP mail. HTTP/1.1 version — persistent connections.

  1. 1
    Show your project (demonstration) , add new user , new venue , new show and book ticket from new user, what If you delete movie, will the bookings be still there ? , what if I changed the seat = 1, will the existing bookings be cancelled ? , show SQL models and why I used static password for admin, should have used a role column in the table, what if you copy pasted localhost/user to other browser, will I still be able to bypass login ? show all components, explain all directives , why use vue-cli vs vue-cdn , have you done any logging , what is localstorage, session storage , cookies , where you used fetch api in ur components, show all components, open package.json and explain all the packages used , feedback : excellent done but you have to look from the user prospective and also do normalisation to scale ur application.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  1. 1
    Demonstrate your complete application.
    Times asked 7
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search + charts
    6) CSV export / email job
    7) Logout

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  2. 2
    Create a new user, venue, show, and complete a booking.
    Times asked 1
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search + charts
    6) CSV export / email job
    7) Logout

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  3. 3
    What should happen to bookings if a movie/venue is deleted?
    Times asked 1
    Official solution

    SimpleBlock delete if bookings; cascade cancel; soft-delete. Soft + restrict viva-safe.

    Admin deletes venue with bookings. Movie/venue delete policy.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Your ondelete + message.

  4. 4
    If the total seats for a show are reduced below the number of existing bookings, how would you handle it?
    Times asked 1
    Official solution

    SimpleIf new_capacity < booked: reject or cancel extras. Constraint capacity >= sum.

    Seats reduced below bookings.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Validate update show.

    Project example: Validate update show.

  5. 5
    Show your database models and explain your design decisions.
    Times asked 1
    Official solution

    Simplemodels.py tour + draw. Design decisions unique/cascade.

    SQL models = same.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: 3 relationships explain.

  6. 6
    Why did you use separate date and time columns instead of a single datetime column?
    Times asked 1
    Official solution

    SimpleAlag date/time: filter aaj ke shows, forms alag. Single DateTime sorting easy. Honest.

    Why separate date and time columns.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: If one datetime, say that.

  7. 7
    Show all Vue components.
    Times asked 1
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  8. 8
    Show where all frontend routes/URLs are defined.
    Times asked 1
    Official solution

    SimpleVue router.js. Flask @app.route / resources.py.

    Both if asked frontend vs backend.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Don't mix.

    Project example: Don't mix.

  9. 9
    Show where you implemented caching.
    Times asked 1
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  10. 10
    Demonstrate daily reminders/monthly reports.
    Times asked 1
    Official solution

    SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.

    Scheduled vs user-triggered dono dikhao. Missing feature honestly.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) redis
    2) worker
    3) beat
    4) crontab now
    5) logs + MailHog

    Example

    CELERY_BEAT_SCHEDULE = {
      'daily-reminder': {
        'task': 'jobs.daily_reminder',
        'schedule': crontab(hour=18, minute=0),
      },
    }

    Project example: Change schedule current time. MailHog. Export button 202.

  11. 11
    Change the reminder schedule and demonstrate it working.
    Times asked 1
    Official solution

    SimpleSchedule current time / har minute, beat restart, logs + MailHog.

    Don't forget worker. Crontab fields. Demo ke baad revert if asked.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Example

    crontab(hour=17, minute=20)
    crontab(minute='*/1')
    @celery.task
    def add(a, b):
        return a + b

    Project example: CELERY_BEAT_SCHEDULE edit. Terminal beat 'Sending due task'.

  12. 12
    Show how emails are sent.
    Times asked 1
    Official solution

    SimpleMAIL config Message MailHog. Show how emails sent SMTP. Show Celery-generated emails. Where email sending logic.

    tasks.py + MailHog.

    Flask-Mail / SMTP se mail. Local MailHog fake server: SMTP 1025, UI 8025 — internet nahi, viva safe.

    Asli send Celery task mein, request thread mein nahi. Beat 6pm reminder, export ke baad CSV attach optional.

    MAIL_SERVER localhost demo. Gmail SMTP student account pe block common. Body mein user name personalization examiner dekhta hai.

    Project example: screenshot 8025.

  13. 13
    Change the navbar color/background.
    Times asked 1
    Official solution

    Simplenav.navbar background or navbar-dark bg-primary / custom CSS.

    Don't change unrelated buttons unless asked.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Inspect nav class.

    Project example: Inspect nav class.

  14. 14
    Change simple frontend styling (e.g., background color).
    Times asked 1
    Official solution

    Simplebody background or one div. Smallest CSS win. Change simple frontend styling background.

    Don't restyle whole app.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: App.vue.

    Project example: App.vue.

  15. 15
    If cache already contains old data after inserting new records, how would you update it?
    Times asked 1
    Official solution

    SimpleInsert ke baad wait timeout mat. Write pe delete/update key.

    Classic follow-up.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: POST then immediately GET fresh.

  16. 16
    Instead of calling cache.clear(), how would you clear cache for only one specific route?
    Times asked 1
    Official solution

    Simplecache.delete(key) / delete_memoized. clear() nuclear.

    Instead of clear, targeted. Examiner 'only one route'.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: delete key_prefix venues not cache.clear().

  17. 17
    What is Vue.js?
    Times asked 5
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  18. 18
    Why did you choose Vue instead of React?
    Times asked 2
    Official solution

    SimpleCourse + SFC + docs + SPA milestone. React bhi SPA conceptually.

    Frontend design: role dashboards, navbar reuse, charts admin.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id$route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: package.json vue. Don't trash React.

  19. 19
    Why use Vue instead of plain HTML/CSS/JavaScript?
    Times asked 1
    Official solution

    SimpleState, components, router — maintainable SPA. Plain JS DOM hell.

    Possible theoretically, course Vue maangta.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id$route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: v-for vs innerHTML.

  20. 20
    What are the advantages of Vue.js?
    Times asked 1
    Official solution

    SimpleGentle curve, SFC, docs, reactivity, chhota vs Angular. Over React: HTML templates, course.

    Over plain JS: components router ecosystem.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id$route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: Justify Vue not React: taught + time.

  21. 21
    What is the Virtual DOM?
    Times asked 1
    Official solution

    SimpleVirtual DOM memory tree. Diff, sirf farq real DOM pe. Fayda kam DOM ops. Nuksaan chhote page overhead.

    Vue/React. jQuery direct DOM. Lose reactivity Vue2 new property bina set.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: v-for list patch, poora innerHTML nahi.

  22. 22
    What are the advantages and disadvantages of the Virtual DOM?
    Times asked 1
    Official solution

    SimpleFayde batched DOM. Nuksaan memory tiny pages overhead. Direct DOM sometimes faster micro.

    Advantages disadvantages Virtual DOM.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Why Vue still worth.

  23. 23
    What is the difference between v-if and v-show?
    Times asked 6
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  24. 24
    In which scenarios would you prefer v-if over v-show (or vice versa)?
    Times asked 1
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  25. 25
    Explain all Vue directives.
    Times asked 1
    Official solution

    Simplev-if v-else v-show v-for v-bind v-on v-model v-html v-slot. Project se 3 example.

    Directives Vue ke special attributes hain — HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Project example: Related .vue template: v-for list, v-model form, v-if admin.

  26. 26
    Difference between Vue CLI and Vue CDN.
    Times asked 5
    Official solution

    SimpleCDN = Vue script tag se, jaise pen drive. CLI/Vite = poori factory (SFC, npm, bundle).

    CDN: no build, chhote apps, exam PC pe Node nahi to bhi chal. Weak: no .vue compile, 3rd-party cache, scale/team.

    CLI/Vite: Single File Components, env, code-split, production dist/. Scalable.

    Examiner 'which + why' — jo use kiya wahi justify, doosra naam rato mat.

    Example

    <!-- CDN -->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    
    # Vite
    npm run dev
    npm run build

    Project example: CDN: index.html unpkg vue. CLI: package.json, npm run serve / vite.

    Viva tipCDN scalable large teams ke liye weak (no SFC compile, caching 3rd party). Examiner 'which + why' poochta hai — jo use kiya wahi justify karo.

  27. 27
    How do components communicate in Vue?
    Times asked 2
    Official solution

    SimpleBaat: props se neeche, emit se upar. Door ke rishte: store ya provide/inject.

    Grandparent→grandchild props drilling ugly. Vuex/Pinia ya provide('user').

    Did you use? List+card files naam lo.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Example

    provide('user', user)
    const user = inject('user')

    Project example: Dashboard v-for BookingCard. Card emit 'cancel'.

    Viva tip3+ level props drilling se better store. Navbar user info store se lo.

  28. 28
    What is emit() / this.$emit()?
    Times asked 1
    Official solution

    Simpleemit = child parent ko chillata hai: 'delete 5'. Props down, events up.

    this.$emit('delete', id). Parent @delete="removeRow".

    Grandchild: chain emit ya Vuex/provide.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    this.$emit('delete', id)
    // parent: <Child @delete="removeRow" />

    Project example: BookingRow emit cancel → parent list se hata + API DELETE.

  29. 29
    How do you share data globally across all Vue components? (Vuex/Pinia)
    Times asked 1
    Official solution

    SimplePinia naya store: mutations nahi, seedha state. Vue 3 recommended.

    defineStore. Vuex vs Pinia: naya project Pinia. Purana Vuex valid.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: stores/user.js. Agar Vuex hai to Pinia ka naam mat lo unless used.

  30. 30
    Why did you use a static admin account instead of storing roles in the database?
    Times asked 1
    Official solution

    SimpleAssignment speed. Limitation one admin. Could migrate roles table. If DB roles, opposite.

    Why static admin vs roles in DB.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Honest your seed.

  31. 31
    If someone copies the /user URL into another browser, can they bypass login?
    Times asked 1
    Official solution

    SimpleDoosre browser /user paste: token nahi → login. Guard + 401. Hash route sirf UI.

    APIs protect. Hide-only security nahi.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Incognito URL dashboard → redirect / 401.

  32. 32
    If a user changes their role in Local Storage (e.g., from doctor to admin), why are they able or unable to access admin pages?
    Times asked 1
    Official solution

    SimpleLS mein role=admin likhne se API nahi maanti. Signature + DB role.

    Frontend v-if UX. Demo 403 Network. Authorization server pe.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Application LS edit role, admin API 403, UI maybe fool.

    Viva tipIsliye authorization hamesha server pe. Frontend v-if sirf button hide karta hai, data leak nahi rokta.

  33. 33
    Where is authentication enforced in your application?
    Times asked 1
    Official solution

    SimpleAuthentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot / venue / drive delete kar sakta hai, normal user nahi.

    MAD2 mein yeh alag layers hain: login API = authentication (JWT milta hai). @roles_required('admin') ya Vue v-if="isAdmin" = authorization.

    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+). Authentication identity hai, authorization permission, validation input quality.

    Example

    # Authentication
    if user and check_password_hash(user.password, form_password):
        token = create_access_token(identity=user.id)
    
    # Authorization
    if current_user.role != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: Student login = authentication. Student admin dashboard nahi khol sakta = authorization. Frontend button hide sirf UX hai — asli check backend pe hona chahiye.

    Viva tip401 = not logged in / bad token. 403 = logged in, role galat. Examiner yeh difference bahut poochta hai.

  34. 34
    Show your SQL models.
    Times asked 1
    Official solution

    Simplemodels.py tour + draw. Design decisions unique/cascade.

    SQL models = same.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: 3 relationships explain.

  35. 35
    Why did you design your database this way?
    Times asked 1
    Official solution

    SimpleNormalize booking integrity roles M-M. Tradeoffs date vs datetime. Honest.

    Why designed database this way.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: 3 decisions.

    Project example: 3 decisions.

  36. 36
    Difference between Primary Key and Unique Key.
    Times asked 1
    Official solution

    SimplePK row ka aadhaar number. FK doosre ke aadhaar ka reference. Unique alag constraint.

    PK chosen candidate key, identity, ORM expect. UNIQUE+NOT NULL+AUTO_INCREMENT almost lekin PK use karo.

    Relationship FK+PK. Unique email alag.

    Example

    user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete='CASCADE'))

    Project example: id PKs. FKs user_id. email unique.

    Viva tipPK = chosen candidate key. UNIQUE+NOT NULL+AUTO_INCREMENT almost PK jaisa but PK table ka identity + default cluster/index + ORM expect karta hai.

  37. 37
    Can a Unique Key be used to define relationships between tables?
    Times asked 1
    Official solution

    SimpleUnique identity nahi FK substitute. Unique extra (email) or 1-1 on FK.

    Can unique key define relationships? No, use FK.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: email unique not a relationship.

  38. 38
    How would you normalize your database to improve scalability?
    Times asked 1
    Official solution

    Simple1NF-3NF atomic no partial/transitive. Association M-M. Lookup tables. Kam anomalies.

    How normalize improve scale. Why db design this way: FKs not duplicate strings.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: roles_users not role string on every user only — actually we have Role table.

  39. 39
    What is Redis?
    Times asked 21
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  40. 40
    What is Celery?
    Times asked 19
    Official solution

    SimpleCelery = background naukri. HTTP request ko 10 second email bhejne ke liye mat rokna.

    Distributed task queue: aap function ko abhi nahi, worker process mein later/retry/schedule pe chalaate ho.

    MAD2 typical jobs: daily reminder mail, monthly HTML report, user-triggered CSV export.

    Web request 200ms hona chahiye. 10,000 emails request thread mein = timeout. Worker alag CPU pe kaam kare.

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

    @celery.task
    def daily_reminder():
        for u in User.query.filter_by(active=True):
            send_mail(u.email, 'Book something today!')

    Project example: User Export click → 202 Accepted. Worker CSV + email. Daily 6pm Beat reminder.

    Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.

  41. 41
    Where have you implemented caching?
    Times asked 7
    Official solution

    SimpleGET lists/stats @cache.cached. Mutations pe delete. CACHE_TYPE Redis.

    Why each route: public repeated reads. User-private careful.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: File+line decorator. redis-cli get key optional.

  42. 42
    How do you invalidate stale cache when the database changes?
    Times asked 1
    Official solution

    SimpleDB badli to purani copy phenk do, warna user jhooth dekhega.

    Invalidation = cache key delete/update after create/update/delete.

    Options: (1) cache.delete('venues') targeted (2) timeout auto-expire (3) cache.clear() nuclear — baaki routes bhi miss ho jaayenge.

    Examiner: 'naya record insert kiya, cache purana' — write route mein delete dikhao, phir GET miss+hit demo.

    Example

    @app.route('/api/venues', methods=['POST'])
    def create_venue():
        db.session.add(v)
        db.session.commit()
        cache.delete('venues')
        return jsonify(msg='created'), 201

    Project example: POST /api/venues commit ke baad cache.delete. PUT/DELETE pe bhi same prefix.

    Viva tipTimeout se auto-expire bhi hota hai. Create/update/delete ke baad related keys hatao.

  43. 43
    What is a callback function?
    Times asked 1
    Official solution

    SimpleFn later: setTimeout, then, addEventListener. Hell → async/await.

    mounted callbacks.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Project example: fetch then vs await.

    Project example: fetch then vs await.

  44. 44
    Explain the fetch() request in one of your Vue components.
    Times asked 1
    Official solution

    SimpleURL method headers await json assign data errors. Explain fetch() in one Vue component. Show fetch API calls.

    Line by line.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Project example: Venues.vue mounted.

    Project example: Venues.vue mounted.

  45. 45
    Open package.json and explain the purpose of the packages/dependencies used.
    Times asked 1
    Official solution

    Simplename scripts deps. vue vue-router vuex axios. Explain packages.

    Open and explain purpose.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Example

    {
      "scripts": { "dev": "vite", "build": "vite build" },
      "dependencies": { "vue": "^3.4.0" }
    }

    Project example: dependencies vs devDependencies.

  46. 46
    What is Local Storage?
    Times asked 4
    Official solution

    Simplewindow.localStorage key-value strings origin persist. Advantages: persist 5MB simple. Nuksaan XSS no expiry strings.

    What is Local Storage. Advantages.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: setItem token.

  47. 47
    What is Session Storage?
    Times asked 2
    Official solution

    SimplesessionStorage tab close clear. Same API as LS.

    What is Session Storage.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: If unused, theory vs LS.

    Project example: If unused, theory vs LS.

  48. 48
    What are Cookies?
    Times asked 1
    Official solution

    SimpleSmall strings sent with requests unless JS-only flags HttpOnly Secure SameSite.

    What are Cookies.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Session id or empty.

    Project example: Session id or empty.

  49. 49
    Difference between Local Storage, Session Storage, and Cookies.
    Times asked 2
    Official solution

    SimpleLS persist 5MB XSS-readable. SS tab-scoped. Cookies chhote auto-send httpOnly possible.

    JWT LS common student MAD2 — v-html untrusted mat. Logout removeItem.

    Vuex RAM refresh gayab unless rehydrate LS.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: Application tab localStorage token key. Cookies empty if JWT LS.

    Viva tipJWT ko localStorage common hai MAD2 student projects mein — XSS se bacho (v-html untrusted mat).

  1. 1
    What is Vue.js?
    Times asked 5
    Official solution

    SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent → child data. Child → parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  2. 2
    What is the difference between Vue and Vuex?
    Times asked 1
    Official solution

    SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent → child data. Child → parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  3. 3
    What is the difference between v-if and v-show?
    Times asked 6
    Official solution

    Simplev-if element DOM se hataata/jodata hai, v-show sirf CSS display toggle karta hai.

    v-if='isAdmin' → false ho to element exist hi nahi. Costly toggle, lekin hidden data DOM mein nahi.
    v-show='open' → display:none. Fast toggle, element hamesha DOM mein.

    Rare condition: v-if. Bar-bar toggle (dropdown): v-show.

  4. 4
    What is a Promise in JavaScript?
    Times asked 2
    Official solution

    SimpleAJAX page reload ke bina server se data laata hai. Aaj kal fetch() + Promises.

    fetch('/api/users').then(r => r.json()).then(data => { ... })
    Promise: future value (pending/fulfilled/rejected). fetch Promise return karta hai.
    SPA (Vue): ek HTML, baaki routes JS se, partial update. MAD1 generally full page render (Jinja) — submit pe poora refresh.
    async/await Promise ka clean syntax.

  5. 5
    What is the relationship between fetch() and Promises?
    Times asked 1
    Official solution

    SimpleAJAX page reload ke bina server se data laata hai. Aaj kal fetch() + Promises.

    fetch('/api/users').then(r => r.json()).then(data => { ... })
    Promise: future value (pending/fulfilled/rejected). fetch Promise return karta hai.
    SPA (Vue): ek HTML, baaki routes JS se, partial update. MAD1 generally full page render (Jinja) — submit pe poora refresh.
    async/await Promise ka clean syntax.

  6. 6
    What is the difference between var and let?
    Times asked 1
    Official solution

    Simplevar old function-scope, let block-scope changeable, const block-scope reassign nahi.

    var x = 1; // hoisted, function scoped — avoid
    let count = 0; count = 1; // theek
    const PI = 3.14; // reassign error, object ke andar field change ho sakti hai
    Modern JS: let/const use karo, var mat karo.

  7. 7
    How have you implemented Cookies and JWT in your project?
    Times asked 1
    Official solution

    SimpleJWT = JSON Web Token — signed string jisme user id/role hota hai. Har request header mein jaata hai. Session server pe store, JWT client pe.

    Login → server token deta hai → Authorization: Bearer <token>
    Payload: {sub: user_id, role: admin, exp: ...} — padha ja sakta hai, change nahi (signature).
    Session: browser cookie, server-rendered Flask ke liye simple.
    Token: mobile/Vue SPA, scaling (server memory nahi). Store: memory/httpOnly cookie, localStorage XSS risk.
    MAD1 mostly session. Flask-Security session+login, JWT APIs ke liye.

  8. 8
    How do you send data through a form?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  9. 9
    What are Routes?
    Times asked 1
    Official solution

    Simple@app.route URL ko Python function se jodta hai. @ wala cheez decorator hai.

    @app.route('/hello/<name>', methods=['GET'])
    def hello(name):
        return f'Hello {name}'

    Decorator function ko wrap karke extra behaviour deta hai (route register, login_required).
    Endpoint generally function name. Path /hello/Ram.
    <int:id> type converter — sirf integer. Bina converter string. ID chahiye to int safer.
    methods=['POST'] only POST. Default GET.
    functools.wraps custom decorator mein original function name/docs preserve karta hai.

  10. 10
    What is the purpose of the routes.js file?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  11. 11
    What is Redis?
    Times asked 21
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  12. 12
    What is Celery?
    Times asked 19
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  13. 13
    Why are Redis and Celery used together?
    Times asked 1
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  14. 14
    What is the difference between a Primary Key and a Unique Key?
    Times asked 3
    Official solution

    SimplePrimary Key table ki main identity hai (ek hi), Unique Key extra unique column ho sakta hai (kai).

    PK: NOT NULL + UNIQUE, sirf ek clustered identity. Example: id
    Unique: duplicate nahi, lekin NULL allow ho sakta hai. Example: email, username

    UNIQUE + NOT NULL + AUTO_INCREMENT PK jaisa behave karta hai, lekin table ki official PK nahi. Relationships/FK generally PK ko refer karti hain.
    Isliye alag Primary Key rakhna better hai.

  15. 15
    Explain your database model/schema.
    Times asked 1
    Official solution

    Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.

    1) Yeh file/line kya role hai (model / route / template / config)?
    2) Input kahan se aata hai (form, URL <id>, session, JSON)?
    3) DB pe kya query/write?
    4) Output kya (render_template / redirect / jsonify)?

    Example

    @app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.

    Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.

  16. 16
    How are you exporting your venues?
    Times asked 1
    Official solution

    SimpleFlask default port 5000. Change: app.run(port=8000) ya env PORT, ya flask run --port 8000.

    if __name__ == '__main__':
        app.run(debug=True, host='0.0.0.0', port=8000)

    Do apps ek saath: alag ports. Occupied port: error, doosra number try.

Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.