DAO Pattern Confusion

1608 byte By RaviSingha at 2007-10-2 8:45:44
Hello,Have started developing with J2EE recently, moving up from J2SE. With regards to persistance of data to a database I have been looking at the DAO pattern. I am a little confused about this pattern, so I hope someone may be able to clear a few things up.As I understand it the Transfer ...

Plugin Application

1102 byte By sim085a at 2007-10-2 8:49:33
I guess this is the best place where to ask this.I am trying to design (for now) an application that is made up from many different plugins (similar to eclipse). I gave a look to how eclipse manages this, I also did some sample code. In practice it looks easy.What I did so far is having a jar ...

is struts the ideal choice

357 byte By am_newa at 2007-10-2 8:52:49
Hi We are into the design of a new web application. Looking into different ways of doing it ,struts was one of the model that is in interest. I have read in threads in this forum that the struts core development has stopped and the developers have moved over.So , is struts still a good choice ...

Senior Design Project Ideas

683 byte By Viveka at 2007-10-2 8:53:42
Hi,I am looking for ideas that I could implement for my senior design project. The topic of the project could be anything. It must involve a GUI (for which I will be using Swing) and it could encompass databases, web interfaces etc. depending on the goal of the project. The project should be ...

Best XML binding framework or utility?

336 byte By MithunKa at 2007-10-2 8:55:35
Hi all,In my application I am storing all the data into XML file. And I have designed the resource layer entty. Now I want to know which mechanism of object to XML binding is better (like Castor, JAXB etc). So it will be great if some one can suggest me which mapper is better and why.Thanks in ...

Specialized vs. Generic Interfaces?

1762 byte By MonLanda at 2007-10-2 8:57:20
Hi,I am new to these forums, please let me know if this is already part of a FAQ or not the appropriate place to ask this question.When designing an interface, would you recommend specialized or Generic Interfaces?As I am not sure if makes any sense, here are the two thinkings I have to define ...

Organizing MVC

2110 byte By mc3712a at 2007-10-2 9:01:15
Hi, I'm just learning MVC and I have few questions.As the class count increases with MVC, how do you usually organize the models, views and controllers in Java packages? I think I'm trying to "tie them together" too much. Also, should I think like that the Models arent actually a part of the ...

aggregation Vs composition

284 byte By nalakayoyoa at 2007-10-2 9:05:09
I got to know that:In aggregation we use the object by reference.In composition we use the object by value.can some one provide me what does this mean to the Java developer. It will be great if you can explain it with simple sample codes for each scenario.

Why String need to be final?

35 byte By jimmy6a at 2007-10-2 9:12:05
Why String need to be final?

Reading from multiple input sources and storing into multiple data sources

961 byte By Dipua at 2007-10-2 9:15:06
Hi,I have got to write a standalone Java Program and the specifications are as follows:The program takes inputs from Various files and Writes into different data sources . The intial inputs and the data sources are The Inputs are a)XMLb)Comma Separated Text FileThe Data Sources are 1. Oracle ...

Common MVC framework for a Swing or servlet UI?

