Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write a forum application in Java

 
Mohamad Norouzi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

actually, I want to know how forums work. I want to know if information written by people are going to insert in database or somewhere in hard disk? I dont think it persist in the database because there are many information and everytime it is growing up.
any way, I want to write a forum like application not a forum, and I dont have any experience in this field. so any suggestion or comment about this will be appreciated.
Is there any Api for using in java for forums?

thank you in advance
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download Opensource forum from below link, they provide souce code aslo, so you can see what they are doing and how they are doing.

JForum
 
Mohamad Norouzi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for you rreply, but I dont want use such these applications, because I want to add some specific features and I dont need many features of these forums.

I want to know how they work, so I use those methods in my program.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mohammad norouzee:
I dont have any experience in this field. so any suggestion or comment about this will be appreciated.


This is why I am suggesting you jForum.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To go to your specific question of how data is stored ... if you design and build just right, this can be the last decision you make. Imagine an interface Repository that has all the store() and fetch() methods. There could be an implementation that uses a database, another that uses flat files, another that uses messages to a remote store.

So, that's among the least of your worries right now. Think about the user scenarios ... somebody views a forum list, picks one, views a message list, picks one, etc. Then you can see what kind of architecture fits ... maybe a web app is a given, but there are many options in even a simple servlet app. Then you can think about designs.

Whew, a long way to go, no? This is a pretty significant kind of application so there will be lots and lots to think about. The suggestion to look at other open source forum products is one way to explore your options. Or we could try to help you through an agile approach and start with the simplest part of the system we can think of and build from there.

Hope that helps set the stage. What would you like to do next?
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't mean to hijack but thanks for the link to JForum. I've done almost no J2EE and was considering exploring it for purely academic reasons and writing some forum software so I'm glad to see there's some open source Java implementation I can examine.
 
Mohamad Norouzi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stan,

Thank you so much, yes you right I should design the application that work with any method of persisting data, and I should seperate and decouple the persistance layer of the application.

using database, is simple just you should design the tables and try to optimise the database, but how about using files and directory?

any way, I am going to use the JForum to see what they did in their application.

thanks again to all who reply me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic