Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!

Ricardo Ferreira

Ranch Hand
+ Follow
since Feb 13, 2006
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Ricardo Ferreira

Originally posted by Bruno Taranta Arruda:
Hi,

I work with java applications(with architecture and design) for some time. We all know there aren�t single answers for those problems we encounter at our profession, with design of j2ee apps is no exception.

I�m used to do the things "my way" based on some experience and a lot of materieal that I�ve learned thorught the past years. But now I need to finish my part2 of the "old" exam and I�m a bit confused. I just want to know what the examiners commonly see, cause there is no conversation and meeting like a real job has.

I hope I don�t cross the line of the questions regarding this forum rules.

1- A class diagram can show classes obviously, but with some research throught this forum I�ve noticied that the majority of ppl make the class diagram as an extension of the BDM, excluding details about the design of the solution, I was not very confortable with it at the beggining but I accepted it, and now I want to know if I should put the subsystems (payment and mileage) on this diagram, and if there is room for some patterns like adapters to isolete the dependency in this same diagram, or it should be all on the component diagram?

2- About the component diagram, I want to know if I need to specify every component of my application, for example, if I want to use DAO pattern, should I put a DAO for every entity like customer amd etc, or just put a DAO component to illustrate the architecture and put a note that should be one for each entity ?

3- If there is no design decisions on the class diagram, what I should interaface with at the sequence diagrams? WIth the components itself or should i create the classes at the sequence diagrams?



I�m sorry for my english and thanks a lot for the cooperation.

Best regards.

[ April 24, 2008: Message edited by: Bruno Taranta Arruda ]



Hi Bruno,

Let me try clarify your doubts answering your questions pontually Ok? Here we go ...

1- A class diagram can show classes obviously, but with some research throught this forum I�ve noticied that the majority of ppl make the class diagram as an extension of the BDM, excluding details about the design of the solution, I was not very confortable with it at the beggining but I accepted it, and now I want to know if I should put the subsystems (payment and mileage) on this diagram, and if there is room for some patterns like adapters to isolete the dependency in this same diagram, or it should be all on the component diagram?
R = Create to differente diagrams, one focusing on the analisys level, showing business entities, relationships, multiplicity, not mentioning attributes or methods and focusing on inheritance if applicable. The second diagram should be a structural explanation of your sequence diagrams, focusing on associations (aggreg or composi), dependencies, layers, packages, interfaces and realization, and some important attributes that should be valid mention at the diagram. At this second diagrama, you could mention some components like fa�ades and controllers, but do not mention those components (any of them) at the class diagram at analisys level.

2- About the component diagram, I want to know if I need to specify every component of my application, for example, if I want to use DAO pattern, should I put a DAO for every entity like customer amd etc, or just put a DAO component to illustrate the architecture and put a note that should be one for each entity ?
R = There is no rule for that. Choose one and ask yourself: I should be able to understand this diagram without all those details? Take a friend and ask him to understand your design. If could be a little complicate to understand, means that your diagram are poor. There is no pattern for that, architecture is about communication. Three diferents Java projects could have different architectures and forms to demonstrate it. Regardless the exam, design an architecture implies of create a structural mechanism to create an application in a controlled fashion.

3- If there is no design decisions on the class diagram, what I should interaface with at the sequence diagrams? WIth the components itself or should i create the classes at the sequence diagrams?
R = Both of them. Demonstrate at your sequence diagrams the behavior of some use case transversing your components and entities. Just keep and mind that based on the layers and tiers concept, some entities could not be accessed by some components, eg: Remote JVMs does not access JPA entities using LazyLoad. Rembemer that UML 2.0 offers some special kind of messages for construction and destruction of objects, try to use them.

Cheers,

Ricardo Ferreira
The key for your provided article is that SFSB must be removed by the client after it used for some task. Regarding this removal process, the activation and passivation operations are still be performed in the application cycle.

So, in that case, this os the cost the SFSB brings to the solution, the passivation process. Swapping objects to the disk is an expensive process. The only way that an SFSB would never passivate is using every time in order to garantee that the Container should not think that it is obsolete. Wich means that, this is a performance issue to be mitigated.

Try to make a tunning of an Application Server to engage a more detailed resume about EJB resouce management. Do not truste in this articles, they can be very intrusive to promote more Application Server sales.

Regards,
SFSB are heavy objects. They use much more resources rather than SLSB. The questions attemps that the site are going to be accessed by a huge number of customer, so, if each access from remote user needs to open a new fat object (SFSB) you could comprimise your EJB server with so much resources.

State in this case does not need to be transactional (user sessions) so, the transacional behavior could be isolated only in the Domain Model, which is, the Entity Beans maintained by the EJB container. When using Entity Beans, only CMT are allowed to be used, so the letter 'C' could be considered the finest answer for this question.

