Which approach is right doing use case first or classes first ? why? [duplicate]

There are people who prefer to do use cases first and then do the classes, but there are also some who prefer to do class diagram first and then use cases. So is it personal choice for convenience? What are the pros and cons of the above ways?

3

Use-cases are the description of the problem to solve, therefore, they must come before any other step in the process.

I’d argue that it’s not possible to make anything meaningful without knowing the problem.

Use-cases will then determine what you design, whether you make class diagrams before writing any code, however, is personal preference.

0

You “forgot” to mention it, but I assume you are talking about gathering requirements for a new software by using UML, right?

I think the first step in this should always be to understand the use cases (and I am not talking about fancy use case diagram, I am talking about the business process of your users, what they are doing and how the new software shall be integrated into their work). You can do this by interviewing people, by observing them or by working with them.

To safe the result of this process you can try to incorporate use case diagrams, but these diagrams will provide only a very high level abstraction of what you have learned in the step before. So you will have to add a more detailed description to any use case. This description can make use of other tools:

  • verbal description of the processes in natural language
  • example scenarios (also called “user stories”)
  • class diagrams for modeling business entities and the data on a very detailed level
  • class diagrams as a form of domain model like in “domain driven design”
  • data flow diagrams (still missing in UML)
  • UI drafts
  • test cases
  • other UML diagrams (though IMHO seldom really helpful)
  • […]

So if your job is to model a high level overview of the system, you will probably create use case diagrams first, each one with a more or less small description. If you are going to flesh out the details of a certain use case, where the data to be processed is modeled down to the attribute level, you may start with only one use case and do a lot of detailed bottom-up modeling (maybe incorporating class diagrams as one of many tools) before you go to the next use case. So the order for modeling depends on what your assigned task is, and how big and complex the piece of software is you have to analyse.

Be aware that many software projects in the past have failed because they were completely overanalysed – hundreds of pages of specs created over months without building a line of code first (of course, other projects failed because they were not well analysed at all), so it is important to find the right balance. Be also aware that most software systems will be created release by release – so the task of gathering requirements for version 1.0 is only the first step. For version 2,3,4,5 you will typically have to describe only the additional requirements compared to the previous version. Often the set of use cases is mostly stable between releases, but the detailed differences between version n and n+1 are of interest. So the tools I listed above for the detailed use case description become typically more important than use case diagrams after version 1.0 is in production.

Use cases first is the right approach because tons of software engineers before us have found out already


I have not heard about people who prefer coding first (class diagrams) and think about it only afterwards (use cases) and still are able to produce non-trivial working software. On the contrary I have heard about many projects who failed completely, run out of budget etc. just because of that.

But maybe I have misunderstood the original intent of your question.

Some “cons of classes first” are: lessons learned, full size picture available as How Projects Really Work – http://www.projectcartoon.com

enter image description here

Some “pros of use cases first” are: because literature recommends it, e.g.

Scott W. Ambler in his online book “Agile Modeling” in chapter “Requirements Envisioning: An Agile Best Practice → What Should You Model Initially?” says:

For the first release of a system you need to take several days to identify some high-level requirements as well as the scope of the release (what you think the system should do). The goal is to get a good gut feel what the project is all about. For your initial requirements model my experience is that you need some form of:

  • Usage model
  • Domain model
  • User interface model(s)

3.1 Usage Model

Usage models enable you to explore how users will work with your system, which is absolutely critical if you’re to understand what they need. Your usage model may be a collection of essential use cases or system use cases…

3.2 Domain Model

Part of your initial modeling efforts, particularly for a business application, will likely include the development of a conceptual domain model. This model should be very slim, capturing the main business entities and the relationships between them…your model doesn’t need to be complete, it just needs to cover enough information to make you comfortable with the primary business concepts…

3.3 User Interface Model(s)

The user interface (UI) is the portion of software with which a user directly interacts. For most stakeholders the UI is the system so it is crucial to the initial success of your project to ensure that you understand what stakeholders expect of the UI. One way to explore the requirements for the UI is to create what are called essential UI prototypes, also known as an abstract prototypes or paper prototypes…

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Which approach is right doing use case first or classes first ? why? [duplicate]

