2 Replies Latest reply on Aug 1, 2009 8:32 PM by phantasmo

    Modeling problem

    phantasmo

      I am trying to come up with a decent model for the following scenario, but still being very new to Seam, I am having a problem thinking in a Seam way, so I would greatly appreciate any advice.


      There are only 3 pages and two entity classes involved: ingredients and potions. A potion consists of exactly two different ingredients.


      1. The first page should have a basic search form. The user searches for an ingredient and clicks it.


      2. The second page has the description of the picked ingredient and a list of all the potions that contain it. Here, the user can click on any potion to give it either a positive or a negative vote. Also, there is a button for adding new potions.


      3. The third page is for adding potions. Since one ingredient is already selected (and potions always consist of exactly two), the user searches for the second one here, selects it and saves the new potion. Upon returning to the previous page, the new potion should be visible.


      Now, what I am looking for is just a suggestion, a couple of sentences, on how to model this. I am having problems properly decomposing this into use cases and thinking in conversations, so I could really use a hint where to start and end conversation etc.


      Any advice is welcome. Thanks for the time.

        • 1. Re: Modeling problem
          joblini

          Hello Bojan,


          Create your tables in your favorite database.


          Generate an application from these tables using Seam-Gen (see Seam reference doc, there is a chapter on this)


          Study the created application, I believe it will come quite close to what you want to accomplish.


          Import the generated project into Eclipse and fine tune it to to suit your needs. 


          Regards,
          Ingo

          • 2. Re: Modeling problem
            phantasmo

            Hmmm... I'll definitely have to do some more reading then, as I didn't really expect Seam-generated app to be similar to my requirements.


            Anyway, I'll follow your recommendation and give it a shot.


            Thanks for reply, Ingo.