1. Home
  2. Explore
  3. Computer Science
  4. Software Architecture Interview Questions

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Software Architecture Interview Questions

  • 32Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Project Architecture
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

How should you explain your project architecture in an architect interview?

Tap to flipClick to flipspace

Start from the 50,000 ft. level (layers like UI, MVC, database, cloud), then go to 30,000 ft. level (patterns inside each layer, e.g., MVC pattern in ASP.NET), then to 10,000 ft. level (design patterns used, e.g., repository, singleton). Also discuss security (OAuth, OpenID Connect).

Or swipe the card

32 cards

  1. How should you explain your project architecture in an architect interview?

    Start from the 50,000 ft. level (layers like UI, MVC, database, cloud), then go to 30,000 ft. level (patterns inside each layer, e.g., MVC pattern in ASP.NET), then to 10,000 ft. level (design patterns used, e.g., repository, singleton). Also discuss security (OAuth, OpenID Connect).

  2. What is an architecture style? Give examples.

    An architecture style defines guidelines and principles at the 50,000 ft. level. Examples: REST (stateless, resource-based, uniform interfaces), SOA.

  3. What is an architecture pattern? Give examples.

    An architecture pattern defines the structure at a block-diagram level (30,000 ft.). Examples: MVC, MVVM, MVP, layered architecture.

  4. What is a design pattern? Give examples.

    Design patterns are time-tested solutions for recurring architecture problems at the code level (10,000 ft.). Examples: factory, iterator, singleton, repository, adapter. They have a specific context and code structure.

  5. Define design patterns and mention key vocabulary.

    Design patterns are time-tested solutions for recurring architecture problems. Emphasize 'time-tested' and 'recurring'. Qualify with examples like adapter, iterator, template, repository.

  6. What are the three categories of design patterns (Gang of Four)?

    Creational (object creation issues), Behavioral (communication between objects), Structural (object composition and structure).

  7. How should you answer 'Which design patterns have you used in your project?'

    1. Do not just say singleton; stand out. 2) Mention non-GOF patterns like repository, unit of work, CQRS. 3) Only talk about patterns you are confident in from your project. 4) Discuss patterns naturally to turn the interview into a conversation.
  8. What is the repository pattern?

    It acts as an abstraction layer between the model and data access technology, centralizing data access logic to improve maintainability, testability, and modularity.

  9. What is the unit of work pattern?

    It manages transactions between repository pattern objects, ensuring that either all operations succeed or all roll back (atomicity).

  10. What is the iterator pattern?

    It allows sequential access to elements of an aggregate object without exposing its underlying representation (e.g., list, collection, dictionary). In .NET, it is implemented via IEnumerator and IEnumerable.

  11. What is the factory pattern?

    A creational pattern that centralizes object creation, delegating the creation of instances to derived classes.

  12. What is the adapter pattern?

    It converts the interface of a class into another interface expected by clients, making incompatible interfaces compatible. Often used with third-party components.

  13. What is the decorator pattern?

    It attaches additional responsibilities to an object dynamically. For example, adding null checks or range validation to a validator object.

  14. What is the command pattern?

    It encapsulates a request as an object, allowing parameterization of clients with different requests, queuing, logging, and undoable operations. Used in CQRS and MVVM (ICommand).

  15. What is the facade pattern?

    It provides a simplified interface to a complex subsystem. For example, exposing a simple web API over a complex accounting system.

  16. What is the composite pattern?

    It composes objects into tree structures to represent part-whole hierarchies. For example, a menu containing submenus (or a square containing a circle containing a square).

  17. What is the template pattern?

    It defines the skeleton of an algorithm in a parent class, allowing subclasses to override specific steps without changing the algorithm's structure.

  18. What is the singleton pattern?

    It ensures a class has only one instance and provides a global point of access to it. Used for caching, configuration, or shared data.

  19. What are the key aspects to mention when explaining singleton pattern?

    1. Separate wrapper class (whole-part relationship). 2) Private constructor. 3) Thread safety (lock). 4) Lazy loading. 5) Double null check for performance.
  20. Why does singleton need a private constructor?

    To prevent external classes from creating new instances via the new keyword. The only instance is controlled within the class itself.

  21. What is thread safety in the context of singleton pattern?

    Multiple threads may try to access the singleton simultaneously. Use a lock to ensure only one thread creates the instance, preventing multiple instances or partially initialized data.

  22. What is the double null check in singleton?

    First check (outer) is for performance: avoid acquiring the lock if the instance is already created. Second check (inner) inside the lock ensures lazy loading: only create instance if still null.

  23. How does C#'s Lazy<T> simplify singleton pattern?

    Lazy<T> provides built-in lazy initialization and thread safety. It reduces singleton code to a single line: private static readonly Lazy<Singleton> instance = new Lazy<Singleton>(() => new Singleton()); with access via instance.Value.

  24. What is the difference between static and singleton?

    Static is a keyword; singleton is a design pattern. Singleton provides thread safety, lazy loading, and OOP features (inheritance, interfaces) which are lost with static classes.

  25. Explain the MVC architecture pattern.

    MVC divides the application into three components: Controller (handles user input, loads model, invokes view), Model (business logic), View (look and feel, positioning). The flow: first hit to controller → controller loads model → model passed to view → view renders response.

  26. Explain the MVP architecture pattern.

    MVP includes Presenter, View, and Model. The View is passive: it submits itself to the Presenter via an interface. The Presenter handles user input, updates the model, and calls back to the View to update UI. First hit to View.

  27. What is a passive view in MVP?

    A passive view is one that does not contain any logic; it only forwards user interactions to the presenter and updates the UI based on presenter callbacks. The presenter does all the work.

  28. Explain the MVVM architecture pattern.

    MVVM consists of View, ViewModel, and Model. The View communicates with the ViewModel via automated bindings (declarative). The ViewModel provides data and UI logic (colors, enabling) to the View. First hit to View. Requires technology with binding support (WPF, Angular).

  29. What is a view model class?

    A class that encapsulates the model and provides everything the view needs: data, aesthetics (colors), enabling/disabling, etc. It sits between the model and the view.

  30. How do you choose between MVC, MVP, and MVVM?

    It is dictated by the technology: if the view loads first and no bindings → MVP; if view loads first and bindings → MVVM; if controller loads first → MVC. Some technologies (Angular) can mix MVC and MVVM.

  31. What is the difference between layer and tier?

    Layer is a logical separation of concerns (e.g., presentation, business, data access). Tier is physical deployment (e.g., separate servers). Three-tier adds communication complexity (HTTP, TCP/IP, queues).

  32. What is separation of concerns (SoC)?

    A design principle that breaks a software system into distinct sections, each addressing a separate concern. Examples: MVC separates view, controller, model; layered architecture separates presentation, business, data access.

Card 1 of 32
Card 1 of 32

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent