Unified modeling language là gì

Ngôn ngữ mô hình hoá thống nhất – Unified Modeling Language (UML) là công cụ trao đổi phổ biến trong công nghiệp phần mềm. Nó dùng các biểu đồ và mô tả tóm tắt để giúp phát triển trực quan, kết cấu và cấu phần tài liệu (hay vật phẩm) của hệ thống phần mềm. UML có thể được dùng để nắm bắt tri thức (ngữ nghĩa) về chủ đề và tri thức diễn tả (cú pháp) liên quan tới chủ đề này với mục đích trao đổi. Là ngôn ngữ mô hình hoá nó có thể được dùng để trao đổi về hệ thống yêu cầu “cái gì”, và hệ thống có thể được thực hiện “như thế nào”. Mâu thuẫn với nhiều niềm tin, UML KHÔNG là qui trình nhưng nó thường được dùng để tạo khả năng cho qui trình.

UML thường được dùng trong pha yêu cầu để tạo điều kiện thuận lợi cho việc hiểu rõ hơn nhu cầu của người dùng. Cả người phát triển và người dùng đều có thể thấy dễ học, kiểm điểm và phát hiện lỗi trong pha sớm của phát triển phần mềm. Những người phát triển có thể áp dụng “Biểu đồ trường hợp sử dụng” để nắm bắt các yêu cầu chức năng của hệ thống và xác định phạm vi của dự án. Chìa khoá của việc mô hình hoá trường hợp sử  dụng là phần văn bản của mô hình trường hợp sử dụng, nhưng hầu hết mọi người vẫn coi các biểu đồ là tập trung chính. “Biểu đồ lớp” có lẽ là biểu đồ UML được dùng rộng rãi nhất vì nó dễ giải thích cho người dùng. “Biểu đồ hoạt động” là tốt cho mô hình hoá luồng công việc và dãy thời gian của tương tác. Chúng là chất keo kết gắn lại nhiều cách nhìn khác nhau về hệ thống trong một biểu đồ đơn giản. “Biểu đồ đối tượng” là tương tự như biểu đồ lớp nhưng nó cũng bao gồm những giá trị mẫu cho các thuộc tính chất lượng mà có ích để minh hoạ cho các ví dụ cụ thể. “Biểu đồ trình tự” có thể được dùng để minh hoạ cho việc truyền thông điệp qua lại giữa các đối tượng. “Biểu đồ triển khai” có thể được dùng để giải thích các thiết bị phần cứng khác nhau trong hệ thống, và cấu phần phần mềm được cài đặt trên từng thiết bị đó.

Tôi thường khuyến khích sinh viên dùng UML như công cụ chính để trao đổi với khách hàng và người dùng trong dự án Capstone. Nó có thể được dùng để mô tả hệ thống từ các cảnh quan khác nhau: cảnh quan của khách hàng và cảnh quan của bản thân hệ phần mềm. Vì UML là rất dễ học, bạn có thể bắt đầu dùng nó bằng việc tuân theo một số ví dụ đơn giản. Cách tốt nhất để bắt đầu là dùng vài biểu đồ UML trong dự án nhỏ rồi mở rộng việc dùng trong các dự án khác, mỗi lần lại thêm các kiểu nữa thì bạn có thể học UML nhanh chóng. Tôi khuyến khích sinh viên tìm hiểu công cụ này và bắt đầu dùng trong dự án tiếp của bạn.

Mô tả chi tiết về UML có thể được tìm thấy tại: www.uml.org, website cho UML từ  the Object Management Group.

Cuốn sách hay nhất về UML là: UML Distilled của Martin Fowler (Addison Wesley, ISBN 0-321-19368-7). Nó là một nhập môn xuất sắc vào UML, và nó ngắn, dễ đọc, dễ học.

Unified modeling language là gì

—-English version—-

The Unified Modeling Language (UML)

The Unified Modeling Language (UML) is a popular communication tool in the software industry. It uses diagrams and brief descriptions to help developers visualize, construct, and document components (or artifacts) of a software system. UML can be used to captureknowledge (semantics) about a subject and express knowledge (syntax) regarding the subject for the purpose of communication. As a modeling language it can be used to communicate “what” is required of a system, and “how” a system may be implemented. Contradict to many beliefs, UML is NOT a process but it is often used to enables processes.

UML is often used during requirements phase to facilitate better understanding of users’ needs. Both developers and users can find it easy to learn, to review, and detect errors in the early phase of software development. Developers could apply “Use Case Diagram”to capture functional requirements of a system and define the scope of the project. The key of use case modeling is in the text portion of a use case model, but most people still consider the diagrams as the focus. The “Class Diagram” is probably the most widely used UML diagrams since it is easy to explain to users. The “Activity Diagram” is good for modeling workflow and time sequences of interactions. They are the glue that bind together many different views of a system into a single diagram. The “Object Diagram” is similar to class diagrams but it also include sample values for quality attributes which is helpful to illustrate concrete examples. “Sequence diagram” can be used to illustrate the passing of messages back and forth between objects. “Deployment diagram” can be used to explain the different hardware devices in a system, and the software components installed on each one.

I often encourage students to use UML as a main tool for communication with customers and users during Capstone projects. It can be used to describe the system from different perspectives: the perspective of the customer and the perspective of the software system itself. Since UML is very easy to learn, you can start use it by following some simple examples. The best way to start is to use few the UML diagrams in a small project then spread the use in other projects, each time add more types then you can learn UML quickly. I do encourage students to explore this tool and begin to use in your next project.

Detail description of UML can be found at: www.uml.org. The web site for UML from the Object Management Group.

The best book on UML is: UML Distilled by Martin Fowler (Addison Wesley, ISBN 0-321-19368-7). It is an excellent introduction to UML, and it is short, easy to read, easy to learn.