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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
68 byte By
Bulla at 2007-10-2 11:13:28
Can anyone please give info about this design pattern in java
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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 ...
I am new to UML and Java Design Patterns Please suggest some good books for UML and Java Design Patterns.Venu
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 ...
Hi, Can any one please send me the advantages and disadvantages of Struts frame.Regards,Sudhakar.
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 ...
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 ...
Hi All What is the difference between Factory and Abstract Factory Pattern. I often get confuse between themThanks in advanceanu
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. ...
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 ...
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 ...
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 ...
Does hibernate eliminate the DAO design pattern? If yes what are the advantages and disadvantages of hibernate over DAO design pattern.Thanks in advance.
what is the command pattern ?with regs,Ben
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.
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 ...
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!