GUI Design

2455 byte By ktm5124a at 2007-10-2 21:40:12
I have some questions on GUI design. I'm making an Instant Messenger and, having finished the server, I am now working on the client. I've made many GUIs before -- I'm familiar with swing, awt, and swt --but I feel like my design of GUIs is bad. For this particular project I am using ...

Structure of the Java API (OO Design)

902 byte By Hayden_Meltona at 2007-10-2 21:40:54
Hi all,I am a PhD student at the University of Auckland, New Zealand. As part of my research I have performed an empirical study on a large corpus of Java software (which includes applications like Ant, Tomcat, Eclipse, Netbeans, Azureus). You can see how the structure (design) of the classes ...

Free UML IDE

701 byte By Servant@AKa at 2007-10-2 21:42:23
Hi all,I need to use a UML modeling tool for my java projects desin and implementation.for the time bein i use a good tool called umbrello ; but only on linux OS.I prefer to use an Eclipse UML plugin that has most capabilities as umbrello ; so I can use it on windows also.I tied some free ...

global variables in main()

328 byte By pete_c12a at 2007-10-2 21:45:53
is it bad oop practice to keep all your global constants in main() and have your other classes access them from there?also, would anyone happen to know of a good online resource that addresses proper oop practices and goes beyond explaining the foundation stuff like inheritence, encapsulation, ...

Psuedo Singleton, or other options?

949 byte By guitar_man_Fa at 2007-10-2 21:46:53
I am working on a project in which I am going to need to reuse a lot of the functionality of some existing singletons in the code base of my company's application.There are ligitimate reasons for these objects to be singletons (i.e. they store data that I only want stored once, etc). But, in ...

MVC First Attempt - Advice

1858 byte By abthma at 2007-10-2 21:47:08
I'm trying to use MVC for the first time, and I'm trying to follow the example given in http://java.sun.com/developer/onlineTraining/GUI/Swing2/shortcourse.htmlThe main part of my model (the equivalent of IntVectorModel) is capable of creating message generators. It keeps a list of which ...

avoiding using instanceof operator

4406 byte By nootcha at 2007-10-2 21:47:39
I've heard that using the instanceof operator isn't such a great code technique, and since I'm in the design phase, I feel like I should be able to avoid this. Right now, part of my design requires use of the instanceof operator as well as casting.Let's say you have a common notifier ...

Objects + Idea of Single Responsibility

2167 byte By ktm5124a at 2007-10-2 21:47:42
Two questions:1) Let's say you have an instant messenging server. (I am using the conditional because I have already made the server and am really curious about the client, yet this is the same problem with an easier example to explain.) The server has to validate the user's registration, ...

How to handle different versions of (credit) products?

1063 byte By Miklewa at 2007-10-2 21:50:22
I work for a bank where we sell various financial products. For example credit products. Let's say the name of a credit product is BicycleLoan with which you can buy bicycles. Buying a bicycle on loan can be done only if you fullfill the requirements of the Bank. If it is ok, you can get that ...

Question about Interface usage

2834 byte By _dnoyeBa at 2007-10-2 21:52:59
I have a class that implements two interfaces. ONe is a management interface and the other is a usage interface. Users should only know about the user interface. But I wanted to prevent the ability to cast to the management interface. Since the clas simplemented both there was no way to prevent ...

"View and then probably Edit " scenario

694 byte By diniakia at 2007-10-2 21:54:09
Hi,I have a JSP page which displays attributes of an object in view-only mode. The user might click 'Edit' or click cancel and move on to some other page.Currently I am storing the object id as hidden value in the view jsp and when the user clicks edit I make an explicit db call, retrieve the ...

Window Closing Technique

1102 byte By _dnoyeBa at 2007-10-2 21:57:22
I have two model classes. System and Component. And two views, SystemView and ComponentView. When the SystemView is closed the ComponentView needs to be closed. However, the ComponentView does not know anything about the SystemView. The only way I have found to connect the ComponentView with ...

Abstract Classes versus Interfaces

1604 byte By paultaylora at 2007-10-2 21:57:59
Somebody at work has just made an interesting observation and its bugging me, comments please.When I started Java I just used classes (and abstract classes), and didnt bother with Interfaces I understood them to be a way of getting round the lack of MultipleInheritance and it wasnt a problem ...

DAO +understanding/explanation

250 byte By Aknibbsa at 2007-10-2 22:04:48
I am trying to learn more about creating enterprise applications and I am looking for a easy to understand explanation of using DAO's as well as how to create them within a JSP/struts application. Any suggestions would be greatly appreciated.

Which book?

847 byte By Jimmkirka at 2007-10-2 22:10:33
I'm currently reading Core J2EE Patterns to try and improve my design skills. It's my first real introduction to patterns, and the first 150 or so pages were an okay read. When it gets into the pattern section there are a lot of references to other patterns, not covered in the book, which are ...

Technology change. Which one?

1759 byte By Miklewa at 2007-10-2 22:33:26
Hello,I work for a bank as a java programmer. We have products like loans and systems that help the office clerks to sell that loans. Now we use self made RMI client-"server" architecture. The client is a Swing GUI connecting to the RMI server object. We are planning to have more kind of ...

