Hi,
We are a group and want to make a forum using the j2ee technology, and I need your guide through the following:

1. Should we use any FrameWorks ? if yes. which one is better and simpe ?

2. If not using any Framework, then what you suggest ?

3. any reference through how to make a simple Forum using MVC pattern. Just to get the idea ...

Thanks

Dani AI

Generated

For a simple J2EE forum built to the MVC pattern: asked the right questions, and since and encouraged trying frameworks, here is a compact, practical blueprint that fills in gaps the replies left open — domain model, controller/service responsibilities, data concerns, testing and common pitfalls.

Keep responsibilities strict: controllers handle HTTP, validation and authentication checks; services hold business logic and transaction boundaries; DAOs/repositories handle persistence; views are pure rendering (escape output, reuse header/footer). A minimal feature set to drive design: user auth, create/list topics, reply/edit posts, basic moderation, paging and search, and attachments. Start by implementing those five flows as endpoints to validate the shape of controllers and DTOs.

Suggested domain model (conceptual): User, Forum, Topic, Post, Attachment, Role/Permission. Key fields: ids, creator_id, created_at/updated_at, parent_post_id (for replies), status (active/hidden). Index topic/forum foreign keys and created_at for paging and fast lookups. For attachments prefer file-system or object storage with path/URL in DB (avoid storing large blobs in primary tables). Use optimistic locking or a last_modified field to avoid lost updates.

Practical development notes and pitfalls: prototype an MVP fast to decide libraries (persistence: JPA/Hibernate vs plain JDBC; views: JSP/templating). Write unit tests for services and integration tests with an in-memory DB for commits. Watch for N+1 queries and lazy-loading issues, offload full-text to Lucene/Elasticsearch only when needed, and add pagination early. Security essentials: hash passwords (bcrypt), validate/sanitize inputs, CSRF tokens, escape HTML in views, validate upload types/sizes. Deploy on a servlet container with a connection pool and enable basic caching for topic lists. Start small, iterate, and instrument (logs/metrics) to find real bottlenecks rather than optimizing prematurely.

Recommended Answers

All 3 Replies

> 1. Should we use any FrameWorks ? if yes. which one is better and simpe ?

Yes, using one of the Frameworks out there would be far better a choice, no point in reinventing the wheel as long as you know what goes behind the scenes. I have worked with JSF and found it to be quite unsatisfactory. The best bet here would be to try out some of the widely used frameworks out there, implement a prototype and get a feel of how things work out to be. Struts2, Spring MVC, Wicket etc. come to mind. Here is an interesting read.

> 2. If not using any Framework, then what you suggest ?

If you don't use any framework, you end up creating one in the process of developing a complex application like forum. It all depends on what you are up to; if this is a learning activity either implement everything from scratch [if you have enough time!] or use a framework and understand its internals. If you are into serious business, using a framework is advisable.

> 3. any reference through how to make a simple Forum using MVC pattern.

As for the open source forum softwares out there, here is a good reference for you.

./sos

Thanks very much for the idea,
I will post again if faced any problem or if need further info ...

hi
framework is always good to use..............i will suggest struts2, wicket

Hi,
We are a group and want to make a forum using the j2ee technology, and I need your guide through the following:

1. Should we use any FrameWorks ? if yes. which one is better and simpe ?

2. If not using any Framework, then what you suggest ?

3. any reference through how to make a simple Forum using MVC pattern. Just to get the idea ...

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.