Bỏ qua tới nội dungSkip to content

45 pattern · Java Spring Boot ⇄ Go · Song ngữ45 patterns · Java Spring Boot ⇄ Go · Bilingual

Design pattern cho kỹ sư phần mềmDesign patterns for software engineers

Giáo trình có cấu trúc về design pattern với ví dụ song song Java Spring Boot và Go, sơ đồ thực thi từng bước, bài kiểm tra kiến thức và ôn tập ngắt quãng.A structured curriculum on design patterns with side-by-side Java Spring Boot and Go examples, step-by-step executable diagrams, knowledge checks and spaced review.

Miễn phí. Không cần tài khoản để bắt đầu.Free. No account required to start.

Strategy · So sánh codeStrategy · Code comparisonHành viBehavioral
public interface PaymentStrategy {
    Receipt pay(Money amount);
}

@Component("momo")
class MomoPayment implements PaymentStrategy {
    private final MomoGateway gateway;

    @Override
    public Receipt pay(Money amount) {
        return gateway.charge(amount);
    }
}
Khác biệt idiomIdiom differences
  • implementsimplicitGo thoả interface ngầm địnhGo satisfies interfaces implicitly
  • @Componentstruct + ctorBean Spring ⇄ truyền phụ thuộc thủ côngSpring bean ⇄ explicit wiring
  • throws(T, error)Exception ⇄ giá trị lỗi trả vềExceptions ⇄ returned error values
Design patternDesign patterns
45
Học phầnModules
5
File code Java và GoJava and Go source files
559
Câu hỏi kiểm traKnowledge-check questions
245
Thẻ ôn tậpReview cards
149

Cách mỗi bài học được xây dựngHow each lesson is built

Mỗi pattern đi qua cùng một cấu trúc: bối cảnh, sơ đồ thực thi, code hai ngôn ngữ, kiểm tra và ôn tập.Every pattern follows the same structure: context, executable diagram, code in two languages, a knowledge check and review.

  • Sơ đồ thực thiExecutable diagrams

    Sơ đồ UML chạy từng bước: thấy object nào gọi object nào, kèm output console tương ứng.UML diagrams that run step by step, showing each call between objects alongside the console output.

  • Java Spring Boot ⇄ GoJava Spring Boot ⇄ Go

    Cùng một bài toán viết bằng hai ngôn ngữ, chú thích theo dòng và bảng khác biệt idiom.The same problem in both languages, with line-level notes and a table of idiom differences.

  • Kiểm tra kiến thứcKnowledge checks

    Câu hỏi cuối mỗi bài, mỗi đáp án đều có giải thích vì sao đúng hoặc sai.Questions at the end of each lesson; every answer explains why it is right or wrong.

  • Ôn tập ngắt quãngSpaced review

    Thẻ ghi nhớ theo hộp Leitner, quay lại sau 1, 3, 7, 14 và 30 ngày.Leitner-box flashcards that return after 1, 3, 7, 14 and 30 days.

  • Song ngữ Việt / AnhVietnamese / English

    Toàn bộ nội dung có hai ngôn ngữ, chuyển đổi tức thì mà không tải lại trang.All content is available in both languages and switches instantly without a reload.

  • Đồng bộ tiến độSynced progress

    Học ngay không cần tài khoản; đăng nhập để đồng bộ tiến độ giữa các thiết bị.Start without an account; sign in to sync progress across devices.

Thấy code chạy, không chỉ đọcSee the code run, not just read it

Mỗi bài có sơ đồ thực thi: từng lời gọi giữa các object được đánh số, kèm output như chương trình thật.Every lesson has an executable diagram: each call between objects is numbered, with output like the real program.

Mở sơ đồ đầy đủ của StrategyOpen the full Strategy diagram
Strategy · Luồng thực thiStrategy · Execution flow
  1. client
    CheckoutController
  2. context
    CheckoutService
  3. «interface»
    PaymentStrategy
  4. strategy
    MomoPayment
Bước 1/4Step 1/4

Controller gọi checkout() với phương thức MOMO.The controller calls checkout() with method MOMO.

console
  1. 1> checkout("MOMO", 100000)

Cộng đồngCommunity

