Database application design help

2538 byte By ramndra at 2007-10-2 10:33:32
I need to develop a application using swing and SQlserver.Though it is not web based one,three computers connected to my computer will run the application parallely.ProblemI have a JTable which will show the database table contents.I have two designs:1) To have a helper class( contains static ...

OO Design question

632 byte By nereidahoxhaja at 2007-10-2 10:33:39
Hi,this is my question:I have some heterogen classes lets say:class A, class B, class C and class Dclass A implementsmethod amethod bmethod cmethod dmethod zclass B implements method emethod fmethod cmethod dmethod zclass C implements method gmethod hmethod imethod jmethod zclass C implements ...

Factory pattern and overriding

712 byte By Dylan68a at 2007-10-2 10:34:48
Hi all,I'm currently refactoring an application which uses two different libraries according to the user input.There is a Factory class who returns instances of, let's say, MetadataB and MetadataB, both subclass of Metadata.This is fine if the user calls one of the method exposed by the ...

Which pattern best suites a diagram application?

445 byte By globba at 2007-10-2 10:37:39
Hi all,I need to implement an application such as Rational Rose or Visio.I am intending to use the mvc pattern as all the info i have points in this direction.I think MVC, Decorator, mediator, builder, etc are all possible candidates but susspect that MVC is the best. Can someone please either ...

Singleton Implementation, is this Singleton?

1471 byte By Cana_Bravaa at 2007-10-2 10:48:37
public class Wrapper{public static MyClass createInstance(){return new MyClass();}}I have seen this , this is not a singleton, since im creating a new MyClass, whenever i call the static method createInstance(). Am i right?this is , right?public class Singleton { private static Singleton ...

Saving the State!

662 byte By vics_31a at 2007-10-2 10:48:45
Hi GuysNeed a bit of help in designing a framework to save and subsequently restore the state of an object in a relational database.To elaborate, the object is a JButton. It's property of interest are background color, label and whether or not it is enabled. I have created a bean to represent ...

Decorate a JLabel with an aditional Icon

2612 byte By liviudela at 2007-10-2 10:50:03
Hi !My problem is to decorate a JLabel with an aditional Icon then JLabel already have natively.My aproach was to create a "real decorator" in the classical way : the main idea is to wrap the decorated object into the Decorator pattern, the Decorator pattern forwards requests to the wrapped ...

MVC DrawbacksOR Dis-Advantages

181 byte By ksk_78a at 2007-10-2 10:50:52
What are the dis-advantages of MVC pattern ?and are there any patterns better than MVC pattern or fill the drawbacks of MVC pattern ?Thanks in Advanceksk

Newbie question

283 byte By ssv45324a at 2007-10-2 10:53:59
I am wondering what are the different architectures that are available while designing a java application( a web one). Which one is appropriate for what purposes?I am in the process of designing a blogging application, so any feed back on the same would be appreciated.

Java - XML Binding - Pattern to be used

662 byte By sane_techiea at 2007-10-2 10:56:35
Hi All,I have a obj (obj1,obj2,obj3) etc.. is the internal structure of the Object.I am passing the object to the XMLBeans classes created to populate data from the object and create the xml.Now the implementation is done in a single file where the document instance is created and the ...

MVC in Swing (role of controller?)

1005 byte By Drake_Duna at 2007-10-2 11:00:22
I have always written my Swing GUI stuff in the abbreviated (model)<-->(view/controller) pattern that you see in the Sun tutorials but have recently been thinking about moving to a proper MVC pattern. I must be misunderstanding the nature of MVC though, because even after reading about it ...

Is Structure Layout View a code smell?

1430 byte By oopcodera at 2007-10-2 11:00:55
I have an application that was built by using a double layered architecture. I needed to have a model where I store essential data about actions in this system.This system must be able to display these actions on screen and needs to be in a Composite type fashion(an action can contain ...

Application layering design question

603 byte By oopcodera at 2007-10-2 11:02:20
Hi,What is the best design method for separating in an application some important components that we need to keep track of, other components that need to do something not so important(like showing some text, buttons for some actions over the important components)?The idea is that for ...

Implementing association classes in Java

555 byte By rdx56a at 2007-10-2 11:03:05
Hi. I'm having trouble in implementing an association class.I have two classes, Customer and Address.A customer might have different billing address and shipping address.I found from a book that In this kind of situations, Customer class and Address class should be linked with an association ...

Tutorials for writing Use Cases (with complex, real-world examples) ?

1746 byte By solmyr72a at 2007-10-2 11:03:16
Hi,I'm trying to learn how to write Use Cases. (I'm an experience code-writer, but I don't have much experience with formal product specification).I've been reading books, tutorials, even took an academic course... Unfortunately, they all focus on silly "toy" examples (like "Elevator" or ...

java.util.zip.ZipException: invalid entry size error -- help required

1782 byte By rajanvijaya at 2007-10-2 11:03:33
Hi allI am sure this error would have been posted many number of times, but I would really appreciate if someone could help me with my problem. I am working on reading data from a .zip file, which in it has ~5GB data. All I am performing is a read operation through the piece of code specified ...

A genuine exception to a fundamental OOD rule?

665 byte By Drake_Duna at 2007-10-2 11:06:43
Scenario:You have a small class which is package access and has no meaning outside of the context of the application under development - i.e., it is impossible to imagine a scenario in which you would want to reuse it. The class is going to be involved in extremely processor intensive work. It ...

When not using EJBs can I make BD a Singleton and cache facade instances?

788 byte By Amnesiaca at 2007-10-2 11:09:37
Hi,In an application which does not use EJBs can I make BD(Business Delegate) a singleton?I was very sure about doing this but when I tried Google on the same subject the answers were'nt supportive of this but that was in the context of applications which used EJBs. And also item 4 in ...

Responsibility for spawning threads in MVC / similar patterns.

325 byte By Drake_Duna at 2007-10-2 11:12:08
Hopefully a quick one this time.You have a GUI application based on MVC that does various things using the model. Some of these things can just be done on the event thread but others should get their own threads. What is responsible for making that decision - the view, the controller, or the ...

Breeder Pattern in java

68 byte By Bulla at 2007-10-2 11:13:28
Can anyone please give info about this design pattern in java

Jaring causes an error...

836 byte By JDeva at 2007-10-2 11:25:34
Hi all. I have a working SWT application. However when I jar the application and run the jar I recieve an error. The error is caused because the program fails to find an image which is packaged inside the jar. Specifically when the ApplicationWindow image is being ...

Passing User enterd Data across Modules

519 byte By khangharotha at 2007-10-2 11:30:58
Hi please suggest me some design pattern for the req.....Its a graphics application where user action like moseClick , mouseDragged events are captured and One Bean Class MouseData is populated.Now differnt totally differnt components wants to use this real time data.So how should i design so ...

Composition and Aggregation

668 byte By avaj_rocksa at 2007-10-2 11:35:46
hey guysI have read the previous posts about composition and aggregation. And here is what i have got.Composition: life time of objects got to be the same. For example there is a composition between carframe and a car. If the car gets destroyed the carframe woulod also get ...

java io program suggestion

2342 byte By popohomaa at 2007-10-2 11:39:04
Hi all, I need to write a Java program to insert 1,000,000 records from a text file to the DataBase. Each row in the file represents a record. Each field has it's own fix width. So I guess what I have to do is to define the width for each field, for example 1-4 represents BatchNumber, 5-8 ...

Using Service Locator in Struts app without ant eejb components

482 byte By Ottrana at 2007-10-2 11:51:31
HiWe are developing a Struts application witjout any EJB components.But we may go for EJB in future.Keeping that in mind we want to introduce a service locator between the action class and the business logic. So it may be easier to acomodate in future.But how do i do that ? Can anyone help me ...

Bizarre behavior in the "Pass by Reference" thread

670 byte By jverda at 2007-10-2 11:55:02
In category views, clicking on the last poster's name in the "last post" column brings up the last page of that thread.When I click on jschell's name, I get the entire thread in one page. Thead heading says "401 replies on 1 page" and that's what I get.The last two posts (400 and 401, which ...

Uml to design algorithms

264 byte By smicheaa at 2007-10-2 12:02:07
I use UML class diagrams and it's nice .But is there a way to design the algorithms (in UML or an extension or free tools) so that the complete code of the class is automatically generated (at least for java and PHP) ?Thanks,Sebastien.

DAO, DTO, and BO confusion

13103 byte By kcraft4826a at 2007-10-2 12:04:30
Hello,I have decided to use the DAO pattern for a project that I am working on. Unfortunately, the relationships between my BO's make the DAO's overlap quite a bit. This has caused a lot of issues, especially in the area of SPEED. I have read a few articles on DAO's that say DTO's ...

which technology is fast and lightweight anong all webtechnology in java/j2

359 byte By mishramishraa at 2007-10-2 12:08:32
hi,friends i want to know that which java technology or J2EE technology(JSP,SERVLET,SWING,APPLET,struts and etc) is lightweight and fast.because i am going to use the simplest and lighweight web component component .So friends Plese tell me that which technology is fast and easy and lightweight ...

BO patterns

330 byte By syncroa at 2007-10-2 12:10:56
Hey allAre there any good creational patterns for business objects? I've been using a abstract factory pattern for my DAO layer which works fine, but which pattern should I use for my BO layer? All suggestions are welcomed, I would though prefer simple patterns since I don't want the BO layer ...

need of DAO factory

329 byte By am_newa at 2007-10-2 12:11:44
HiI was reading about DAO patterns in various threads here and some examples of the implementation.There is one thing I am not clear with, is the use of DAO factory.why can't we do daoObj = new DAOClass() ; wherever we want to use it instead of the factory method returning the same ...

need sample code for proxy design pattern

77 byte By jimmy6a at 2007-10-2 12:17:35
I need some sample code for proxy design pattern. Where can i find it?

question on BO

559 byte By am_newa at 2007-10-2 12:19:12
HiI read a lot about BO and DTO on a couple of threads in this forumhave a question on BO based on the following threas http://forum.java.sun.com/thread.jspa?forumID=425&threadID=575476This thread talks about the example of zipcode and where should the validation happen, validating the ...

Pagination Handler Design advice

3477 byte By Jawahar_m2003a at 2007-10-2 12:24:03
Original Problem: one of the SQL queries in my application returns a large resultset. Instead of sending the whole resultset to the client app, I have added changes to return finite number of rows based on User Input.Solution: This is a classical problem and found numerous resources on the web ...

Singleton Pattern problem

14243 byte By kota_balajia at 2007-10-2 12:27:33
Hi,I have a problem with Singleton Pattern, I have implemented Singleton Pattern for Connection Pool class for database, Singleton pattern is working perfectly fine. And I have another class(DatabaseConnection.java) with all database methods in it. Ideally, when I make some changes in ...

UML and Java Design Patters

144 byte By venuc_vgpa at 2007-10-2 12:31:31
I am new to UML and Java Design Patterns Please suggest some good books for UML and Java Design Patterns.Venu

Static Page Caching WAS 5

493 byte By MyJava_2005a at 2007-10-2 12:33:21
We have a need for caching a static page at server side so that it can be utilized by the client and also by a service being called by other processes. The data in the static page rarely changes but if it does there needs to be a mechanism to update it and then serve the requests with the ...

Struts advantages and disadvantages in java

125 byte By JavaSudhakara at 2007-10-2 12:39:36
Hi, Can any one please send me the advantages and disadvantages of Struts frame.Regards,Sudhakar.

mapping DB tables and classes - newbie question

717 byte By anjaa at 2007-10-2 12:39:42
Let's say i have 3 tables in the DB:authorcdtrackEvery author can be related to many cds, and every cd can be related with many tracks. In the db relations are realized by identifiers. But in the classes should i use references? I mean, should an author have a reference to every cd he made?And ...

Performace while using ORM for Tables with key value pair

1390 byte By inquisitivea at 2007-10-2 12:40:57
Dear all, I have a requirement to design table which should support multiple fields. The number of fields are not fixed as in the normal case. The user is given an option to choose the amount of data that he needs to keep varying based on templates.(configurator) I would like to know how will ...

Difference between Factory and Abstract Factory Pattern

156 byte By anu_montoa at 2007-10-2 12:47:38
Hi All What is the difference between Factory and Abstract Factory Pattern. I often get confuse between themThanks in advanceanu

Question on Design of a Custom IO Package

3468 byte By Endera at 2007-10-2 12:51:31
I am making a package for blocking i/o which I plan to use in many of my future client programs. I have thought about modelling it on Thread and Runnable; that is, you can create a concrete implementation by either subclassing a BlockingSocket class or overriding its Parseable interface. ...

OO Design question.

582 byte By ssv45324a at 2007-10-2 12:54:38
I am supposed to design a report generator, to draw graphs, trend lines etc. So basically i was thinking my design to be in the following way -class DataGenerator - the class which fetches the required X axis values and Y axis values from the database.I was thinking may be i can stored ...

nested object equality - design pattern

2385 byte By netiquettea at 2007-10-2 12:55:12
Looking to solve a problem in my own code, I wanted to see if and how the problem is solved in the java library.I would have liked this code to output "true", to see how it's done.Set set1 = new HashSet();set1.add("a value");set1.add(set1);Set set2 = new HashSet();set2.add("a ...

Can delegate and strategy patterns coexist ?

773 byte By LS123a at 2007-10-2 12:55:55
Say I have an interface for persistence call that PersistenceInterface.Now for MySQL I created MySQLPersistenceClass and for DB2 I created one more class DB2PersistenceClass.Now to proceed with my busines slogic I have a class BusinessLogicHandler class.BusinessLogicHandler has a class member ...

Hibernate question.

167 byte By ssv45324a at 2007-10-2 12:57:08
Does hibernate eliminate the DAO design pattern? If yes what are the advantages and disadvantages of hibernate over DAO design pattern.Thanks in advance.

command patter

63 byte By Ben.Kalea at 2007-10-2 12:59:39
what is the command pattern ?with regs,Ben

recognize pixel problem

234 byte By maniaca at 2007-10-2 13:01:24
how can i recognize a character such as "A" from jpeg or BMP file to editable text like microsoft word. the problem is, i don't how can system read the characters from jpeg and convert them to other file suck as word document.

Flexible Article

998 byte By hammouda at 2007-10-2 13:08:37
Hi all,currently i start building a new application for a customer.And i consider about to create a flexible article structure, which i can use also for other customers.1. Article can vary in different Attributs and number of attributes (size,color, ...)2. One Article can have several child of ...

Good coding style

292 byte By Wenxiaoa at 2007-10-2 13:09:58
I'm new to OO design. I find it easy to write all the procedures inside the main function: public static void main(String[] args) {}which I do not think is a good coding style. Could anybody tell me the disadvantages of it and how to modify it? Thanks in advance!