• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating Java based message board  RSS feed

 
Jay Maan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

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!
 
Tim Cooke
Marshal
Posts: 4043
239
Clojure IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jay, welcome to the Ranch!

Why are you wanting to write forum software when there are so many available? Especially when many are available for free.
 
Rico Felix
Ranch Hand
Posts: 411
5
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Tim has noted, there are a lot of forum software available for free which you can use...

But if this is for some personal intellectual gain, the following is the fastest thing that came to my mind that you can use as a jump start for ideas...

A user in the system


A comment


A topic


The system


Note that the purpose of this illustrated system is just for a jump start and doesn't contain all the requirements or solid design principles... It was a top off of the head thing
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:Hello Jay, welcome to the Ranch!

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.

Mine:

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!

Winston
 
Jay Maan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Below is my Main Method




Reading the file path :


Reading the loaded file/database :



Writing to the file/database class :


 
Rico Felix
Ranch Hand
Posts: 411
5
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!