What would this be in UML?

1474 byte By Tim@Javaa at 2007-10-1 0:48:53
public class FerretBox {Centroid centr = null;public FerretBox(Centroid ctr) {if(ctr == null)centr = new Centroid();else centr = ctr;centr.Bind_FerretBox(this);}}public class Centroid {FerretBox fb = null;public Centroid() {}public void Bind_FerretBox(FerretBox fb) {this.fb = fb;}}I have a main ...

How to learn?

215 byte By codecraiga at 2007-10-1 0:50:55
Hi,I have coding in Java for over a year now, and I am curious what is a good way to learn good OOD practices? I particularly learn best from example, but any references would be helpful.Thanks!

Inlined fields and

1880 byte By pamiela at 2007-10-1 0:56:27
I'm currently writting a system (let's call its the "Engine") into wich it is possible to "plug" external behaviors.To do so, I provide a set of interfaces and classes that are to be used for the development of the "plug-ins".Once the Engine is deployed, it is possible to add newly developed ...

do Utility classes also have a delegate to call them?

495 byte By varsha123a at 2007-10-1 0:56:39
My application is a J2EE application?and we are using delegates to call the Business objects which in turn call the DAO抯. (Struts framework)This is the pattern for business calls.Now my question is? If we have some common utility classes?then is there any pattern for using those classes ...

Factory Design Pattern with Java generics

481 byte By schrepflera at 2007-10-1 0:57:06
I was wondering if it was possible to implement the factory pattern using a generic like sintax with java5. Something like:IFactory factory = new ConcreteFactory();Car c=factory.CreateObject<Car>();I saw this article the other day ...

UML: Composition, Aggregation: Are these 2 mutually exclusive?

251 byte By PaulPhuoca at 2007-10-1 1:00:39
Are these 2 mutually exclusive? OR can they be overlapping in respect with time line. By that I mean "Is there a case where we have a compostion at the beginning of time BUT then as we evolve with time it becomes an aggregation?" OR vice-versa?

Which is better ? for loop or iterator ?

355 byte By sanjay1794a at 2007-10-1 1:09:56
Hi,I have one array list having more than 100 objects in it.I have two way to ietrator.1.for(int i=0; i<list.size(); i++){Object o = list.get(i);}2.Iterator i = list.getIterator()while(i.hasNext()){Object o ...}which is better in performance ...

inherently / potentially concurrent systems

356 byte By o37355345a at 2007-10-1 1:12:48
Hi guys :)I'm not quit sure if this is the right forum to post this question...can any one describe me what is the difference between an Application which is inherently concurrent and one which is potentially concurrent?and why is a real -time system is inherently concurrent?any ideas are ...

pattern for loading large, structured and complicated messages

1139 byte By Torajiroua at 2007-10-1 1:19:07
hiI'm writing a project whose ultimate goal is loading into a DB (using hibernate) a tree of objects based on a flat file messagethe loader should also validate the message while parsing it, so that nothing gets created if some validation error occursthese messages are structured into fixed ...

Obsolete patterns

225 byte By jschella at 2007-10-1 1:20:55
Anyone care to comment on the following which claims that Factory, Interpreter, Bridge and Flyweight are no longer patterns?And Singleton was almost voted out. http://martinfowler.com/bliki/OOPSLA2004.html

question: use of factory

520 byte By Floppya at 2007-10-1 1:21:49
Let's say I have an abstract class and 4 subclasses extending it.Somewhere in my program I keep an ArrayList of many objects of these subclasses.May I use then a factory for creating those subclasses ?Cause isn't the purpose of a factory not to only call it ones in you program and ,based on ...

representing java beans in uml

466 byte By cidermonkeya at 2007-10-1 1:22:59
Hi Can anyone tell me where i can find examples of how to model javabeans (not EJB) in UML?Are there any particular methods of uml design that i should use such as "activity diagrams" for the system, or just "class diagrams" for the actual code?I'm especially looking for design examples of a ...

Facade Authentication and Access Privileges

1277 byte By nestorjba at 2007-10-1 1:24:37
HiI've been thinking about ways to provide authentication and access privileges to my Facade classes. I would like to put all the authentication and access privileges logic inside the Facade so I can publish the Facade as a Web Service or a Session Bean. After thinking a lot about it I found ...

Any advice...

168 byte By Mars_cla at 2007-10-1 1:25:57
Hi ,guys .I'd like to learn something about refactor,could you recommend me something to study.Any advice is highly appreciated!Mars

General Design with BO's, DTO's and DAO's

1906 byte By DDkea at 2007-10-1 1:27:12
Dear all,I'm on a new project that is still in the Design phase. The project has to be designed in layers: presentation, business and persistence.After completing previous design steps, I was asked to make a Domain Model in UML, and now it's finished, and all the business rules are ...

Locking the table