794 byte By jdupreza at 2007-10-2 9:19:23
Hello,for a pet project (but I've seen this need in business projects too), I'd like to design a Java application unaware yet whether the final UI will be Web-based or Swing-based, and maybe both will be offered.I have no practical experience of Struts, WebWork, SpringMVC, JSF, but from a ...

Which pattern for RMI scenario

712 byte By sparky45a at 2007-10-2 9:23:10
Hi ,I have a database that holds data for shoes and trainers and i have set up 2 seperate applications with simple gui's one for shoes one for trainers. The applications communicate seperatley through rmi to a server which returns the results of any queries from the database it makes. ie. the ...

Basic Design Problem: Using an interface as flag

1188 byte By sensemanna at 2007-10-2 9:23:13
My problem is pretty basic - i just want to know the best way to design that:Imagine, you have an interface Example. There are two abstract classes implementing this - ExampleOne and ExampleTwo.Now there may be dozens of classes that subclass one of these two. They provide certain things that ...

Strategy for object reusing

856 byte By anilhemnania at 2007-10-2 9:28:15
I am parsing thousands of XMLs and loading data in my application. Can anyone suggest tested strategy to reuse objects. I have to generate java source files from XSD using Castor and then load data from castor generated classes to my other classes. I wont be able to replace my classes with ...

Overridding Sufficient for Polymorphism?

1351 byte By Saisha at 2007-10-2 9:29:03
All,This is probably an elementary question; however, as I never had a formal CS education, I was wondering what the actual, correct answer is. Would overridding a concrete (implemented) method in a superclass within a subclass constitute (or provide) polymorphism? In Java code:class ...

How to pass a configuration parameter to a singleton class ?

2137 byte By fif2006a at 2007-10-2 9:29:14
Hi, I am implementing a singleton class which should accept a parameter when first creating its instance.I am currently using a static public field which is populated by defaut by a static final field but can be overidden by a calling class before getting a first instance.Is this design OK or ...

MVC Couplings

1157 byte By kablaira at 2007-10-2 9:29:21
I've been reviewing some of the GUI code I've developed over the past month. I didn't try to conform to any specific pattern, I just went with what looked best. Looking at the couplings and dependencies I've noticed several things:1. The model has no knowledge of the view.2. The view has no ...

JMS Vs Java Pure Threads

1684 byte By hotjava05a at 2007-10-2 9:29:47
I am building a server in J2EE environment which needs to do following tasks continously.1. Detect files uploaded to a directory2. Move files to a temperory working directory(FIFO order)3. Read files and Validate records(FIFO order)4. Read & Process files that have successfully gone through ...

JUDE

511 byte By sparky45a at 2007-10-2 9:35:00
Hi everyone I have some java source code and have been asked to look for design patterns in the code(about 50 classes). A friend suggested importing the java classes in to JUDE UML modeling tool ( http://www.esm.jp/jude-web/index.html) to make it easier and i have downloaded the evaluation ...

Data Mapper to relational database

844 byte By freebsdmap7a at 2007-10-2 9:35:17
I've been reading the "Patterns of Enterprise Application Architecture" book and it has opened my mind to a lot of different designs.I'm trying to design a large accounting system in OO. I'm unclear on how I should design the mapping inbetween the domain logic and database.Should the ...

What is the exact difference between abstract classes and interface

151 byte By Knowledge.is.Powera at 2007-10-2 9:37:39
What is the exact difference between abstract classes and interface in real scenario?Plz could you give a practical example?Thanks

OOP is it impraticle?

961 byte By dubwaia at 2007-10-2 9:37:56
I was perusing the Wikipedia entry for OOP and looking at a few of the criticism links. To me the arguments aer based on things that OOP supposedly says but that I don't really consider OOP. http://en.wikipedia.org/wiki/Object_oriented_programming#CriticismPerhaps they misunderstand OOP. ...

Pattern to replace switch statement..

1523 byte By katriyaa at 2007-10-2 9:45:05
I have a class which processes XML data . The class hierarchy is given belowpublic abstract class Processor{public abstract void buildDataFromXml();public void publishResponse(){StringBuffer response = new StringBuffer();response.append("Some Common Info -- ");response.append(buildResponse()); ...

Difference:

564 byte By ravimittala at 2007-10-2 9:48:49
Consider the scenario:There exists a abstract implementation (say 'AbstractImpl' ) of a interface (say 'InterfaceA'). Concrete implementaion (say 'ConcreteImpl') extends 'AbstractImpl'. (This is sometimes called Template Design Pattern).What is the difference between:1.AbstractImpl ...

Calculation

1507 byte By wraggiea at 2007-10-2 9:49:28
Modify the Mortgage calculator design so that the user is able to input the mortgage principal, mortgage term, and annual interest rate. Include all the mortgage information and calculations in a separate class that is contained in a separate file. Ensure the following input values are ...

thread design

5317 byte By tnguyen1973a at 2007-10-2 9:49:59
I have an application that makes a severals different request call to the server inorder to initialize the application. Fortunately, these requests are not dependent upon one another; therefore, i decided it's best to do multithreading (a thread for each request). What i'm running into is a ...

DAO...................

563 byte By help_eachothera at 2007-10-2 9:50:55
Hii JavaitesI m developing a reporting application , in which --1) I need to query daatabse 2) ,and display results in jsp 3) also i need to do paging of the records displayed using NExT & PREVIOUS ButtonRight now i m using resultsets , but i think it won't b nice 2 query database again ...

XMLParser exception

409 byte By Nehaa at 2007-10-2 9:54:21
Hi..I am getting the following exception while running a servlet on Apache tomcat[Fatal Error] :15:184: The element type "HR" must be terminated by the matching end-tag "</HR>".From XMLParserorg.xml.sax.SAXParseException: The element type "HR" must be terminated by the matching end-tag ...

Command Pattern (Invoker returns Command) and constructors

2352 byte By young_matthewda at 2007-10-2 9:55:02
hej,Using the Command Pattern to run DAOs with a bit of business logic so that I can have a different types of Invoker (Command handler) classes depending if transactions are managed a SLSB or a local test client using JTA. Beyond organizing commands there isn't much hassel with using the ...

Returning Business Objects to View?

617 byte By Liggya at 2007-10-2 9:55:07
All,I was just in a meeting where two different approaches to returning data to the view were discussed.In a nutshell, here are the two options presented:1) The service layer should return the Business Entities entirely (which happen to be Hibernate objects).2) The service layer should return ...

Best way to synchronize in a Singleton

3304 byte By pgeuensa at 2007-10-2 9:57:50
I have this classimport java.util.ArrayList;import java.util.List;public class SynchIssues{ private List values = new ArrayList(); private static final SynchIssues singleton = new SynchIssues(); public static SynchIssues getInstance() {return singleton; } public void addValue(String value) ...

Shared resources

510 byte By DesarrolloScreenNamea at 2007-10-2 9:58:15
I don't know if this is the correct forum for my question.My application has to assign an appointment with a doctor. But there are many users (patients) compeating for this resource. I thought of blocking this resource until I collect all the patient information, but I'm not quite sure that ...

Singleton -> Constructor needs a parameter :(

929 byte By toniG.a at 2007-10-2 9:59:09
Hello,i have a Problem with the Singleton Pattern.Following situation:I have a class (Commander) which starts all the dialogs of my Swing Application. For this it starts first the BPs and they start the dialogs.The BPs need my mainprocess class in the construtor to set the its parent. So, my ...

Generic methods in DAO

2756 byte By Liggya at 2007-10-2 10:05:39
All,Is loose coupling/method reuse in the DAO a good thing?In the method example below, methods in the DAO would all invoke this generic method to dynamically build the stored proc to call, and execute it.Is this good design? or overkill? or problematic?private void executeStoredProcedure(Long ...

Layers in a Struts application

1779 byte By sbelslya at 2007-10-2 10:06:46
I am looking for comments/suggestions on appropriate layers and dependencies in a Strus application.We currently have FormBeans, an Action layer, a Service layer, a Business logic layer, some Utilities, the Model objects, a Persistence layer and a Helper layer.The Action layer is supposed to be ...

kill threads

147 byte By Albertitoa at 2007-10-2 10:07:32
hi! I'd like to kill many threads I throw. I use Thread class. do have I to kill them using "join" or "interrupt"? thank you!

puzzle about prototype pattern

535 byte By dxuranusa at 2007-10-2 10:08:10
is prototype just use clone substitute the "new" operation? but client must know about manager and concrete products and initial manager with products he or she wants,so what's use of this manager and clone-- if client want to get product, he or she must "new" it and then clone it .in my view ...

implementation of MVC

368 byte By brainydextera at 2007-10-2 10:15:30
helloIve read about the Model-View-Control Architecture and understood it ,theoretically atleast!! Ive found huge coding fr explaining the concept. Thus I am unable to visualise this pattern in terms of coding. Can someone please explain it to me with a simple example and some method ...

incorporate java code

1364 byte By sparky132a at 2007-10-2 10:16:05
I have no idea where to start with this! I might even be posting in the wrong forum. Anyway - here's my problem.I have algorithms which I have written. They all all perform a task, but have different approaches to it. They all implement an interface I have written.Now. I want to design a GUI ...

Program - User Interface

890 byte By _Yonder_a at 2007-10-2 10:16:38
How is this supposted to be connected with good programming practise on a class-diagram level?Say I have a board game, say tic tac toe. All my logic are in the classes Board, Player and Move. I also need a GameController class that controls the game. Now I want to have an UI for this game. Say ...

Which EJB patterns are motivated by minimizing network calls?

1354 byte By lightbulb4321a at 2007-10-2 10:17:08
Hi, I'm reading a book on EJB patterns, and the motivation for many patterns seem to be minimizing network calls. If my application server and web server which serves as the EJB client are on the same machine, then to what extent should I consider the minimization of network calls as a factor ...

Command pattern

1171 byte By bachewa at 2007-10-2 10:19:17
I'm new to this design pattern (and this forum too). I would like to know about your experience and advice on command pattern.Is it OK to implement it this way?TypicalCommand cmd = new TypicalCommand();TypicalInput in = new ...

method overloading doubt

165 byte By HelloTamilaa at 2007-10-2 10:20:03
In java ,Is method overloading is a compile time polymorphism ?I mean all those method calls will be decided at the time of compilation .. am i right ?

Parser - Reader - ..

717 byte By sdegardina at 2007-10-2 10:20:05
Hi everyone,I'm developing a bacth application.This application has to read a file in which each line represents a Business Object.To parse this file i've done a static method which, from a line of this file give me an Object.that's ok !.But, i've also done a Reader (suchn as ...

Property, Attribute, Parameter - difference?

162 byte By throwablea at 2007-10-2 10:22:37
Hi,I know sounds silly, but what is the difference between Property, Attribute and Parameter? In what cases every of this words is used?Anton

Passing by Reference

258 byte By Saisha at 2007-10-2 10:23:52
Well, Daffy up and got that thread deleted for us. Too bad the admins could not save a few of Loko's excellent explanations that were contained therein. Starting a new thread in case anyone wanted to post a recap. Nice job Daffy.- Saish

Where's that thread?

279 byte By Marcelo9a at 2007-10-2 10:24:00
What happened with the latest daFei's thread? It was not so useful thread, but at least there were a lot of interesting and important replies there, posted by the others.Did someone here ask to delete that thread? Or did Sun decide to do that, without our request?

Design of a messanging application

1374 byte By mackXjacka at 2007-10-2 10:27:05
HI all, i am designing a messenging application which has following modules : UI Module DB Module Messenging Module UI to DB connector UI to Messenging connectorMy problem lies in Messenging module. The purpose this modules is, it should provide a destination for the messages and an interface ...

Dealing with nulls

1783 byte By fragorla at 2007-10-2 10:31:03
This is very non-specific question, I'm sorry. Still, it's something that comes up from time to time when I write java.Basically, suppose an object takes a list of something in it's constructor. The object expects that that list of something contains no nulls - ie it calls a method on each ...

Composite desing pattern & exception handling

4347 byte By jvaudrya at 2007-10-2 10:31:50
Hi, I've been thinking about how to write a reusable composite object. Basically this would be a simple implementation of the composite pattern, but would be general enough that you could reuse it in many places. Here is an example?after the examples I talk about my problem./** * Composite ...