- 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).
推薦閱讀
- Learning Single:page Web Application Development
- ASP.NET Web API:Build RESTful web applications and services on the .NET framework
- Learn Type:Driven Development
- Pandas Cookbook
- 自己動手寫Java虛擬機
- Mastering Natural Language Processing with Python
- Mastering Unity Shaders and Effects
- LabVIEW虛擬儀器入門與測控應(yīng)用100例
- 基于SpringBoot實現(xiàn):Java分布式中間件開發(fā)入門與實戰(zhàn)
- GitHub入門與實踐
- TypeScript 2.x By Example
- 現(xiàn)代CPU性能分析與優(yōu)化
- The Statistics and Calculus with Python Workshop
- Python面試通關(guān)寶典
- TypeScript全棧開發(fā)