Best Regards,
Essentially, a component could be defined as a replaceable unit that provides adhoc connections by well defined interfaces. But, besides that, a component has a special talent to be reusable by any context, instead that environemnt that it was originally created.

For example, a class could have interfaces and by those interfaces, could be replaceable, since changing its implemention would not create any impact in the consumer artifact, since the interfaces are immutable. But are this class really reusable? The experience says that: No, classes are created to solve any particular problem.

A component, instead, is a kind of classes that could live and be executed at at execution environment that supports the 3'C concept:

- Container
- Conector
- Component

A shorter example of a truly component could be the CORBA objects. Since they have formal interfaces and are executed in a common environment (the container) it is really reusable. I can create a CORBA object in C++ and use that object at a Delphi program running the CORBA execution environment.

Another example of an component is the EJB's. They are essentially classes, that are used by formal interfaces. The diference is the container and the conectors that provide the capatibility of be executed at any particular EJB container that are aligned with the EJB specification. Servlets are, by this point of view, another example of truly components.

Based on that concept, Sun sees J2EE artifatcs as components, because the 3'C architecture provide that capatibility.

Regards,

Originally posted by Oleg Puzanov:
Hello,

According to the notes on Sun SCEA certification page - any version of J2EE can be used for SCEA Part 2 assignment. So I just wanted to make sure that I really can you ANY version of J2EE and ANY kind of framework/infrastructure.

For example: JBoss SEAM (JSF, EJB3, JPA) - will it be fine?

Thanks in advance,
Oleg



Yes, you can!

Originally posted by Philip Pomario:
Guys, I've done my homework: read the whole UML Distilled book by Fowler and through the UML specification. I understand the difference between Aggregation and Composition, but I know that many programmers don't. In a profeesional environment I probably wouldn't use those concepts in a diagram, because this would certainly motivate endless philosophical discussions regarding their meanings. I would instead use only associations and multiplicities to make things as clear as possible.

Though, here we are trying to earn the SCEA title, and this is my question: in the realm of the certification, Aggregation/Composition should be used? Must be used? Has anyone ever submitted an assignment without them and passed with a good grade?

Your comments are much appreciated.



Philip Pomario,

IMHO, aggregation and composition are a piece of information that really matters at any technical architecture. For example, composition between two classes means that are lifecyle dependendy there. You can't be more specific using another technique to emphatize that two classes are dependent by lifecycle (eg: Order, Item).

So, I think that should be nice if you consider to use that!

Regards,

Originally posted by Ben Two:
Hi Philip Pomario

In a Fat Client, like a Swing application, the dataset can be cached in client JVM, that means most of the time it does not need a communication to server, only load the initial data when the application starts and then periodly refresh the data, and finally connect to server when transaction commit.In this case the response time will be much more faster than a web application like JSP or Servlet, because theoretically we only need twice connection to the server, start up and commit.



Ben,

I disagree with your point of view about thin or fat clients. IMHO, there is no fat client concept when you are using three tier approach. The three tier approach says that the client MUST be thin because the whole processing, management and EIS access are concentrated at the middle tier, which means that the j2ee application server handle the heavy stuff.

And there are some architectural considerations about cache data at the client tier. This is not prohibited, but should be used with some constraints. If you cache business data at the client tier, you could potentially compromise the reliability feature of your solution, since a crash ocurred at the client tier could loose the whole data.

This is the reason for SFSF usage, when user access data must be cached to improve performance and reduce the network calls. So, I would recomend you that pay some attemption about data caching, because client caching are not a robust solution, as the application server provide for you.

And, IMHO, i believe that a web application running at the same application server that the ejb components reside are so much more faster, because you could use features like local calls instead remote calls that are expensive for the application server, since protocol transformation are required.

Regards,

Originally posted by Leo Gao:
How to draw login sequence diagram if I use container managed Security?



Container Managed Security is nothing more that aspect oriented programming. Every container interception as security, transaction and so on, are application of the AOP tecnique at container managed components like EJB's.

Have said that, you can create your design based on AOP modeling and architecture, which means that you must use Pointcut and Avisor sequence diagrams.

But, IMHO, I would not give so much detail at the sequence diagram, instead, I would provide more 'business view' for those diagrams, once the technical architecture could abstract these details.

Regards,

Originally posted by Philip Pomario:
Guys, the system requirements states that response time should be very fast and that a "graphical user interface" must be available to a special type of user.

The main question is: What is your understanding of a "graphical user interface"? Is it obligatory to be a standalone fat client (such as Java Swing apps)? Or could it be a webapp running on a very small container (such as Jetty)?

Your comments are much appreciated.



Philip Pomario,

The key of the assignment is judgement tought about the architecture. You should take your good sense about what must be done based in your interpretation. It is just a tip ok, in the next few lines, i'm going to answer your question.

IMHO, when someone tell me about a "graphical user interface", i see two kinds of applications: web interfaces and desktop interfaces. The fact the some application is graphical based, does not means that it should be swing based nor other client of desktop applications (non web interfaces).

