This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

Murali Ranga

Ranch Hand
+ Follow
since Dec 16, 2011
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 Murali Ranga

Each controller has it’s specific responsibilities,choose the controller or view resolver that is most appropriate for your application/use case.
Form type controller : Displaying the form and processing the data entered into the form.Like submitting the form data
Command type controller : Binding the request prametrs and doing validation. Example You can use for search functionality
Simple Type Controller : for simple request processing

If application using tiles You can use TilesViewResolver
9 years ago
Struts is a web framework only, Struts can be compared with the SpringMVC.
SpringMVC is subset of the Spring framework
Major advantages of spring Framework are
- Transaction management
- support for Messaging
- support and Integration with Other Frame works.
(Eg: Hibernate, Struts etc)

Struts implements MVC ,where spring has Spring MVC and Spring implements IOC Design Pattern and addresses AOP Cross cutting concerns.
Struts is heavy weight where as Spring is light weight framework.
9 years ago
Facade hides all the complexities of the system.
Clients invoke the interface but application hides all the complexity like creating database connections, processing business logic etc
On the same principle Session Façade is working for enterprise applications for interaction between higher level component and low level components .
Basically hiding the complexities of the system(low level components ) and providing an interface( higher level component )to the client
(You can see on Sun website)
For Example
Higher level component can be Session Bean
Low level components can be Entities.
Client invokes the method on a Session Bean that session bean calls all the other beans(Entities)
Client knows only Interface method and all the complexity handled in the session bean invoking other beans
Example some bank Transactions : has to be done in a single transaction
Means with one request to the server all the processing will be completed and response will be returned.
I am not sure about types of facade design pattern
Think about JMS Messaging
Message is received using publish/subscribe and while processing the message it will interact with other services, database objects/Entities to complete the request.

Always we assume that all the External Systems will meet SLAs

all messages should be constructed and sent to the IP address of the API server in a specified amount of time
Separate into two parts
1. Message construction at your application
2. Sending the message to external system

Message construction at your application
How your architecture supports the construction of a message within SLAs
You need some data from database, the same can be achieved by caching the data and retrieving from it.
If there is any design pattern helps to improve the performance
Based on Sud requirement using asynchronous queues for constructing the message
Because of Clustered environment: meeting the SLAs criteria as load increases

External Systems
Based on Sud requirement if possible you can define asynchronous communication with external systems and you are not holding your application resources for response. Incase external system is slow in processing the request it will not impact your application if it is asynchronous (depends Sud requirements)
Passing connection objects to constructor you will be losing extendibility of the code

My suggestion
Create a BaseDAO which has setConnection and getConnection methods
And also closeConnection
Each DAO extending the BaseDAO
1.create connection object
2. setting the connection objects to DAO
PersonDAO personDAO = new PersonDAO()
personDAO. setConnection(connection)
your DAO Method(){
// will call getConnection to get connection object

This way tomorrow if you don’t want to pass connection objects to methods then no need for changing the method signature
Message digest functions use one-way functions and it is infeasible to reverse/decrypt the message digest and discover the original data
For comparing the data/password,
The Enter password needs to encrypted and compared with the already existing encrypted data
9 years ago
You can design your database different ways.Most of your requirements are not clear to me,
I am giving some directions to design Unless I am incorrect as to the requirement
My understanding facility means test center location details
T1 (Facility Details)
T2 ( Exam/Test case details,not for a exam specific questions)
test_case_id, test_case_type, test_case_family etc( which are common to Test/Exam ,not pertaining each question)
T3( Specific to each question and mapping to Exam id)
Is it multiple choice questions? If yes then added choice as a column
test_case_id, Question_id ,question, choice1,choice2,choice3,choice4,test_case_expectedResults
I think you need user details also
t4 (user details)
userid,name,password etc
Storing the test results
From the application how the test results are evaluated,User provided answers are those stored in the user session and at end of the exam are you validating with actual result
Or depending upon your requirements if user can take/continue the same test multiple times login/log out
if you are using session and you are storing results for audit purpose
Then store all the answers as a single string and even you can use this for other scenario but application has to do some logic to get the results.
Disadvantage with this if question sequence changes then there will be mismatch
T5 :Unique_id,User id,test id,date,facility id ,answerstring,actualscore ,comments etc
If you don’t want to store as a string
T5 :Unique_id,User id,test case id,date,facility id , actualscore
T6 :Unique id,questionid,answer
Read carefully the SuD instructons
I am not sure each assignment will have different instructions,
but in my case the instructions were also mentioned with examples like what Components and important components required to show on a component diagram
Based on the instructions my understanding was
Almost all the (ejbs(Entity also),servlets,jsps etc) + important (controllers/managers and design pattern implementations).
In my case each tier did not have more than 10 to 15 components and
While showing the components I had followed the Core J2EE Patterns Catalog format so that it would clearly show design patterns also
Need stub classes for remote EJB invocations.
Just generated stub classes needs to be packaged in war.
Does it make sense?

"Be careful not to make assumptions that a
component may be used by another system in the future and build a
reusable component for a requirement that does not exist yet.. "

Initial version of Ejb technology was with only remote interfaces,
The applications were using remote interfaces considering future assumption that Components can be reused across the network/ other Java virtual machines. Which is performance overhead

Now Ejb come with Local and remote interfaces.Same way the spring Pojs and can be available as remotely by changing the some configuration.

No need to add extra burden on the Component considering the assumptions or future requirements.Components must be flexible and extensible.

It may not work all the time. Based on the requirements you need to take correct decision what is the right implementation for the component to make reusable

I have few questions?
Are they refining the search on the same data?
Means R1 data is refined to R2 and R2 is refined to R3?
or are they getting new set of data(R2) from different tables taking R1 as search criteria/input?

I am not sure how much time is taking for the actual query to fetch the data from database?
If the query is returning the results as per expected response time then keep the search criteria/input in the session .
Every time access the database based on the search criteria means build the query at runtime
like s1 ,s2 ,s3 as search criteria objects in the session
I think there is no time line for taking part2,but you must appear before the exam get outdated.
Once you register for part2,then in 6 months you need to submit it.
Only design...Class,sequence,component ,deployment diagrams etc