Hi all, I'm designing forum. Client side is applet. Storage of forum info is in Oracle DB. What can you advise for server-side? -EJB -Servlets -or smth. different I want to use EJB(Entity BMP). What can you advise me? Thanx, Jamal.
You should use java bean to connect to DB. Servlet is just for controll and used to invoke corresonding java bean .
Joined: Jan 08, 2002
Yes, i think that, there'll be Applet <-> Servlet <-> EJB <-> OracleDB But, what type of EJB can you suggest? Entity or Session? Thanx, Jamal
Joined: Aug 23, 2001
MVC Stands for Model View Controller Use JSP for your front end. This is your view layer. You want to use applets... But I have not seen any forum which is designed with applets ... IMHO applets will be an overkill. Use a Servlet as your application controller. All forms in JSPs are posted to this servlet, which then delegates it's job to different java beans ( not EJBs) to carry out your business logic. The java beans will wrap your business logic, make database calls, etc... This is your model After doing processing the controller will forward its response to another JSP.
Using EJBs for such a simple application will definitely be an overkill. Still, if you insist to use EJB... 1. Session beans can be used to do anything ... however people use entity beans as they offer a good logical design... they can model a database entity. 2. If you use entity beans, be careful when you design your finder methods. If any finder method uses a query like 'select * from java_ranch_users' huge amount of entity beans will be instantiated(No of rows of the table), which will deteriorate performance (If it does not crash the server)
Originally posted by Jamal Hasanov: Yes, i think that, there'll be Applet <-> Servlet <-> EJB <-> OracleDB But, what type of EJB can you suggest? Entity or Session? Thanx, Jamal