wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes design related interview questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "design related interview questions" Watch "design related interview questions" New topic
Author

design related interview questions

Jhanavi Shivgami
Greenhorn

Joined: Aug 10, 2004
Posts: 11
Hi all,

pl clarify reg this interview questions

1)tell me about core patterns and design patterns
2)tell me about factory patterns.
3)is mvc is pattern or architecture?
4)can i use session facade pattern for a web application which does'nt have EJB, but is having Java Bean Components?

Regards

Jhanavi
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Hi, May be this may help you.

Tell me about factory patterns.
Factory Patterns are patterns in which a special class is made which returns Objects of a class instead of instantiating a class with its constructor. In factory patterns you pass the class name and it returns the Object of that particular class.

is mvc is pattern or architecture?
MVC is a Architecture as Patterns are the Solutions to the recurring Problem whereas Architecture is not meant for the same.

can i use session facade pattern for a web application which does'nt have EJB, but is having Java Bean Components?
No Session Facade is of no use if you are not using EJB's as one of the benifits of Session facade is that it wraps Entity beans and are on the same Machine(JVM) where the Entity beans are kept so they save the network bandwidth.

Thanks,
Rahul Juneja


Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
in some books i have read the term MVC as a design pattern or a pattern. wht i think is, it depends how you are using the MVC. if there is MVC and some other design patterns involve in your application architecture, then MVC becomes a pattern, else if it is all alone MVC then we can refer it as an architecture.

some more tips:
- mostly we use session beans as a facade.
- do not use stateful session beans in web apps. instead of that use
HttpSession to store the user particular stuff.
Jhanavi Shivgami
Greenhorn

Joined: Aug 10, 2004
Posts: 11
thanks rahul. one more thing. actually in our web application there is no EJB components(small web module), we are planning to go for mvc architecture. u pl specify which are the applicable design patterns for this architecture?

we are planning to go for Front Controller,value object and signleton. is it ok? or anymore?

Originally posted by Rahul Juneja:
Hi, May be this may help you.

Tell me about factory patterns.
Factory Patterns are patterns in which a special class is made which returns Objects of a class instead of instantiating a class with its constructor. In factory patterns you pass the class name and it returns the Object of that particular class.

is mvc is pattern or architecture?
MVC is a Architecture as Patterns are the Solutions to the recurring Problem whereas Architecture is not meant for the same.

can i use session facade pattern for a web application which does'nt have EJB, but is having Java Bean Components?
No Session Facade is of no use if you are not using EJB's as one of the benifits of Session facade is that it wraps Entity beans and are on the same Machine(JVM) where the Entity beans are kept so they save the network bandwidth.

Thanks,
Rahul Juneja
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Hi all,

Without EJB, one can think of implementing the MVC architecture without using the design patterns like ServiceLocator, Session Facade, Message Facade etc. One can use other patterns like Business Delegate, DAO, Value List Handler, Command, Singleton, FrontController, ViewHelper etc. without any issues. Unlike Entity Bean inserts to the database, workaround code can be written to insert/update the same in the database whereas DAO can be used for all queries hits to the database.

Refer to the earler Petstore example on the net http://docs.sun.com/source/817-2334/04_programming_web.html
http://java.sun.com/blueprints/code/jps13/src/

Focus on the FrontController, ViewHelper and a couple of Value List handler patterns of importance and then couple these with other patterns as and when required.

Rgds,

Seetesh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: design related interview questions