Principle & Design Patterns
Tamoyillar va Dizayn Patternlar

Let's grab a coffee

Tamoyillar

vazifa

Qo'shimcha

Savollarga javob berish

  • 1. What are Design Principles? Why we need them?
  • 2. What Design Principles you know?
  • 3. Explain the following:
  • 3.1 Program to an Interface, not an Implementation
  • 3.2 Encapsulate What Varies (application-, class- and method-level)
  • 3.3 Favor Composition Over Inheritance
  • 4. How practically you used above-mentioned principles in your projects?

S.O.L.I.D. SRP

vazifa

Qo'shimcha

  • SPR nima?
  • 1. Create UserManagment.Console
  • 2. It offers 2 features:
  • 2.1 Add credential (username, password) -> file

  • 2.2 Login Here are some of the criteria:
  • 1. There should be at least 2 branches
  • 2. The repo should be well-documented (headings, gifs, etc.)
  • 3. Exception handling required
  • 4. Validation required
  • 5. Exception handling and validation are only allowed in services.
  • 6. Retry logic for console required
  • 7. Pair-programming recommended

S.O.L.I.D. O/C

vazifa

Qo'shimcha

  • O/C tamoyili nima?
  • Refactoring Guru, pg. 51-53

S.O.L.I.D. Takrorlash

vazifa

Qo'shimcha

  • O/C tamoyili nima?

  • Portfolio Project

    Name: e-shop (EShop) FEATURES:
  • 1. Auth (file storage)
  • 1.1 Login
  • 1.2 Create credentials
  • 2. Show products
  • 2.1 Products (memory storage) - (id, price, weight)
  • 2.2 AddToCart
  • 3. Show shipping method
  • 3.2 Air, Sea, Ground
  • 4. Show total price
  • 4.1 Show line items + shipping details
  • Loyihani tayyorlash va GitHub-ga yuklash

S.O.L.I.D. LSP

vazifa

Qo'shimcha

  • LSP tamoyili nima?

  • LSP nazariyasi haqida o'qing

S.O.L.I.D. ISP

vazifa

Qo'shimcha

  • ISP tamoyili nima?

  • Refactoring Guru, pg. 64-67

S.O.L.I.D. DIP

vazifa

Qo'shimcha

  • DIP tamoyili nima?

  • Refactoring Guru, pg. 67-70

Creational DP. Factory Method

vazifa

Qo'shimcha

  • 1. What types of Design Patters are there?
  • 2. What is Design Pattern?
  • 3. What is Factory method?

Event-Driven Pattern Cul-de-sac

vazifa

Qo'shimcha

  • Event-driven arxitektura nima?
  • Nazariyani o'rganish

Singleton DP

vazifa

Qo'shimcha

  • Singleton nima?
  • Undan nima maqsadda foydalanamiz?
  • Amaliy loyiha

Dependency Injection

vazifa

Qo'shimcha

  • What is Dependency Inversion?
  • What is Inversion of Control?
  • What is Dependency Injection?
  • What is IoC Container?

  • 📌Uy ishi

  • Nazariy:
  • 1.What is Dependency Inversion?
  • 2.What is Inversion of Control?
  • 3.What is Dependency Injection?
  • 4.What is IoC Container?

  • Amaliy:
  • 1. FileDb loyhasiga JSON file bilan ishlash imkonini qo'shing.
  • 2. Foydalanuvchi dasturni ishlatganda .json yoki .txt file bilan ishlashi mumkin bo'lsin(yani tanlash imkoni bo'lishi kerak).
  • 3. Loyha har bir kishining GitHub repository asida bo'lishi kerak.

Composite & Observer DI

vazifa

Qo'shimcha