I'm trying to create java based fairly simple forum, but finding very tough to begin with. Please kindly share your opinions/comments.
The task is as following:-
• each user may post exactly one research topic;
• each each may see all research topics posted by other users;
• each each may read all messages contributed by all users on a particular research topic;
• each user may post a new message to contribute to the discussion on any of the topics posted.
Something like below:-
User topic: Intrusion Detection Systems
Posted by: John
[22/10/11 14:00] John wrote I am building a new IDS based
on neural networks. …………….Comments ………….?
[22/10/11 14:12] Kate wrote there could be too many false positives!
Why are you wanting to write forum software when there are so many available? Especially when many are available for free.
And my question (additional to Tim's; and assuming you do want to "roll your own" forum); What are we supposed to share? You've provided no code, no spec, and no thoughts about how you even want to tackle this, so "comments" are going to be VERY broad.
1. Are you sure you're ready for a project like this? We have no idea how "advanced" you are; but I'd say that ANY forum software is going to be advanced - I'm not sure I'd want to do it; and I've been at this lark for nearly 40 years.
2. Decide WHAT you want before you write your first line of Java code (and that "spec" should be detailed and written in English - or your native language).
Not sure if it helps, but hope it does. And welcome to Java Ranch!
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
posted 3 years ago
Thank you Rico, really appreciate your effort and comments. Below is so far what I have managed, however, though I am able to load a .csv file and write to it and it saves automatically(when I open the .csv file) but for some reasons I am not able to read the file. :S
There are multiple issues I can spot in your code from scrolling top to bottom...
1. On line 15 in your Main class, you are storing the return value from the JOptionPane.showInputDialog method into an Object reference (selection) then comparing it to a String literal in your condition statement which will all yield to false because of the == operator which checks the hashcode value of the objects... you should use the equals method instead...
2. On line 26 in your Main class, you are not storing the return value from the get method...
3. In your openFile method in the readfile class, on line 11 you are passing a null value to the File object... Same thing is happening in your writefile class on line 38 where you are passing a null value to the FileWriter object... On both occasions it should be new readpath().get() instead of readpath.a
I would suggest you sit down an take the time to design the system on paper using analysis and design techniques before diving into the implementation...
And if you really want to go hard-core and get ideas of forum software from an implemented solution you can study this system