Visitor implementation and enum 1.5

7928 byte By alexsmaila at 2007-11-27 11:52:32
I have an application with enum, that's behaviour changes based on the value of the enumerated type, see http://java.sun.com/developer/JDCTechTips/2005/tt0208.html#2 for more detail. The problem that I see in this Design Pattern that client of the enum should decide what VisitorImpl should be ...

Annotations Observed

2643 byte By transient_mana at 2007-11-27 11:44:59
Hi all,I have a situation where I feel the need of combining Annotations and the Observer pattern. I would like to record field changes on an Object. So I decided to use the Observer pattern this way:class PersonObserver implements Observer{private List<String> changedFields = new ...

Multimedia program

363 byte By bem045000a at 2007-11-27 11:21:42
Im stressing and havent had time to do my final project for this class can someone help.. thanksDesign a Java art program that will give an artist a great variety of capabilities to draw, use images and use animations to create a dynamic multimedia art displayif you can help that would be ...

Design Patterns In Java

156 byte By yael800a at 2007-11-27 11:20:40
<p>Hi,</p><p>I would like to know if this book is good:</p><p>"Design Patterns In Java" - Steven John Metsker William C. Wake.</p><p>Thank's</p><p>Yael</p>

Strategy Pattern?

8055 byte By AQ_Javaa at 2007-11-27 11:20:00
The question:Design a small, prototype, application, which creates, stores and amends warehouse records. This may have little more than a StockItem class.Using each of the patterns Strategy, Decorator, Adaptor and in turn provide three different adaptations to your prototype application which will ...

Domain Objects and Interfaces

1278 byte By SmellyCata at 2007-11-27 11:16:16
I have a question regarding using interfaces, in particular for domain objects, and visbility regarding bidirectional associations.Let me explain the problem I am having using this exampleinterface INode {INode getParent;void addNode(INode node);}class Node implements INode {private INode ...

DTO doubt....

511 byte By jvmana at 2007-11-27 11:01:10
Hi all,I am having some doubt in Transfer Object pattern.. How should we implement that pattern exactly? Lets take an example of displaying data from customer table. In my customerDAO iam creating an arraylist (containing records retrieved) and sending back to the presentation tier through ...

DND Design

117 byte By mammaa at 2007-11-27 10:55:33
<p>I want to develop a drag and drop based IDE.</p><p>How should I proceed ? Should I go for an example to follow</p>

limitations of Factory Pattern

73 byte By NoNewNamea at 2007-11-27 10:46:59
<p>Hi,</p><p>Can any of u tell me the limitations of factory pattern.</p>

Synchronization of client and server objects

414 byte By Vladica_Ognjanovica at 2007-11-27 10:41:49
I have architectural question. At server side we have .Net web service, at client side we have java desktop application.Issue is that we have an object (large object), let say ObjectA, on client side and its copy on server side. We get ObjectA by calling web service.Now we need these two object ...

Web Service Implementation Heavily Based on The Singleton Pattern

1595 byte By mangofirea at 2007-11-27 10:38:35
Dear allI have recently joined a project that is 2/3 through development of a medium sized application providing synchronous and asynchronous implementations for a number of Use Cases exposed as Web Services. The design is one that I have not come across before and am keen to understand.Web Service ...

What Java IDE do you Use?

59 byte By Wraithstridera at 2007-11-27 10:31:41
<p>For me, The Eclipse IDE is the best IDE out there...</p>

Generating feedback messages on server-side vs client-side?

3679 byte By jdupreza at 2007-11-27 10:22:33
Hello,I am maintening a client/server app (Swing client, no Web pages), basically an order processing system. The biggest part of it is to verify the conformity of orders to a set of business rules.As usual, some of the verification can be made early on the client-side, but most of the verification ...

how to make a standalone proj as network proj

303 byte By brainvinod@yahoo.co.ina at 2007-11-27 10:21:35
Hi friends i have done a school management software it collects overall details of the students,exam,marks,report. i have done in java swings.now i need to convert this stand alone proj into nertworking ie windows based. Which concept i need to use how can i do this.by ...

MVC with Struts?

227 byte By vatora at 2007-11-27 10:18:19
<p>If you are going to implement the MVC pattern in a webapp, what is the best framework to use? </p><p>I've done a tutorial with Struts. Is that a good framework?</p><p>Is there any disadvantages by using such frameworks?</p>

Difference between Java & J2EE patterns ?

105 byte By Shebua at 2007-11-27 9:59:17
Hi...Can any one explain me what is the differnce between Java patterns and J2EE patterns ?

Design Database Connection Failure

473 byte By _AM__a at 2007-11-27 9:55:47
Hi, I was asked this in an interview.. 1) how would you a design a app. when database connection is lot. 2) will you have a database replica in another machine, so that if the connection is lost, take the data from the secondary database. I am not sure about this. But I strongly feel we never ...

Role Pattern

421 byte By mandartanksalea at 2007-11-27 9:31:36
Hi, I want to implement Role-Module wise security for the User. e.g. Admin can do everything in the site.High Profile users can Insert/Update/View all the modules.Medium Profile users can Insert/Update/View limited modules.Visitors can only view static pages. I hear about Role pattern but no ...

Singleton Webservice

532 byte By CvDiemena at 2007-11-27 9:25:27
Dear all,I'm trying to create a singleton webservice. (a webservice of which only 1 instance is allowed. All calls to the webservice should 'end' in this singleton)Reason for this; the application uses a multithreaded back-end controlled by a ThreadPoolExecutor. This only has effect when ...

Problem understanding Factory Method Pattern

851 byte By minkeya at 2007-11-27 9:20:56
Hi All,I am trying to understand Factory Method pattern from HF- Design pattern. However i am unable to understand how Subclassing the PizzaStore is better than creating the invidiual region specific PizzaFactories.The author gives an example of SimpleFactory and then creates region specific ...

reverse observer pattern

467 byte By AlienXa at 2007-11-27 9:16:02
hi,is it possible to use the reverse of observer patterni.e - observer pattern is described normally as there is 1 subject & many observers.So when the subject changes, it notifies the observers. My problem is I only 1 observer but many things change, so when each of the things (subjects ) ...

Hard code the values of DB.

238 byte By PaviEluri20a at 2007-11-27 9:10:24
Before I start work on a DB- I thought to execute code with JSP- Formbean- Action Servlet- Business Class- DAO flow. Is it possible to hardcode values and retrieve it from DAO? Pardon me if this sounds dumb question. Thanks,

Design ideas for retrieving Data for Read Only

642 byte By durgakbea at 2007-11-27 9:09:21
Hi All, Currently I am in the process of evaluating different design ideas for the search functionality of my application. I am looking for a best option for retrieving the data by executing some complex sql queries with huge query criteria and showing the single or multiple records to the ...

DAO

594 byte By TechGSisa at 2007-11-27 9:09:16
Hi friends.I want use DAO for create a Swing application, that acess to PostgreSQL.I want to retrieve a list of objects ( for example: clients), How is the best implementation?Client[] clients = ClientDAO.getClients();or javax.sql.RowSet clients = ClientDAO.getClients();I'll use result ...

DAO design pattern

291 byte By PaviEluri20a at 2007-11-27 9:02:00
I have 2 DB's (sybase & oracle). I need to pull information from both of them and put it in another DB- table (may be oracle). I am planning to implement DAO and here is my problem:-1. ShouldI use 2 DAO's for two DB- tables? or just one is sufficient using a DAO factory?

DAO design pattern

291 byte By PaviEluri20a at 2007-11-27 9:01:59
I have 2 DB's (sybase & oracle). I need to pull information from both of them and put it in another DB- table (may be oracle). I am planning to implement DAO and here is my problem:-1. ShouldI use 2 DAO's for two DB- tables? or just one is sufficient using a DAO factory?

simple question; cross referencing classes

399 byte By Bhishmaa at 2007-11-27 8:53:29
Hello, I have 2 classes. Address & User. The relationship is Address belongs to User (& is a 1-1 in my case). As such I have an Address reference in my User class.Class User { Address addr; ...}Under what circumstances should I also include a reference to User within Address ?Class ...

Proxy Pattern

650 byte By dfvdfvdfvxfva at 2007-11-27 8:43:22
Hi all,I've been reading about the Proxy Pattern and it seems like just normal encapsulation to me or do I misunderstand it?To me, Proxy looks like using a "middleman" class to delegate requests to the actual class so that the implementation of the actual class is hidden from the user.Another ...

simple subclass question

