tailieunhanh - Design Patterns FOR Dummies phần 10
"Đóng gói một yêu cầu như một đối tượng, do đó cho phép bạn tham số khách hàng với các yêu cầu khác nhau, xếp hàng hoặc đăng nhập yêu cầu, và hỗ trợ các hoạt động thể hoàn tác được." Về điều đó "thông số khách hàng với các yêu cầu khác nhau "? Có gì là tất cả về? Giả sử bạn đã có một thiết lập dành riêng cho các invokers, | 278 Part III The Part of Tens You can also find recycle bins in Java such as in the thread pooling that you can configure using classes like ScheduledThreadPoolExecutor and ThreadPoolExecutor. Entering the Big Time with the ModetwieWfControBer Pattern Another popular design pattern you see at the Portland Pattern Repository is the Model View Controller or MVC design pattern. This pattern represents a good design insight separating the code used for presentation from that which works on and handles data. Very often Java-based online applications are written with a few JavaServer Pages JSPs and JSP is notorious for mixing presentation code including HTML with logic code Java code . Larger online Java applications particularly those based on an application framework like Jakarta Struts very often use MVC architecture these days. The controller which is often a Java servlet oversees the whole application calling code in the model often a JavaBean to handle the internal logic and business rules and then sending the results to the presentation layer the view often made up of JSPs which interacts with the user. Here s an overview of these three components Model Implements the data crunching of the application. This is the core code that does the application s internal work. The model doesn t know anything about the view or the controller you just pass it data and it goes from there returning its results. In online Java applications the model is often implemented using JavaBeans. View Implements the presentation layer that interacts with the user. When the user starts interacting with an online Java application the Web page s they see are part of the view. The view also takes data supplied to it usually from the controller and displays it. In online Java applications the view is often implemented using JSP. Controller Acts as the boss of the application and is responsible for routing data to the right model and
đang nạp các trang xem trước