1733 byte By ajitguptaa at 2007-10-1 1:27:24
Hi,I have query regarding the locking of the table by number of DAO instances created in the method level...is that true?...In method level as per the database call needed, i am creating the instance of DAO and then calling the update method of DAO object.i.epublic class Abc{public Abc(){} ...

Locking the table by the number of DAO instances

1804 byte By ajitguptaa at 2007-10-1 1:27:38
Hi,I have query regarding the table locking ..... Is that true- that the table will be locked if "n" number of DAO instances created in the method level... ?... In method level as per the database call needed, i am creating the instance of DAO and then calling the update method of DAO ...

Inner classes in my interface - ok, no k, indifferent?

2770 byte By lithousa at 2007-10-1 1:27:58
I have an interface and a set of ComparatorS which are only used for objects which implement the interface. So I put the ComparatorS in the interface like so (not actual code because it is for my job):public interface Abc { //Class loader should only do this once so they are basically singleton ...

design by contract

278 byte By seagullja at 2007-10-1 1:30:23
Hello forum,i have a question about "how object oriented design lends itself to the concepts of design by contract and how require and ensure clauses can be simulated in languages which do not have them"thanks for your help!David

DAO reusability

1143 byte By wim_boffea at 2007-10-1 1:36:54
Hello,I have a question regarding DAO抯.DAO抯 help solve the problem of switching you data access layer, that I know. I wonder however how reusable they are. An example:UserProfileDAO declares the method findUserProfile(int userId) and returns a UserProfile instance. In the next project I need ...

Difference between 3 tiers and n tiers?

194 byte By balteoa at 2007-10-1 1:37:20
Hello,Can anyone tell me what the difference is between 3 tier and n tier please?What do the 1, 2, 3 and n tiers correspond to?Thanks in advance,Julien Martin.

Succinct justification for OO

424 byte By Wrecking_Crewa at 2007-10-1 1:42:21
When I was in college someone asked me why transistors amplify. Although I could give mathematical explanations, I could not give an answer that made sense on a gut level. Later I put together a cogent explanation: The transistor modulates the power that is provided by a power supply.How would ...

Question about dependencies

386 byte By balteoa at 2007-10-1 1:44:08
Hello,I am currently working on UML and I am trying to understand better what a dependency is and most importantly how it translate into java. From what I understand a dependency means that if class A depends from class B, B is present in one of A's methods. I am right? Are there other ...

Attemping to remove instanceof calls from code

953 byte By es5f2000a at 2007-10-1 1:52:24
I've got a List of different classes which implement a DisplayableObject interface. There's a set of gui checkboxes which controls which specific typesshould be displayed. I loop through my list in paintComponent() todraw to the screen.What's the smart way to tie this together?Right now, the ...

help with simple pattern

1685 byte By nullptr@wi.rr.coma at 2007-10-1 1:53:41
Im writing one of my first large gui projects, and Im trying to follow good OOP techniques,but was never taught how to do this in Java (no callbacks).I have a subclass of JPanel that has:1 text area2 Jbuttons2 radio buttons (1 button group)The JPanel loads a vector of questions and displays one ...

Need to do update two systems

698 byte By niranjan_damarajua at 2007-10-1 1:53:52
Hi,We are designing a system which gets data from front end(JSP), in this data, only few of the input fields are to be updated in one system, which is a thrid party system, and the rest of the fields not requried by the third party application should be kept in our application database.The ...

File Upload and Remove

480 byte By _AM__a at 2007-10-1 1:54:49
Hi, I need to design a page, which has the functionality to add and remove documents and later submit it..My doubts are1. when he adds a document - whether i should it in the database at that itself or no.?2. If no, how to keep track of all teh documents he has added.3. Whether I should save ...

design patterns

79 byte By novice_drivera at 2007-10-1 2:03:43
have you ever used an extreme design patterns that is not in literature?

Design Patterns Web Site

779 byte By codecraiga at 2007-10-1 2:05:11
Hi,I was curious what everyone's opinion (or at least those who frequent this forum) was about a website explaining Design Patterns using Java.I was thinking about making a site which discusses various design patterns, including real-world analogies (to try and make things simple and clear), ...

Please suggest some projects

319 byte By raghavaa at 2007-10-1 2:06:42
Hello Everybody, Iam doing my Masters in Computer Science. I want to do a project in Java & in particular on Patterns on Linux(optional) platform as part of our course.The team size is 2 and the available time duration is 2 1/2 - 3 months. Please suggest some projects. Thank ...

Any GoF Patterns violate any OO Design Principles?

486 byte By PaulPhuoca at 2007-10-1 2:09:51
Just a question out of curiosity. So if and only possible, can you let your valuable experience and/or observation speaks. 1M Thanks.Quickly and scope-wise OO Design Principles mentioned/interested are:SRP - Single Responsiblity PrincipleOCP - Open Closed PrincipleLSP - Liskov Substitution ...

DP101-Collecting Parameter Pattern and Class Roster Sheet to gather student

503 byte By PaulPhuoca at 2007-10-1 2:10:16
While going over JUnit documentation, I saw this Collecting Parameter Pattern.I try to understand it but wonder it was named Collecting Parameter instead of Collecting b]Data Parameter. or ... http://c2.com/cgi/wiki?CollectingParameterBy the way, is this a valid real life example of Collecting ...

Is this a good a pricatice?

1069 byte By charmika at 2007-10-1 2:13:22
Hi All,I am currently working on a new project and I just wanted to make use of DAOs and Singletons.I just wanted to make sure that what I am doing correct and that it would not cause any problems in the future.Here is what I am doing..1. I moved all my data base interactions into just one ...

Paging from DB level or Application level .

798 byte By hwh1a at 2007-10-1 2:16:45
Hi All,Just wonder if anyone if you guys can give me some ideas no implementation of paging. How would normally paging be done? To be more exact, my question is referring that the paging should be done :1. SQL Level Here the retrieval of records are queried into block of record. ie: within ...

Need some help with struts

1149 byte By ejw2076a at 2007-10-1 2:20:08
I just started my job and me and 2 others are going to be working with struts. I just arrived here and dont know anything about this, I dont even know java yet. My supervisor wants me to learn how struts works, how the system works, and I have no idea. I am honestly starting from nothing here ...

Upcasting problem

1619 byte By 0zero7a at 2007-10-1 2:22:16
Hi all!I have a problem when I try to store a class A into a B object.public class A{int i;A(){ }protected doAction(){ //whatever }}public class B extends A{B(){super();} protected doAction() { //whatever}}public class C{C(){}public A getResult(){ A a = new A();return a; }}Can anybody explain ...

Singleton Pattern

122 byte By _AM__a at 2007-10-1 2:28:27
Hi All,In real time where will we use this Singleton Class..Could you give me an Exampel...AMJ

Design question

1185 byte By John__Howarda at 2007-10-1 2:28:52
I have a number of POJOs that I want to display in a tree view and a graphical view. This means I need to introduce two new interfaces to provide the necessary functionality. e.gpublic interface ITreeNode {Object[] getChildren(Object parent);boolean hasChildren(Object parent);String ...

Observable vs Custom Events

839 byte By proMonkeya at 2007-10-1 2:32:39
Hi.I'm creating a project that uses the MVC design pattern, and being eager to make sure I follow the best practices I have a couple of questions. When notifying a 'View' of changes to the 'Model' is it preferable to effect this notfication using the Observer/Observable pattern, or through ...

help with uml please

2685 byte By newsock1a at 2007-10-1 2:33:27
I am a new to uml and trying to get my head around them. Just wondering if anyone can help me out with a problem. I have been working on this but always end up wrong. I have some code from junit below:I have to a. Draw uml class diagram with all associations, relationships etcb. Draw uml design ...

Want a Project? Join Ours!

1646 byte By Noumenauta at 2007-10-1 2:38:06
Hello All,Would you like to help us build this? http://skribe.noumenaut.com:8080We need your help!We've been working hard on a high-end blogging application that will soon go live. The link above is a very early integration build.We抮e seeking several people to fill a few different roles, ...

Help with Strategy Pathern!

726 byte By windJa at 2007-10-1 2:38:27
Hello,I need to parse a very complex text file. If I keep all the parsing code in one file, it will be huge. Then I thought probably I can use strategy patthern to decouple it. "Another technique has a context pass itself as an argument, and the strategy request data from the context ...

Java implementation of powertypes

238 byte By balteoa at 2007-10-1 2:41:42
Hello,I am currently working on UML and I would like to know how powertypes are implemented in java. Can anyone please post some java snippets or throw some light on the subject?Thanks in advance,Julien Martin.

MVC1 and MVC2

96 byte By Leenaga at 2007-10-1 2:44:02
What is the basic difference betweent the two architectures and which one is preferable ?

Is java.util.Runtime singleton

72 byte By Patila at 2007-10-1 2:47:35
Hi,Is java.util.Runtime a Singleton class ?-Shishir

Unit tests and QA process

2452 byte By jdupreza at 2007-10-1 2:52:22
Hello,(disclaimer : if you agree that this topic does not really belong to this forum please vote for a new Development Process forum there: http://forum.java.sun.com/thread.jspa?forumID=53&threadID=504658 ;-)My current organization has a dedicated QA team.They ensure end-user functional ...

Session facade vs Command object pattern

2010 byte By kellyvistaa at 2007-10-1 2:58:34
Hello,I am debating using the Command pattern as my primary strategy for implementing my J2EE enterprise app business logic and would like some advice. The general idea is to have only a few types of abstract commands (such as a ReadComand, an UpdateCommand -- I might have a slightly finer ...

Struts

1784 byte By StuPickarda at 2007-10-1 3:01:03
I'm having a problem compiling an Action class using Net Beans.My code for the execute function is as follows:public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)throws IOException, ServletException { String username = ...

What is MVC?

361 byte By jvaudrya at 2007-10-1 3:06:28
I was having a conversation the other day with a software developer, and he asked 'What is MVC?" I told him and he said he will never need to know that pattern because he works on TCP networking and messaging formats.So is there a good reason for someone who never works with GUI's to learn ...

Validation in WebServices Environment

230 byte By jtanejaa at 2007-10-1 3:07:14
I am creating a service to insert a row in table. Before inserting, the data need to be validated. So how the service should communicate all the missing data back to the 搑equestor of the service.?br>Thanks in advance