Hi All,
My Name is Muhammad Asif and working on an
java solution. I want to discuss the design that i have developed for the Managerial portion of my module.
Basically, on the Manager side i am giving a Java Swing Interface.
Now with every interface i have attached a Mediator/Helper that does some helping work for it and also
communicates with the application handler.
For every screen i have a screen identity.
Then For each action i have an event.
When a certain event occurs, the mediator calls the ApplicationHandler on the client side.
The Application Handler with the help of service locator locates the Controller
EJB.
All the data that i am sending to the server side is in hash map.
I have key value pairs.
(This is the first thing that i want to ask. Is this ok ?? because I will also need to store videos in the server side database. Will it be possible to send Videos encapsulated in a HashMap).
The controller EJB has one method that will handle all request from all modules.
The signature is
public DataPacket handleEvent(Event event,Identity identity,DataPacket dataPacket)
Where dataPacket is actually extending HashMap.
Now against this event and identity i make a call to teh database and look for the Action that needs to be generated. Action will basically be a class. For each event their is a corresponding Action Class.
The action class is instantiated and the perform() method is called for the appropriate action class.
in the perform method i am passing DataPacket and the result is also a DataPacket.
Then from the Action Class i call the DAOFactory to give me the Set of DAOs. If i need to use
Oracle Database i'll instantiate OracleDAOFactory else some other for the appropraiate database/
If some one who knows good enough about design tell me weather this design is correct. Or should i make any changes to it.
I am in particular interested in the fact that I am sending a complete DataPacket to the server side.
Which means for Videos i'll need to generate a byte array and send them on to the server side.
Asif
( I am not currently Using EJBs extensively and I donot want to use them either
{at the moment that is} )
[ October 28, 2002: Message edited by: Muhammad Asif ]