Better Software - June 2008 - (Page 27) Figure 7: Initial UML domain model Figure 8: Initial version of the “Place a Bid” use case Figure 9: Updated domain model don’t need to model it. Remember, use the simplest tool for the task at hand. On the other side, the bid would be implemented using EJBs, so it would be worthwhile to model it. As for the use cases, just because you decide to model doesn’t mean that you need to model every detail. Modeling is a technique to help you design your solution, and you are the only one who knows how much detail you need. This is also true in the context of code generation. The purpose of code generation is not to force you to detail everything, but to leverage the modeling you have done to seed your code and to avoid redoing all this work manually. Then, you can flesh out that generated code via a TDD approach as you saw in figure 1. You will need to decide as a team how much code seeding you wish to do via modeling versus how much hand coding via TDD—different situations require a different mix. As seen in figure 12, for our application we model two EJBs with their attributes and methods. We will use different stereotypes that will generate the EJB’s code during the UML-to-EJB transformation. We also decided to define the attribute types, as well as the placeBidOnItem signature, as it is not too much overhead and will provide better generated code. As we said previously, each time we place a bid we need to set the price of the item to the value of the new bid. To do that, we need an entity EJB to access the Item table. We are lucky that such an entity bean has been developed by another project. We just have to drag it into our diagram to be able to create a dependency between the bidSB session bean and the visualized ItemCMP entity bean. Visualization allows us to work with the code using UML visual diagrams without creating distinct UML elements; you directly access the code through a UML rendering engine. Figure 13 shows the visualization of the Bid-related classes. As soon as the code is seeded from your model, you can start implementing using TDD until you validate through testing that the “Place a Bid” use case is successfully implemented. You then can start a new iteration and select a set of use cases to implement following the same approach. It is also worth mentioning that software-based design tools allow you to reapply a transformation www.StickyMinds.com JUNE 2008 BETTER SOFTWARE 27 http://www.StickyMinds.com
Table of Contents Feed for the Digital Edition of Better Software - June 2008 Better Software - June 2008 Contents Mark Your Calendar Contributors Technically Speaking eLightenment Code Craft Test Connection Management Chronicles Agile Model-Driven Development The Myth of Risk Management Stop the Insanity! Product Announcements 10 Things You Might Not Know About … The Last Word Ad Index Better Software - June 2008 Better Software - June 2008 - (Page Intro) Better Software - June 2008 - Better Software - June 2008 (Page Cover1) Better Software - June 2008 - Better Software - June 2008 (Page Cover2) Better Software - June 2008 - Better Software - June 2008 (Page 1) Better Software - June 2008 - Better Software - June 2008 (Page 2) Better Software - June 2008 - Contents (Page 3) Better Software - June 2008 - Mark Your Calendar (Page 4) Better Software - June 2008 - Mark Your Calendar (Page 5) Better Software - June 2008 - Mark Your Calendar (Page 6) Better Software - June 2008 - Mark Your Calendar (Page 7) Better Software - June 2008 - Contributors (Page 8) Better Software - June 2008 - Contributors (Page Telelogic1) Better Software - June 2008 - Contributors (Page Telelogic2) Better Software - June 2008 - Contributors (Page 9) Better Software - June 2008 - Contributors (Page 10) Better Software - June 2008 - Technically Speaking (Page 11) Better Software - June 2008 - eLightenment (Page 12) Better Software - June 2008 - eLightenment (Page 13) Better Software - June 2008 - Code Craft (Page 14) Better Software - June 2008 - Code Craft (Page 15) Better Software - June 2008 - Code Craft (Page 16) Better Software - June 2008 - Code Craft (Page COD1) Better Software - June 2008 - Code Craft (Page COD2) Better Software - June 2008 - Code Craft (Page COD3) Better Software - June 2008 - Code Craft (Page COD4) Better Software - June 2008 - Code Craft (Page 17) Better Software - June 2008 - Test Connection (Page 18) Better Software - June 2008 - Test Connection (Page 19) Better Software - June 2008 - Management Chronicles (Page 20) Better Software - June 2008 - Management Chronicles (Page 21) Better Software - June 2008 - Agile Model-Driven Development (Page 22) Better Software - June 2008 - Agile Model-Driven Development (Page 23) Better Software - June 2008 - Agile Model-Driven Development (Page 24) Better Software - June 2008 - Agile Model-Driven Development (Page 25) Better Software - June 2008 - Agile Model-Driven Development (Page 26) Better Software - June 2008 - Agile Model-Driven Development (Page 27) Better Software - June 2008 - Agile Model-Driven Development (Page 28) Better Software - June 2008 - Agile Model-Driven Development (Page 29) Better Software - June 2008 - The Myth of Risk Management (Page 30) Better Software - June 2008 - The Myth of Risk Management (Page 31) Better Software - June 2008 - The Myth of Risk Management (Page 32) Better Software - June 2008 - The Myth of Risk Management (Page 33) Better Software - June 2008 - The Myth of Risk Management (Page 34) Better Software - June 2008 - The Myth of Risk Management (Page 35) Better Software - June 2008 - Stop the Insanity! (Page 36) Better Software - June 2008 - Stop the Insanity! (Page 37) Better Software - June 2008 - Stop the Insanity! (Page 38) Better Software - June 2008 - Stop the Insanity! (Page 39) Better Software - June 2008 - Stop the Insanity! (Page 40) Better Software - June 2008 - Stop the Insanity! (Page 41) Better Software - June 2008 - Stop the Insanity! (Page 42) Better Software - June 2008 - Stop the Insanity! (Page 43) Better Software - June 2008 - Product Announcements (Page 44) Better Software - June 2008 - Product Announcements (Page 45) Better Software - June 2008 - 10 Things You Might Not Know About … (Page 46) Better Software - June 2008 - The Last Word (Page 47) Better Software - June 2008 - Ad Index (Page 48) Better Software - June 2008 - Ad Index (Page Cover3) Better Software - June 2008 - Ad Index (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.