2383 byte By dfvdfvdfvxfva at 2007-11-27 8:17:52
Hi all,I have a superclass Person and 2 subclasses Male and Female that extend the superclass.public class Person { // name stringprotected String name;// gender : M or Fprotected String gender;public String getName() {return name;}public String getGender() {return gender;}}// End of ...

what is a DAO and how to implement a sample example?

247 byte By PaviEluri20a at 2007-11-27 8:11:17
Hi all,I am new to patterns and need some help with DAO's. I want to work on a sample app using struts. Please give me the links so that I can go ahead. Your answer may help hundreds of others who are using this forum.Thanks,

A suggestion assigning responsabilities in OO Analysis

1992 byte By smokinga at 2007-11-27 7:55:42
Hello everybody!I am working to a project and I have a issue about giving responsabilities in OO Analysis for which I kindly ask your suggestions.The project, in brief, is about a system which has to manage the money an institution (e.g: Association for cancer research) donates to a research ...

Factory inside a web application. Design issue.

1497 byte By Kamal-Mettanandaa at 2007-11-27 7:49:34
Hi all,My web application has a SearchManager. (which obviously doing search).class SearchManager{SearchFactory factory = new MySearchFactory();public SomeClass onSubmit(HttpRequest request, HttpResponse response, SomeCl obj){factory.search();}}I need a connection (instance of MyConnection) for ...

Allowing a program to enable/disable some functionalities

879 byte By java_knighta at 2007-11-27 7:03:24
Hi,I have developed an application that allows an user to perform several operations. Now, I need to add a new feature to it: some operation is classified "unsafe". The application can therefore be run in two modes: safe mode (allows only safe operations) and unsafe mode (allows safe and unsafe ...

Proccessing Annotations and design problem

757 byte By java1357a at 2007-11-27 6:57:09
Hi Experts,I have a problem in designing an ApiI define a bunch of annotations for my value objects at runtime, currently I have a AnnotationUtil class in which read all fields of the given classes and put the field name and its annotation in a Map structure so whenever I need to know the ...

Design of Traffic Signal

282 byte By insaneyogia at 2007-11-27 6:55:10
I was recently asked this question in an interview .. as to how I would design a traffic signal mechanism , although I have some ideas I was wondering if I could invite some more thoughts from forum members . Surely the solution would involve application of design patterns .

How to handlle multiple ear and common database.

1164 byte By Novin-Jaiswala at 2007-11-27 6:44:40
Hi Friends,Need urgent help.I working on a project where there will be multiple ear ,each for one application.There are 4 project and 4 ears and one common util war file which will be shared by all ears.Problem is : 3 of the projects will use same database tables. I am using hibernate ORM ...

Which combination of design patterns could I apply to my problem?

1055 byte By fmagrini72a at 2007-11-27 6:33:59
Hi all,I'm facing the problem I'll try to explain.I've the following abstract definitions.1) Business Object - It's any object of my business that application has to handle (it might be a currency, a bank, a customer...a report etc)2) Transaction .-It's is not the transaction concept of ...

Plugins with persistence mechanism

1916 byte By wfragnera at 2007-11-27 6:29:15
Hi,I have following problem with the current plugin mechanism of our application:In general, plugins can easily be integrated into the application. But some plugins need some sort of persistence mechanism (i.e., some database tables). And here the problem arises. The application itself uses an ...

One controller for each usecase?

733 byte By vatora at 2007-11-27 6:28:43
I'm using a mvc design pattern for my webapp. In some of the books I've read it seems like they are suggesting to use one controller for each of the usecase. Is this the right way to do it?For me it seems like you get so many classes. If you are dealing with a User, and has to modify info ...

EJB INSTANCE

649 byte By basharfa at 2007-11-27 6:26:40
Hello All,i could use some help..Regarding EJB, when using enitiy beans from tables; the question is, for each table will have an entity bean ?for each user using these instances .. will each user have his own instance or one instance for all users ?so what about if we have 1000 tables, and we ...

Good Application Design Using OOP Concepts

750 byte By Arash.Shahkara at 2007-11-27 6:22:26
Hi,I just want to know, how did you (as experienced Java developers) learn the way to design your application in a professional way.How do you design your application (before start writing a single line of code) to give it the features like scalability? How do you manage conceptual application ...

Definition to a wrapper class

620 byte By talesToninia at 2007-11-27 6:17:15
Hi,I'm creating a class to my SCJD cert impl that has a protected RandomAccessFile reference member. I've designed this member as protected since subclasses really need to access it.My dilema is that I thought of this class as a wrapper to that member, but, the way it is, classes from the ...

Unforeseen Exceptions in API

995 byte By mikedehaana at 2007-11-27 6:10:46
Suppose I'm writing an implementation to an interface:public interface WeatherReader {public double readTemperature(int zipCode) throws ZipNotFoundException;}The client code passes in a zip code and expects to receive the temperature or a "zip code not found" exception as a response.My ...

Observer, MVC pattern

158 byte By rejeepa at 2007-11-27 6:00:25
Hi!I am trying to learn about the Observer, MVC pattern.The problem is that I cant find any good tutorial... Does anyone know any?

Aggregation & composition

64 byte By ritu_jainna at 2007-11-27 5:52:27
how can we implement aggregation and composition in java?

A suggestion with persistence mechanism

2393 byte By smokinga at 2007-11-27 5:50:30
Hello there!I am facing for the 1st time in my life the problems of projecting and developing an application using "serious" OO analysis and design within the Rational Unified Process..What I have to do for the final exam of my course is a web application which has to respect the MVC pattern ...

Exception Handeling

422 byte By Santosh_Mohantya at 2007-11-27 5:49:47
HiLets have a look at this example.public interface MyInterface {public void init() throws MyException;}public class MyClassImpl implements MyInterface {public void init(){//Not throwing MyException}}Is it a good practice that the MyException should not be thrown in the init() of the ...

Constants class

1444 byte By jakain2a at 2007-11-27 5:48:23
I have a Constants class that defines some constant values that are used in various places in my web application. Some of these constant values are set by a startup servlet so cannot be declared final. For example:public class Constants { public static int SOME_VALUE; public static String[] ...

Trasnction management in DAO

626 byte By rajnishea at 2007-11-27 5:36:37
Hello I am using DAO for persistent layer in my project. There are cases when i need to access more than one DAO to manage transaction .To achive this i am passing Connection object in every method which isneeded in transaction .But for this i have to duplicate every method of every DAO .I ...

Is the Factory Pattern suitable for this?

2734 byte By atodorova at 2007-11-27 5:35:22
Hi guys,I have the following question: I have some functionality which is divided in two parts: basic functionality that is created implementing only one interface , i.e. IBasicClient, and functionality that is methods with different data types as parameters , i.e.:ISDOClient, IStAXClient , ...