There are people who prefer to do use cases first and then do the classes, but there are also some who prefer to do class diagram first and then use cases. So is it personal choice for convenience? What are the pros and cons of the above ways?

3

Use-cases are the description of the problem to solve, therefore, they must come before any other step in the process.

I’d argue that it’s not possible to make anything meaningful without knowing the problem.

Use-cases will then determine what you design, whether you make class diagrams before writing any code, however, is personal preference.

0

You “forgot” to mention it, but I assume you are talking about gathering requirements for a new software by using UML, right?

I think the first step in this should always be to understand the use cases (and I am not talking about fancy use case diagram, I am talking about the business process of your users, what they are doing and how the new software shall be integrated into their work). You can do this by interviewing people, by observing them or by working with them.

To safe the result of this process you can try to incorporate use case diagrams, but these diagrams will provide only a very high level abstraction of what you have learned in the step before. So you will have to add a more detailed description to any use case. This description can make use of other tools:

  • verbal description of the processes in natural language
  • example scenarios (also called “user stories”)
  • class diagrams for modeling business entities and the data on a very detailed level
  • class diagrams as a form of domain model like in “domain driven design”
  • data flow diagrams (still missing in UML)
  • UI drafts
  • test cases
  • other UML diagrams (though IMHO seldom really helpful)
  • […]

So if your job is to model a high level overview of the system, you will probably create use case diagrams first, each one with a more or less small description. If you are going to flesh out the details of a certain use case, where the data to be processed is modeled down to the attribute level, you may start with only one use case and do a lot of detailed bottom-up modeling (maybe incorporating class diagrams as one of many tools) before you go to the next use case. So the order for modeling depends on what your assigned task is, and how big and complex the piece of software is you have to analyse.

Be aware that many software projects in the past have failed because they were completely overanalysed – hundreds of pages of specs created over months without building a line of code first (of course, other projects failed because they were not well analysed at all), so it is important to find the right balance. Be also aware that most software systems will be created release by release – so the task of gathering requirements for version 1.0 is only the first step. For version 2,3,4,5 you will typically have to describe only the additional requirements compared to the previous version. Often the set of use cases is mostly stable between releases, but the detailed differences between version n and n+1 are of interest. So the tools I listed above for the detailed use case description become typically more important than use case diagrams after version 1.0 is in production.

Use cases first is the right approach because tons of software engineers before us have found out already


I have not heard about people who prefer coding first (class diagrams) and think about it only afterwards (use cases) and still are able to produce non-trivial working software. On the contrary I have heard about many projects who failed completely, run out of budget etc. just because of that.

But maybe I have misunderstood the original intent of your question.

Some “cons of classes first” are: lessons learned, full size picture available as How Projects Really Work – http://www.projectcartoon.com

enter image description here

Some “pros of use cases first” are: because literature recommends it, e.g.

Scott W. Ambler in his online book “Agile Modeling” in chapter “Requirements Envisioning: An Agile Best Practice → What Should You Model Initially?” says:

For the first release of a system you need to take several days to identify some high-level requirements as well as the scope of the release (what you think the system should do). The goal is to get a good gut feel what the project is all about. For your initial requirements model my experience is that you need some form of:

  • Usage model
  • Domain model
  • User interface model(s)

3.1 Usage Model

Usage models enable you to explore how users will work with your system, which is absolutely critical if you’re to understand what they need. Your usage model may be a collection of essential use cases or system use cases…

3.2 Domain Model

Part of your initial modeling efforts, particularly for a business application, will likely include the development of a conceptual domain model. This model should be very slim, capturing the main business entities and the relationships between them…your model doesn’t need to be complete, it just needs to cover enough information to make you comfortable with the primary business concepts…

3.3 User Interface Model(s)

The user interface (UI) is the portion of software with which a user directly interacts. For most stakeholders the UI is the system so it is crucial to the initial success of your project to ensure that you understand what stakeholders expect of the UI. One way to explore the requirements for the UI is to create what are called essential UI prototypes, also known as an abstract prototypes or paper prototypes…

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật