• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

doubt about component diagram

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been trying to follow the eg given in mark cade's book for component diagram, but it looks to me as an extended version of class diagram. As far as I understand, a component is a physical module with a well defined
set of interface. So if I have a customer module (component), I will have have all my facades for accessing the customerEJBs and related entities, along with the DAO (customerDAO) and other value objects (customerVO,addressVO etc) in it.And my interface to this module will be the facade home/remote interfaces which is the only entry point through which other components can have a dependency to it.

But if you look at the component diagram in cade's book, he has indentified each JSP pages, the servlet controllers, session beans etc as individual components. I agree that a component can consist of 1 class, but if you are drawing each class as 1 component, then you are trying to draw a class diagram rather than a component diagram according to the UML standards. Also I have heard about drawing VO in component diagram. Do you guys think VO as an independent module.According to me, it should be part of one of the existing modules/components.

Now I am a bit confused about what exactly sun is looking wrt component diagrams. It carries 44 marks and can't really think of loosing marks in that area. I am sure guys who passed with 40+ components would have added all the VOs in it to get to that figure.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the J2EE viewpoint, JSPs, servlets, EJBs, JCA resources, applications client, applets.. are all J2EE components !( we should add also JavaBeans).
See specification
May be, it's possible to model jsp pages as a generic component labeled "view" with a attached note listing all your jsp pages.

Hope this helps

Akar
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Akir

JSP,Servlets ,VOs don't talk to each other through interfaces(definition of component)but this is the approach followed by ranchers here.

Giju,

I would treat EJB as one component but DAO will be different component.EJB can talk to DAO through interface.What I did not like abt cade's diagram is that facade is shown just like that with no mention of interfaces(shown through lollypops).
Which version of UML are you using?
I am also bit worried abt component diagrams .I am just relying on online resources.Are you referring to any book with emphasis on component diagram?



Thanks
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx for your replies guys.
Ajai,
Are you showing interfaces(I mean lollypop notation) for every component in the diagram ?
I am using Rational Rose 2003 for creating my diagrams, so I think it's supporting the earlier version of UML and not UML 2.0
I am also relying on online resources since I couldn't find any good book that describes more about component diagram( that's the only area where I'm stuck now )
Anyway, I am not planning to include any of the VOs and JSPs in my component diagram. I've got it in my sequence diagrams and will also include it my document.
 
Akar Rafidj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ajai,

J2EE and UML differ on component definition, for J2EE, jsps, servlets, EJBs, application clients, VOs (if based on javaBeans technology) sre all J2EE components (refer to the specification or J2EE blueprint). They are all reusable components from J2EE viewpoint.I don't understand why you say that jsps, servlets... don't talk to each other through interfaces ???
I think that you don't have to show well known interfaces (Home or EJBObject...) in the component diagram.

Akar
 
Ajai
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Giju,

I am using Jude which I think is on version 1.4.
As for interfaces I might show them only for EJBs...Those are the only components for which I have interfaces .Do you have components on web side having interfaces ?
Though I agree with Akir that everybody knows that EJB has home and remote interfaces.

I read another post of yours on JAAS.Have you implemented it in some projects?

Akir,

Can you pls tell me which specification .Are you talking abt UML specification from omg.org?

.

I don't understand why you say that jsps, servlets... don't talk to each other through interfaces ???



You had mentioned in the post that we should have jsp,servlets also as components .Since components by defintion are modules which talk to each other through interfaces .I was not able to fit JSP,Servlets with the definition of component since they don't talk to each other through interfaces
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,
Isn't the definition of a component as secified by the specs restrictedd to
JSPs and Servlets -- Web Server Components
EJb's (SFSB, StatelessSB, MDB , EB), Resource Adapter Components -- Business Logic Components
in addition to the Client components ?

How does a DAO or VO qualify as a component ? A DAO or VO can hardly be described as a self packaged deployable unit of code.

I don't know about Cade's diagram, but in my opinion DAO or VO's would not be part of the Component daigram. They would definitely be part of the class diagrmas.
Any comments ?
 
Goan Balchao
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I meant was something like --
http://www-128.ibm.com/developerworks/rational/library/769.html

Just an example
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ajai,
I haven't really included the interfaces for EJBs, since its obvious. And I wanted to keep the diagram simple without cluttering too much. I have added only for DAOs because it uses a factory pattern.

I have implemented JAAS for one of my project which is an online application, both for web and stand-alone client. And that's why I am so confident about it

Hemant,
I agree with you that VOs doesn't really fall under the category of 'components'. And even I haven't included it my component diagram. But I think DAO can be considered as components and it can expose the underlying implementation using well defined interfaces (factory method). Have a look at this
 
Akar Rafidj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ajai,

An interface is a specification, a contract: operation or set of operations (i don't use terms as methods or procedures, it's independent from any programming language) published ( accessible to a client) by a component (this component may be a single class of a complex module.

Akar
[ October 19, 2005: Message edited by: Akar Rafidj ]
 
Ajai
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Giju,

Are you using JAAS for authorization also given that we have only one role?Which app server you used?I want to implement JAAS before using it in my arch.Currently with Websphere It is little challenging.


Thanks
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ajai,
I have used it with JBoss, but we may move to weblogic soon. It works fine for me. I just extended one of the existing LoginModule(UsernamePasswordLoginModule) from Jboss to add more functionalities like password encryptions etc. It was quite easy to set it up for web and stand-alone client. I have used it for both Authorization and Authentication, created different roles etc.

For the assignment, I have mentioned that there will be two roles: the customer as a normal user, and the travel agent as a super user who has more privileges like searching for existing users in the system and making a booking, creating a user account for the customer(before making a booking)if one doesn't exists etc...

Basically I just extended the assignment a little more, but you are free to design it in any way you like ... even with one role !!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic