aspose file tools*
The moose likes Servlets and the fly likes I am using MVC architecture. Is there any other architecture. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "I am using MVC architecture. Is there any other architecture." Watch "I am using MVC architecture. Is there any other architecture." New topic
Author

I am using MVC architecture. Is there any other architecture.

chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Hi everybody, I am chaitanya, I am working on a web project, I only know about jsps, servlets, sessions, cookies, beans, jstl, el. I dont know RMI and EJBs. I am using MVC architecture.

For each and every functionality I am writing a view, servlet and a model. Is this the right approach?

I did not use bean till now because I did not find any use in the project till now.

I am reading Head first servlets and jsps. While I was going through it, I saw a topic saying, 1view 1model 1servlet for each functionality, too big and redundant code. They said that the reader will find the answer at last, on how to use MVC architecture. I am in jstl at present.

So my question is should I use MVC for each and every functionality or not.

At last I came to a conclusion that if I want to send some data to server I ll use MVC, if I want to retrieve data from server I ll use the <sql:query /> tag from jstl1.2 core.

Is my decision right?

Can anybody tell me whether I am going in the right way or not. If not please guide me.

Thank you all in advance. Have a NICE DAY.


Love all, trust a few, do wrong to none.
Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
I would suggest be patient, read the whole HFSJ book; you will find answers at the end.
There are plenty of frameworks out there which help you implement popular design patterns in a systematic manner; e.g. struts, spring etc.
For now, learn the core concepts thoroughly. You might want to go back & read the mini-MVC tutorial again from the book before your experiments.
All the best!


Nilesh Miskin
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The SQL tags are meant for prototyping only: data access should be done in services used by servlets: this makes code easier to test, modify, and so on.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Thank you all. Ok, I ll be patient and read the entire book.

Hi David, you said sql tags are used for prototyping only. What is meant by that?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

It means don't use them.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Thank you Bear, I wont use them. I used in one jsp page. Now I will remove it. Instead I ll write a servlet. Thanks for helping.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

WhyNotUseJstlSqlActions


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I am using MVC architecture. Is there any other architecture.