Hibernate joining two tables

2000 byte By dv8dana at 2007-10-2 22:39:05
I am very new to hibernate and this question might seem a little elementary, but here it goes:I have a classpublic List<PurchaseOrder> getPurchaseOrders with a method that creates the query in question:public Object doInHibernate(Session session)throws HibernateException, SQLException ...

In search of Pattern

1765 byte By _dnoyeBa at 2007-10-2 22:42:12
I have a situation here and I havent been able to conceptualize a good solution.BackgroundI have an object that processes changes in things that contribute to changes. And then I have this system of objects.ArchitectureSystemComponentComponentInstanceThe architecture does not really change, its ...

Best Place to check permission

163 byte By chamalsla at 2007-10-2 22:46:34
Hi,What is the best place to check security constraints. Is it the front controller of web app or a session facade.Thanking You,Chamal.

Parameter, Argument-difference?

114 byte By idomeena at 2007-10-2 22:46:50
could someone please explain in detail the difference between a parameter and an argument.Thank you.

Help with singleton!!!

623 byte By Galadriela at 2007-10-2 22:48:41
Hi,I did read the singleton topic. But it stays confuse to me.How to garantee that only one instance of Class per VM ?I am building a component to stay running forever doing some tasks... From command line this can be started and stopped..I am trying to implement a class, a singleton. Some ...

Return type vs throwing Exception

1994 byte By nootcha at 2007-10-2 22:52:20
As it turns out, a quick search in google reveals that the issue of return type vs. exception is somewhat hotly contested, but I thought I'd check to see what people here thought, based on a particular example that I'm dealing with.In an interface I've developed, I have the method:public ...

Design decision about using a Collection's view

1832 byte By voytechsa at 2007-10-2 23:00:16
I hope this is the right forum to ask this question since it deals with a design decision.I'm writting an implementation for a new type of file format called "NAP" (Network cAPture) which stores captured network packets in a file. Similar to PCAP and SNOOP file formats.I'm designing the ...

designing plugin architecture

1750 byte By dev@javaa at 2007-10-2 23:09:25
hi everybodyI guess this is not a java-specific question, but this is the best forum I know ;-)recently I posted a topic asking for nice plugin frameworks to include into my projects, and I decided to go with JPF... also because I haven't found any other option =Pshortly I'll begin a ...

Error handling in MVC

565 byte By andy786a at 2007-10-2 23:09:52
What are the recommended approaches for dealing with errors that arise in the Model (observable/subject/publisher) piece of an MVC architecture? For example, if an error occurs in the Model during a database update that resulted from a database access initiated from View to Controller to Model, ...

Business Delegate and Session Facade

562 byte By Supes73a at 2007-10-2 23:11:06
In the J2EE patterns catalog it is stated that there is typically a one to one mapping between a Business Delegate and a Session Facade. I have been, for sometime, been under the impression that the Business Delegate can be a singleton. Does it make sense to have a singleton Business Delegate ...

DAO J2ee design pattern

336 byte By Dollstartera at 2007-10-2 23:18:59
Hi,I understood the structure of DAO pattern like : The business Object uses Data AccessObject which encapsulates the DataSource. The DAO creates/uses the Transfer Object and the BusinessObject obtains/modifies the Transfer Object. Can i get the sample code for this pattern and any links for ...

design sanity check/advice

3374 byte By GDW13a at 2007-10-2 23:20:14
I'm relatively new to "real" object-oriented design/development (i.e. patterns/refactoring etc.) although I've been working with OOP languages for quite some time. I've been doing a lot of reading/research in order to take it to the next level and am incorporating it into a new project I'm ...

Filemonitor - Strategy pattern?

1183 byte By Tony.Cookea at 2007-10-2 23:20:57
Hi all.I have an application that I think needs to use the strategy pattern but I'm not sure. I'm fairly new to design patterns but I would like to be able to use the right one and as yet I can't see which one to use and where.My first instance of the application places a listener on a file ...

Weak References in Listener Lists

1122 byte By Eric-the-Ka at 2007-10-2 23:24:19
I've found a common source of memory leaks is when objects that add themselves to listener lists forget to remove themselves when they are done.It would be nice to generalize and say that listener lists should contain weak references, but there are probably valid cases where a listener's only ...

HELP !!!!!! Design decision...!!!!!

883 byte By sshanjia at 2007-10-2 23:25:06
Hello,I am in a dilemma of making a design decision . We are developing a business tier component. This is going to talk to webservices on the backend. Right now it is going to integrate with 2 different backend systems through web services. In future it might support more of such backend ...

classloader with singletom