It is true that you can provide a graphical user interface using web clients, because even the runtime is a browser, but it is a graphical user interface. A non graphical user interface could be the mainframe green screens, or cobol based applications.

Now, when someone says that the applications must have a very short response time, this is a tip about what kind of application must be created. If you think about it, using a web application running in the same application server that runs the logic code (EJB Layer) must provide more performance rather than a remote desktop application based on swing, that would make use of network bandwith and complex protocol transformations (RMI/IIOP, SOAP, XML-RPC).

So, I would create a web application for that, since provide more performance rather than a desktop application. If this application would be used only at the network, a load balancer could have some logic that won't use DNS or Firewalls, using instead, direct IP address, provinding shortest response time.

Based on that, use your architect judgement

Regards

Originally posted by Theodore Casser:


Nineteen minutes would be impressive. I think you meant ninety.



That's right, was a little written mistake! Sorry

Regards,

Originally posted by Fatboy HK:
It is a 90 minutes test with 4 essay questions.... So I need to write loooong discussion about my assignment? I am quite worry about it, because I may not have enough "material" to write about, or I may be unable to comprehense a discussion with certain amount of "content" in 90 minutes.....



Part 3 of the SCEA certification ask you about some topics about your design. The topics are strategically distributed over the overall architecture, like persistence, user session management, legacy conectivity, etc.

Have said that, each question is a very focused question about a specific topic, so, the discussion about it won't be so extensive. In fact, part 3 of the certification is applied to verify if you were the guy the actually did the assignment. So, the correctors will compare your answers with the assignment to be confident that you're the one.

So, don't be afraid, nineteen minutes is time enough to write down your point of view about the assignment.

regards,
Hey Aurelio,

You made it! Congratulations,

Cheers!
First of all, this is a scea regarding question? Otherwise, try to look for this answers at others forums. Considering that it is about scea assignment:

What are your motivations to store session at the client tier? This is absurd at jee applications because client tier does not scale at many redundant servers, and potentially you could loose your session at a application client trash. Keep session at the web or ejb tier remains clear because you could threat aspects of concurrency and transactions data of sessions.

"hoping all browser support AJAX"

This is not a valid architecture consideration. Architecture means create solid based applications using proof of concepts, robust analysis and design methods and mitigation of technical risks. Architecture are used at the elaboration phase to ensure that construction are going to be made without potential risks of failure, so 'hope' that the browser supports Ajax is not a good approach. For the scea assignment, this is the first thing that the corrector will see at your design and potentially reprove you.

Revise your non-functional requirements and verify valid considerations to use session data at the client tier. Just to keep the things clear. Ajax does not need to be used to maintain client state. At JSF programming model, we call this 'save-state' attribute, this is the same at ASP.NET programming model. Is just about a hidden field that store the serializable version of the page. This is a valid approach, but for transactional and concurrency features, this should be evicted.

Regards,

Originally posted by Pham Huy Anh:
Hello,

After reading through this forum, I see some members use HttpSession, some others use SFSB, some use back end database...

Me, I propose to store session information in clients tier.
- AJAX for web, hoping all browser support AJAX.
- some kind of static JavaSession in swing

Do you think it's OK? And do I have to support non-AJAX browser.

Thanks in advance

It will depend of what you're trying to do. For architecture pourposes, you should try to define a high level architecture, focusing at layers, dependencies, business components and subsystems. But for some implementation model, you could enter at those low level details about patterns and classes from MVC.

My tip: Keep the things simplier! Create something readable, but not overcluted.

Regards,

Originally posted by tery valencia:
hi guyz,

just a question about component diagrams. Do you deeply explain the concept of a MVC framework (Front controller + dispatcher + helpers(model) ) or can we just put a component tagged <<Servlet>> just as in Cade's book. I dont know till which level of explanations we re supposed to arrive.

i mean :

first solution is :

Jsp component ---> Servlet Component ---> Business delegate(with service locator) ---> Facade SLSB .....


second solution is :

Jsp component ---> Front controller (with request mapping, request processor, command pattern, dispatcher) ---> Business delegate (with service locator) ---> Facade SLSB ....

I m making a Customer Component Diagram and i m confused about the strategy to use.

any ideas ?

tery

Originally posted by Prav Chau:
In EJB 2.0, BMPs are not allowed in Entity Beans. Is it the same case with EJB 1.1 as well?



Prav,

I think that you could study a lot of EJB programming, and forget for a while the questions and SCEA certification. You're a little bit confused regarding EJB's, and for the SCEA exam, you need very strong skills at this area.

The only restriction that I know about Entity Beans that are interesting for the exam, is about which version of EJB introduced local interfaces for CMP Entity Beans, which is EJB 2.0. Plus, EJB 2.0 introduced container managed relationships (CMR) at the Entity beans programming.

Try to read the EJB specification to find this kind of answer!

Regards,