I am newbie to Java. I have some design questions.
Say I have a crawler application, that does the following:
1. Crawls a url and gets its content
2. Parses the contents
3. Displays the contents
How do you decide between implementing a function or a class?
-- Should the parser be a function of the crawler class, or should it be a clas...
I have an issue that I feel many programmers can relate to...
I have worked on many small scale projects. After my initial paper brain storm I tend to start coding. What I come up with is usually a rough working model of the actual application. I design in a disconnected fashion so I am talking about underlying code libraries, user inte...
I have a (C#) genetic program that uses financial time-series data and it's currently working but I want to re-design the architecture to be more robust. My main goals are:
sequentially present the time-series data to the expression trees.
allow expression trees to access previous data rows when needed.
to optimize performance of the d...
In various places I've seen the claim that by designing a system up-front, you can significantly reduce development time. I.e. by spending an hour designing you can save a week coding. My problem is that I have never seen a situation where I found this to be true. So I want to know of any examples out there that people have where this wo...
Suppose you have 2 classes, Person and Rabbit. A person can do a number of things to a rabbit, s/he can either feed it, buy it and become its owner, or give it away. A rabbit can have none or at most 1 owner at a time. And if it is not fed for a while, it may die.
Class Person
{
Void Feed(Rabbit r);
Void Buy(Rabbit r...
I've been reading a lot about the MCV and MVP patterns for use with UI and it seems like a really nice powerful way to handle user interfaces. I am - however - having a difficult time deciding how this could integrate into a system where data in the model is created from a Data Acquisition System or Serial/Ethernet devices. There is al...
Hi all,
For my university's debate club, I was asked to create an application to assign debate sessions and I'm having some difficulties as to come up with a good design for it. I will do it in Java. Here's what's needed:
What you need to know about BP debates: There are four teams of 2 debaters each and a judge. The four groups are as...
Java forbids operator overloading, but coming from C++ I do not see any reason for that. In languages where operator symbols are symbols as any other, same rules apply to "+" as to"plus" and there is no problem. So what is the point?
Edit: To be more concrete, show me which disadvantage overloaded "+" may have over overloaded "equals".
...
I am using ManagerPlus whos support line gave me Digital-Metaphor website for assistance in adding more lines into a report. I can add space and the Screeen view is exactly what I want but when it prints there's just a big blank space. There are only 3 lines for writing on and I need at least 6 inserted. I am good at COPY AND PASTE but...
Hello to everybody
I have a rather unusual question but it would be great if there is an answer.
I work in a company that uses a rather old custom application (Access 2003 but is from Access 97 at least) it is starting to show its age.
So personally i think its about to transfer it to .NET with all the pros and cons.
The problem is thi...
Hello,
I have a list of objects say, List. The Entity class has an equals method,on few attributes ( business rule ) to differentiate one Entity object from the other.
The task that we usually carry out on this list is to remove all the duplicates something like this :
List<Entity> noDuplicates = new ArrayList<Entity>();
for(Entity en...
I've studied and implemented design patterns for a few years now, and I'm wondering. What are some of the newer design patterns (since the GOF)? Also, what should one, similar to myself, study [in the way of software design] next?
Note: I've been using TDD, and UML for some time now. I'm curious about the newer paradigm shifts, and or ...
Hi,
Say I have 4 classes
ControllerClass
MethodClass1
MethodClass2
MethodClass3
and each MethodClass has an asynchronous method DoStuff() and each has a CompletedEvent.
The ControllerClass is responsible for invoking the 3 asynchronous methods on the 3 MethodClasses in a particular order.
So ControllerClass invokes MethodClass1....
Hello
How can i create a dummy design of an application before the actual development starts? How to simulate the UI of the application. After completing the analysis phase do i need to start the design directly using dev tools or can i create some dummies (even images, using Visio or something) with other tools?
Thank you
...
I'm still a pretty new project, and I haven't really worked on any large projects yet. However a few projects for school has shown me something I have never really thought of before.
Pre-Project planning.
One project we ran into a huge problem at the very last minute, and the other project was not divided up between partners very evenly...
I have an application that will be spawning multiple threads. However, I feel there might be an issue with threads accessing data that they shouldn't be. I'm relatively new to threading so bare with me.
Here is the structure of the threaded application (sorry for the crudeness):
MainThread
/ ...
I'm trying to determine the best approach for building a WCF Service, and the area I'm struggling with most is returning lists of objects.
The built-in maxMessageSize of 64k seems pretty high, and I really don't want to bump it up (quick googling finds 100s of places bumping the maxMessageSize up to multi-gigabyte range which seems fool...
Is there a known algorithm for implementing a connection pool? If not what are the known algorithms and what are their trade-offs?
What design patterns are common when designing and programming a connection pool?
Are there any code examples implement a connection pool using boost.asio?
Is it a good idea to use a connection pool for persi...
Being a core developer for couple of years, coding applications seeing the class diagrams, sequence diagrams, I decided to improve my self, taking the next step of designing.
As I'm an OO developer, I'm interested in improving my design skills.
For Example, I had a hard time designing a currency converter.
My questions to the SO:
Is...
Hi!
I have some functions that can be grouped together, but don't belong to some object / entity and therefore can't be treated as methods.
So, basically in this situation I would create a new namespace and put the definitions in a header file, the implementation in cpp file. Also (if needed) I would create an anonymous namespace in t...