Đăng nhập để xuất hiện trên bảng xếp hạng, tham gia thử thách hằng tuần và thảo luận trong từng bài học.Sign in to appear on the leaderboard, take part in weekly challenges and join the discussion on each lesson.

Bảng xếp hạng tuầnWeekly leaderboard

Thử thách tuầnWeekly challenges

Mỗi bài học có khu thảo luận riêng để hỏi đáp và chia sẻ cách áp dụng pattern trong dự án thực tế.Every lesson has its own discussion thread for questions and real-world usage notes.

Showcase

7 dự án mẫu kết hợp nhiều pattern trong một ứng dụng hoàn chỉnh. Đang được xây dựng.7 sample projects that combine several patterns in a complete application. In development.

Xem tất cả dự ánView all projects
  • Sắp ra mắtComing soon

    CRM miniMini CRM

    CRUDCRUDQuy trìnhWorkflowDashboardDashboard
  • Sắp ra mắtComing soon

    Quản lý công việcTask management

    Quy trìnhWorkflowCRUDCRUD
  • Sắp ra mắtComing soon

    Quản lý khách sạnHotel management

    Đặt chỗBookingQuy trìnhWorkflow
  • Sắp ra mắtComing soon

    Quản lý quán cà phêCoffee shop management

    Bán hàngPoint of saleThời gian thựcRealtime

Câu hỏi thường gặpFrequently asked questions

Có. Toàn bộ 45 bài học, bài kiểm tra kiến thức, thẻ ôn tập và bảng xếp hạng đều miễn phí.Yes. All 45 lessons, knowledge checks, review cards and the leaderboard are free.

Không bắt buộc. Bạn có thể học ngay với tư cách khách, tiến độ lưu trên trình duyệt. Tạo tài khoản để đồng bộ giữa các thiết bị, lên bảng xếp hạng, bình luận và nhận chứng chỉ; tiến độ khi học thử sẽ được chuyển sang tài khoản.No. You can start as a guest and progress is kept in your browser. An account syncs across devices and unlocks the leaderboard, discussions and certificates; your guest progress carries over.

Đọc hiểu cú pháp cơ bản của một trong hai ngôn ngữ là đủ (class/interface hoặc struct/func). Mỗi đoạn code có chú thích từng dòng và bảng khác biệt idiom, nên học song song cũng là cách làm quen ngôn ngữ còn lại.Reading basic syntax in one of them is enough (classes/interfaces or structs/funcs). Code has line-by-line notes and an idiom-differences table, so it doubles as an intro to the other language.

Khi hoàn thành một bài, thẻ ghi nhớ của bài vào hộp Leitner. Nhớ tốt thì thẻ quay lại sau 1 → 3 → 7 → 14 → 30 ngày; quên thì về hộp đầu và ôn lại ngay hôm đó.When you finish a lesson its flashcards enter a Leitner box. Remember well and a card returns after 1 → 3 → 7 → 14 → 30 days; forget and it goes back to box one for today.

Khi đăng nhập, điểm, bài đã học và thẻ ôn tập được lưu trên máy chủ và đồng bộ giữa các thiết bị. Điểm do máy chủ tính để bảng xếp hạng công bằng. Khi mất mạng, bạn vẫn học được và tiến độ sẽ đồng bộ lại sau.When signed in, Points, lessons and review cards live on the server and sync across devices. Points are scored server-side to keep the leaderboard fair. Offline, you can keep learning and it syncs later.

Các mini project hoàn chỉnh (CRM, quản lý công việc, khách sạn, quán cà phê, du lịch, bất động sản, motion design) cho thấy nhiều pattern phối hợp trong một ứng dụng thật. Các dự án đang được xây dựng và sẽ ra mắt lần lượt.Complete mini projects (CRM, task management, hotel, coffee shop, travel, real estate, motion design) showing patterns working together in a real app. They are in development and will be released one at a time.

Bắt đầu với bài học đầu tiênStart with the first lesson

Mỗi bài học mất khoảng 10–15 phút. Tiến độ được lưu tự động.Each lesson takes about 10–15 minutes. Progress is saved automatically.

Bắt đầu họcStart learning