3111 byte By vpalkondaa at 2007-10-2 23:35:55
Hi I am trying to verify that you could have multiple instances of singleton if you use different class loader. Could somebody tell how I can verify . Here is the sample filespublic class SingletonTest {private static SingletonTest mSingleton ;public SingletonTest(){}private int x = 0;public ...

UML Modeling for Class calling another class in Class Diagram and Sequence

776 byte By San4Ua at 2007-10-2 23:40:53
In my application, business delegate is calling Session Facade through business interface. Session Facade is implementing business interface which includes my application business processes.In my class diagram, I am showing business delegate, business interface and Session Facade. What kind of ...

diff b/w DTO,BO

60 byte By cvsnta at 2007-10-2 23:53:04
Hi all,Tell me the diff b/w DTO,BOThanx

Please help me to get knowledge about struts tags(html,bean,logic).

978 byte By awm_riaza at 2007-10-2 23:53:19
hai Friends, I know basics of struts. I have done basic examples.I have to know , how to get dynamic values in "view".Instead of writing like this..<html:select property="color1" size="4" ><html:option value="red">red</html:option><html:option ...

Composition problem

1264 byte By amjavadeva at 2007-10-2 23:55:39
I have a class A that uses class B. Class B uses class C. When I am in class A I want to retrieve data from class C. Currently, when I am in class A, I am using a method call on class B to ask class C for the data. The effect is that I am passing the data item from C to B and then from B to A. ...

OO Solution

708 byte By jfreebsda at 2007-10-2 23:56:31
Car > VW > Golf > ....Suppose we got that hierarchy where all cars provide services as startEngine(), stopEngine(), etc. On the other side a VW Golf can be automatic, can be convertible, etc. and should provice services as openRoof in case of convertible or should startEngine different ...

AWT, APPLET- DIFFENCE?

171 byte By idomeena at 2007-10-2 23:59:10
My people in the, I really appreciate your contribution to my questions.can someone explain AWT and Applet in details, and their difference?Thank you.

AWT, APPLET- DIFFENCE?

191 byte By idomeena at 2007-10-2 23:59:12
My people in the house, I really appreciate your contributions to my questions.In addition, can someone explain AWT and Applet in details, and their difference?Thank you.

Enterprise Application design using java interfaces

809 byte By kollareddya at 2007-10-3 0:09:23
HiAre the following design principles correct in the case of designing enterprise application with java interfaces:1. create interfaces to all the application boundaries and controlls and entities.2. the method parameters must be specific objects instead of interfaces. If so, will this pose a ...

Exceptions and inheritance

2072 byte By aboaventuraa at 2007-10-3 0:15:49
Hi all,I need some help to solve a design problem ( I suppose !).I磛e created an Interface declaring methods that throws an Exception and created an Adapter implementing my Interface. I thought that when I write a class that extends my Adapter it would force to write the method signature with ...

Dear friends i need your help to do sun certification(SCJP)

355 byte By awm_riaza at 2007-10-3 0:17:51
Hai friends, I am going to do sun certification(SCJP) in this month. But, don't have any sun certification materials.I can't even download files from my company also.so, ifyou have any materials regarding this please send to awm_riaz@yahoo.comIt will be very useful for me.Thanks in ...

Questions on DAO design

652 byte By Klincia at 2007-10-3 0:19:37
This is the first time I used DAO design.I have a machine class and each machine has a few parts.How should I design the DAO? Especially regarding the inner parts.Should I create a DAO for machine and for part and put the PartDAO as an atribute of MachineDAO so that I can populate the ...

Design of accounts

279 byte By r035198xa at 2007-10-3 0:23:47
Anyone know best ideas/sites for the proper modelling of accounts using ejbsI would like to record and query transactions for up to 30 000 clients + 10 000 agentsEach client can have more than one accountAny advice is greatly appreciated

About Designing DAO

113 byte By dave123a at 2007-10-3 0:25:00
will it be better if i use creational pattern (Abstract Factory pattern) to implement DAO?DuffyMo ?

Design / Architecture from Requirements

495 byte By Designa at 2007-10-3 0:25:33
Is there a good article / book with real examples of how to arrive at a system design / architecture from requirements ?Also, is there a defined way to organize the requirements captured so that it would be easy to translate it into design ?We have captured our requirements from a data and ...

can bussiness logics been added to a middleware?

381 byte By Shankars@linuxa at 2007-10-3 0:27:15
Hey,Could any one help me understanding the below query? 1. Heard that Middleware should play a role of get and put or tranforming messages between various applications?2. Bussiness logics can be added to a middleware application? If so, is it not a Architechtural flaw to have a such design?any ...

Visitor Pattern and checked exceptions

573 byte By fedetxfa at 2007-10-3 0:27:22
I have a Visitor interface and I want to have 2 implementations. The only problem is one Visitor does database things so it throws SQLException and the other does IO things so it throws IOException.What are my options when declaring the visitor methods?Declare them to throw ExceptionDeclare ...

Quite A Design Problem...!!

720 byte By AshuDaGr8a at 2007-10-3 0:29:04
Dear Forum,I am facing design problem...here it goes...I have a class that contains several method having name pattern like "createXXX()".All of these methods contains similar logic except data.This class is examined bythe another class for the"createXXX" methods for futher processing.Suppose ...

List interface

907 byte By amjavadeva at 2007-10-3 0:30:47
I'm trying to improve the Genericity of my code by setting the return type of methods that return classes that implement the List interface to List. In other words, rather than force the class user to work with, let's say, an ArrayList returned by one of my methods, I'd like the user to be ...