- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 116字
- 2021-06-25 20:52:36
The command pattern
One of the most important things to do in object-oriented programming is to adopt a design that lets us decouple the code. For example, let's imagine that we need to develop a complex application in which we can draw graphic shapes: points, lines, segments, circles, rectangles, and many more.
Along with the code to draw all kinds of shapes, we need to implement many operations to handle the menu operations. In order to make our application maintainable, we are going to create a unified way to define all those commands in such a way that it will hide the implementation details from the rest of the application (which plays the client role).
推薦閱讀
- Flask Web全棧開發(fā)實戰(zhàn)
- JavaScript百煉成仙
- 微服務(wù)與事件驅(qū)動架構(gòu)
- MATLAB 2020 從入門到精通
- C語言最佳實踐
- AutoCAD VBA參數(shù)化繪圖程序開發(fā)與實戰(zhàn)編碼
- Mastering Drupal 8 Views
- Kotlin從基礎(chǔ)到實戰(zhàn)
- Python圖形化編程(微課版)
- PhoneGap 4 Mobile Application Development Cookbook
- Python無監(jiān)督學(xué)習(xí)
- Dart:Scalable Application Development
- Python高性能編程(第2版)
- 輕松學(xué)Scratch 3.0 少兒編程(全彩)
- SQL Server 2014數(shù)據(jù)庫設(shè)計與開發(fā)教程(微課版)