Tadili Saad

+ Follow
since Sep 17, 2008
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tadili Saad

Joachim Heidenreich wrote:So in the 2. option, if youre not going to use SFSB, you're going to put the updated PurchaseRequest object into the request scope every time? I find that rather cumbersome because you will have to store the Purchase request in some hidden fields or request parameters in your JSPs in every call otherwise your data will be lost.


Also I'm using struts2 so it's all done behind the scenes.

Why not store them in a HttpSession? You wont even need to have the method addItem return an updated PurchaseRequest becuase you would be using "call by reference."

This project is an academic project, I want to be able to use the persistent state pattern (an implementation of the state pattern). for that I need to have all the methods that changes the state of the PurchaseRequest in an object in the business layer.
Also I need to make some validation on the quantity of the item added (like it cannot exceed a certain quantity). I guess this is a business matter so this validation cannot be done in the presentation layer (or am I wrong).


Joachim Heidenreich wrote:Both seem fine to me. For the second one you would probably use a SFSB, but how are you going to keep reference to the SFSB for the duration of your Session? you would have to keep it somewhere, like your HttpSession. So you might aswell store all your temporary information in your HttpSession ie. use the first option.


By SSFB, you mean an EJB Statefull Session Bean, because I'm not using EJBs in my business Layer, I'm just using POJO's.

For the second method :
How I see it is that the business layer expose a method with the following signature

the presentation layer calls this method each time the user add an item, the method return the newly update PurchaseRequest and the presentation layer put the PurchaseRequest in the request scope.
Also There's no call from this method (addItem) to the integration layer, just some validation stuff and adding the (Item, Supplier, Quantity) combo.

I'm designing a module of an application, and I wonder where I need to put some of the logic of this module.

The module consist of creating a purchase request consisting of items, suppliers and quantities.

I'm using struts2 with hibernate, I have three layer (presentation, business, integration).

I wonder what is best :

In the presentation layer
- Get an empty purchase request from the business layer and store it in the http session.
- add line items in the purchase request stored in the session.
- When the user is finished call the method endPurchaseRequest() from the business layer and store the purchase request in the database.

In the presentation layer:

- Get an empty purchase request from the business layer (do not store it in the http session).
- each time an item quantity and supplier is added to the purchase request call a method addLineItem() from the business layer which adds the line item (the method returns the newly updated purchase request)
- When the user is finished call the method endPurchaseRequest() from the business layer and store the purchase request in the database.


Tom Tees wrote:

Some more thoughts...

What about "Catalog"??

Where is your "Buying Dept"??

Also, make sure you are modeling "Actors" and not People or Job Titles.


The catalog will be and object managed by the system.

The buying dept is an actor of another use case (I just didn't include all the primary uses cases in the diagram I posted for clarity).


Tom Tees wrote:Looks pretty good, but your Project Mgt System (or whatever) is an Actor to your primary Use-Case, right?

Also, I personally avoid <<included>> Use-Cases because it often leads people into "functional decomposition", although your use looks okay.



Actullay the validate use case needs to connect to the project management system to be able to do its jobs (the communication is one way and the projet management system is not part of the application I'm supposed to make).

I also removed the validate use case (I added it later after the writing of a narrative for the buy(select) use case, meaning this is a new use case that participate in the buy(select) use case realisation).

I'm trying to model a system for e-procurement (request for buying goods, purchase orders, receiving and invoice verification).

I'm in the middle of drawing the use cases. I have drawn my primary use cases and I'm refining the first one.

The first use case is about this statement :

A person in the company is a member of a team that execute projects. For the execution of a specific project that person need to buy a specific amount of goods. To be able to do that they select in the application one or several items from a catalog referencing products and suppliers. They select all the products they need and insert them into a request. The request has to be validated by a supervisor before it is sent to the buyings department. The validation information is present in the project management system (which is external to the application I'm supposed to make).

This is the use case I came with

Can anyone correct me if I'm wrong.

Thank you.

OK, I need to read back some UML I'm kind of a bit rusted in that department.

Thank you all

Jimmy Clark wrote:Keep in mind that a framework and an application are not the same thing.

If your task is design a "framework" for building applications that move data from XML format to relational format, then in your mind you need to think about the differences between a framework and an application. A "framework" is a skeleton. It does not do anything on its own. It is used to help with application development. You need think about what developers needs to do to build an application that moves data in this fashion. AND, then think about what "you" can do to help "them."

Your objective and focus should be on helping application developers, not building an entire data processing application.

It should be something like hibernate...

done in a month of time
Hi, excuse me for the late answer as I had problems with my internet provider.

I had to mind to draw class diagram and sequence digramme when I start to design the framework.

For the analysis part and to gather the requirements I think about drawing uses cases first. But the problem si that it is a framework. Until now I used to design only management application with actors in the use case as cashier, student. But now the users of my framework are other applications. So who what is the name of the actor in the use case (is it the user of the application that uses the framework), is it the application that uses the framework(but can an application be an actor in a use case). I'm kind of stuck here

Also would it be wise to add state digrams ?

For example a state diagram for the XML Schéma, the XML Document, the XML query something like this


For a university project I was given the task to design and implement an XML-relationnal framework.

After an analysis phase I have found the components that I need. I have done the following drawing to show the interaction between them

I would like to draw a UML diagram to explain how the component that process the annotations works (ie left part of the schema). I wrote a few sentences about how the component works, but I'd like to explain it also with a UML diagram. But what type of UML diagram do I need to use.

This is what I wrote.

The annotation processor takes the user annotated schema as an entry. It then parses the schema et verify the validity of the mappings used by the user. The annotations processor then creates a relationnal schema in the rdbms and persist the mapping information that the mapping interface will use in another database.

I guess I'll just continue on the modeling and programming and see if I made the correct choices.

thank you.

Frank Bennett wrote:There shouldn't be two relationship symbols connecting the Dice class and the Game class. There should only be one. When you want to "optionally" include multiplicity in the relationship between two classes, you add the number near the class that it applies two. In this case, it would be a small two.

Keep in mind that a Class diagram is typically for describing classes, not run-time objects. It is usually best not to include run-time information in Class diagrams. Any important information can be included as a Note, which is a very helpful UML tool.

Thank you, I will change the multiplicity.

But actually by a correct model I was meaning did I forgot to add some class in the model, is the modelisation not correct semantically ?

I will use the abstract factory (or factory method) for the dao.
Probably the observer for the view-model.
Singleton in dao, controller...

And MVC pattern for the whole application.

But before starting I wanted to make sure that my model was correct and I didn't miss anything.

For a design pattern class I have a little application to make using design patterns.

I have developped the model of this application, but honestly I don't know if it's correct. Can anyone give me some insight on it.

The question is:

* A Dice Game
* A Player rolls 10x 2 dices
* If result = 7, score=score + 10 points
* At the end, score of the player is registred in a database

I have come up with the following class diagram:

Basically the game starts, the game object uses 2 dices and a player object. each time the rollDices() method is called, the two dices are rolled and the score is incremented if necessary. At the end of the game the score and the player name are persisted in tthe database.
Usually I don't like the head first series, but the one on design patterns was pretty good.