Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nilesh Miskin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means don't use them.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WhyNotUseJstlSqlActions
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic