Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Parag Doshi

Ranch Hand
+ Follow
since Jun 29, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Parag Doshi

Originally posted by Jay Sam:
Hi - this is to anyone who already passed Part 2.

I guess you did use Servlet Filter pattern (as in the petstore example) for signing users on to protected areas.

Well anyhow, I do.

My question: did you mention and show the filter in the sequence diagrams ?
Did you show generation of value objects etc. in the sequence diagrams ?

I wonder if that level of detail is necessary. I would like to mention the servlet filter in the text, and not show it in the sequence diagrams.

Regards,

Jay




Jay,
I used the servlet filter in my solution. I did not show the filter related classes in my class diagram. I did show the filter classes in the sequence diagram. My seq diagrams were very detailed and they did show jsps, filter classes, servlet, VOs, etc etc. I also showed the filter classes in component diagram.
Ofcourse, there is no right or wrong way to approach this. It all depends on the level of detail you want to consistently maintain in your diagrams.
Detailing the flow and use of the servlet filter in the documentation would lead to further clarity of your architecture.

hope this helps..
parag

Originally posted by Dhiren Joshi:
Thanks for all your suggestions.
I was referring to the part where just selecting flight without yet having the need to select seats. In the use case it is one action and I dont think it necessary to go to the business tiers.
for the other calls these are very good suggestions for handling the requests.
Thanks
Dhiren



Dhiren,
It all depends on where u want to cache your flight results. If you feel that your HTTPSession can handle the flight results, then, yeah, you wouldnt be going to the business tier for retrieving the flight results as they are available on the web tier itself. Also factor in the fact that with increasing number of users, your HTTPSession would soon be bloated, plus if you are gonna load balance the web servers, wouldnt you want to keep your HTTPSessions as light weight as possible?

Just wanted to know your thoughts on these..

Parag

Parag
I feel that you can go one step further and specifically differentiate between the two by saying, you can cache the flight results and page them thru for the client, but when they make the selection of flight, the seat selection comes from the DB.

HTH
Parag

Originally posted by Justin Chang:
Hi, Parag

I have one question. Did you use EJBController (which is used in the PetStore) ? Or your BusinessDelegate directly talks to SessionFacade of each sub modules ?

Your comments are truely appreciated!


Justin




Justin,
I didnt use the EJBController. I had my BDs directly talking to the SFs. I didnt follow the Petstore architecture. It was easier for me to visualise a separate SF for each module and the BDs knowing which SFs would service its requests.

HTH
Parag

Originally posted by Marius Huianu:
Parag,

How did you solve the problems with crisscrossings in the component diagram ?

For example, a service locator is referenced by many ejb components or business delegates and that is why there are a lot of crisscrossings. I am going to put a label connected to the ServiceLocator writting in that all
delegates and session beans have a reference to the service locator.

Regards,
Marius



Marius,
Yeah, I did just that. It became very complicated to show each component (BD and SFs) interaction with the ServiceLocator.

Parag

Originally posted by Lucy Hummel:
Hi Parag,

On 3 Dec 2004 you mentioned that you use ValueListHandler.

One question pops up in my mind. How does the Desgin Pattern 'ValueListHandler' realise the Use Case:
'delete a value in the list'.

Is the Design Pattern 'ValueListHandler' only for read? Or can the Design Pattern read and write on the list?

The Design Pattern 'ValueListHandler' provides an 'Iterator'. In general the Interface 'Iterator' provides the method 'remove()'.

So does it mean that the Design Pattern 'ValueListHandler' handles the Use Case
'delete a value in the list'
by the Iterator?



Lucy,
Sorry for the late response. My ValueListHandler provided only read-only functionality. I didnt need the 'delete value from list' functionality. Am I missing something here?
I think we are open to provide the implementation of the Iterator. You can have one which can throw an exception if someone tries to remove something from the iterator.
From what I know about this design pattern, ValueListHandlers are mainly for handling huge read only data which needs to be displayed in pages and the rest of the results are cached.

HTH
Parag

Originally posted by James J Xu:


Parag,

Would you explain what the PMI stands for? Is it Java related or something else?

Happy new year!

James



James,
Happy New Year to you too ! PMI stands for Project Management Institute. Its a global body having certifications in Project Management. It would be a good certification to have along with the SCEA.


Parag

Originally posted by Dhiren Joshi:
Parag,
Which tier did u show the JSP components in.
Thanks
Dhiren



Dhiren,
It was in the presentation tier. Though, I did not explicitly demarcate my component diagram in tiers, I had mentioned in my documentation that the components are laid out in terms of tiers, i.e. the leftmost components belong to presentation tier, rightmost belong to EIS tier etc.

HTH
Parag

Originally posted by Dhiren Joshi:
Parag,
I am not sure how to depict the uses relation ship in UML. Is it the dependency links ?
Thanks
Dhiren



Yes, its the dependency link ( ---> ). You could also add a note on the dependency link saying 'uses', just to emphasis the relationship.

Parag

Originally posted by rose deng:
Hi,

How many jsps you show on component diagram? One jsp for a use case or one jsp for a screen?

Thanks for the answer.



Create a component and stereotype it as <<JSP>> and add a note stating that this component represents all the jsp's in the system. Its easier and cleaner that way.

Just my 2 cents..

HTH
Parag

Originally posted by Dhiren Joshi:

I am depicting in class diagram.
the sesisonObject is nfact the customer business object and an AccountManager is the SLSB.

Depicting some SLSB in class diagram.

Thanks
Dhiren



Dhiren,
If you want to depict that relationship in class diagram then why dont you use 'uses' relationship rather than association?

You can show that the AccountManager 'uses' Customer.

HTH
Parag

Originally posted by Detlef Folger:
Hi all,

does anybody know of a complete example that reflects all of the issues
of Part II of the exam? I am looking for an example (use cases) incl.
the design (of course a good one ) and ideally the code as well.
Does anybody know of such an example? Where can I find/download it from?

TIA, Detlef



I am not sure how good this one is, but its the best I found when I was looking for something similar :

http://www.math-cs.gordon.edu/local/courses/cs211/ATMExample/

HTH
Parag

Originally posted by liane xu:
Parag,

very good score.

I just wonder whether you use entity beans in your assignment. In terms of database related functions, I prefer using session bean plus DAO, or I could go straight to DAO if I do not care too much about resource management.

what is yout thoughts on it?



thanks




Liane,
I used entity beans for my domain objects, I didnt opt for session bean and DAO, mainly because I chose local interface driven entity beans with CMRs/CMP etc. They seemed to be the right choice for my design.
You could go ahead with SB with DAO, but you would have to justify why u went that route and decided to handle the JDBC calls urself.
Its generally not a good idea to call DAOs directly from your client tier, its better to do it from your business tier. That way you can abstract your persistence mechanisms from your business tier and client tiers.

HTH
Parag
Mark,
Some of my thoughts...

- Which kind of stereotypes should be used? Should I use generic ones as "application", "library" or only J2EE Patterns releated as "Business Delegate"? or both?


Most of the literature will talk about using the "application" , "library" stereotypes. I used stereotypes <<entity bean>>, <<stateful session bean>> etc. I did not use the generic ones. I also didnt use Business Delegate etc as the name of my component had them appended at the end. For eg. LoginServlet, WebAppBusinessDelegate etc

- When should I use a stereotype, when a label on a dependency link? Should I prefer therefore labels instead of stereotypes?


I have used stereotypes for my components and labels for my dependency links.


- Should I include a component "BDOM" with stereotype <<library>> in my component model, which represents the business domain class model?

My BDOM components were either realized as entity beans or as POJOs. I made a note that if its not sterotyped as Entity bean, then its a POJO. I havent used any generic stereotypes, though it can be very well used there.



- Should I model only one component for the JSP's or each JSP separately?

One should be enough. Create a component and stereotype it as <<JSP>> and attach a note suggesting that this represents all JSPs in the system or words to that effect.


- What is about the DAO's, should I show DAO separately or only one and add there some note?

You can take the same approach as JSP, but I showed the DAOs separately.


- what is about the interfaces, I saw some component diagrams there has been shown interfaces as "HTTP" or "XML". I don't thikn that this should be part in a component diagram, this is more related to a deployment diagram. To list all home and remote interfaces of a bean makes also no sense in my eyes. So what type of interfaces do you suggest to show?


You are right. I didnt show any interfaces other than my business interfaces (For eg. I have Adapter interfaces and its realization components). I have avoided showing any other EJB related remote/local interfaces and also the HTTP and XML related once. My focus was mainly on the business interfaces and components.


HTH
Parag