Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

mvc - links, tutorials

 
Sonu Shawnee
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have dabbled around a bit in servlets and JSP independetly. I am now trying to imaplement a project using the mvc javabean-jsp-servlet model. In this regard I would appreciate any tutorials, links which would help me in my project. The Oreilly books on JSP and servlet I have some information on it, more web-based tutorials, links would be appreciated.
Thanks.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wrox have kindly made available the chapter that I recently wrote for Professional Java Servlets 2.3 - Designing Web Applications and Servlet Patterns. This introduces model 1 and 2 architectures, talks about their relative merits and then shows how to implement a small system using them.
Rather than build you own, another option is to use a preexisting framework such as Struts. There are lots of good articles about Struts (what it is and how it works), some of which can be found over at ONJava.com.
Hope that helps...
Simon
[ July 10, 2002: Message edited by: Simon Brown ]
 
Sonu Shawnee
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, even beofre I started I had lloked at jakarta struts but I was kinda fuzzy about it and the people I consulted (old time Java Gurus') new nothing about it. I guess its new and is a framework for developing mvc applications. Now, I am sure the question I am going to ask you is answered somewher else in the web, but in your (quick, short) words how is this different from installing tomcat4 and developing from scrath there ??.
Thanks.
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MVC allows you to concentrate on just creating the code that does stuff. It also allows a more flexible setup of your application. You write bits of code that process the information and you also write bits of JSP that display the results and allow you to go on.
Model 1 is actually much easier to write and is probably better for learning while you are grappling with the difficulties JSP presents. Its less object oriented and far more scripted and so its easier to think your way through your application at the beginning. What you pay for in the ease of creating, is that maintenance is hard and adding features can also be hard.
You should probably go ahead and read simon's chapter, its not that long.
btw, struts is not for the faint hearted - there is a fair amount to learn.
 
Sonu Shawnee
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. I will !!
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by chanoch wiggers:
You should probably go ahead and read simon's chapter, its not that long.

Well, it's about 40 pages but you can print it out.
Simon
 
Sonu Shawnee
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that was yum !!!
Now, I am not failiar with UML and such, but I could get the most out of it. 5th chapter in the same book was also good and I think I got every sqaure inch out of it.
I am now looking for some good links/ articles on javabeans.
Please advise.
Thanks.
 
Sonu Shawnee
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be a strange question/s. But somebody put this to me and I didnt have an answer.
I have started implementing stuff using the MVC BeanJSPServlet. I am going slow but going good, I should say.
Now people have started feeling that the reason I am slow is becuase I am trying to implement this complicted architecture. Maybe true, in the sense that if I were doing it using PHP or JSP only, I might have got it done faster. But I guess there are other merits to it. Extensibility, modularity ??? (can someone please dig in)
What makes this project kinda ugly is the enormous amount of fields and tables (Mysql). An average table has 250 fields and there are around 300 tables. Quite naturally, the bean classes run into thousands of lines of code. The back-end takes so much time hence and the front end (JSP/Servlet) comes later into the picture. Other things time-consuming are the monstrous html pages and their layouts.
So, some feelings here are that I should use JBuilder (never used it). For developing the front-end ??? I guess. And instead of servlet and JSP's build and application that would talk to the beans and the database after beans are but classes.
Now, I am thouroghly lost here.
Please advise !!
 
Roger Graff
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you using an advanced IDE like Visual Age or JBuilder they typically include wizards to create JavaBeans. So in your case, if you have an HTML form with 250 fields you can use a wizard to create the corresponding JavaBean. In other words, you define the field type and field name (i.e. "String yourName" ) and check "generate accessor (getXXX)" and check "generate mutator (setXXX)" and the wizard writes the code for you.
A good book on MVC JSP development is "JSP Examples and Best Practices" by Andrew Patzer.
 
Sonu Shawnee
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That boks look good. I am going to buy it right away.
Re, Jbuilder, is it good for Redhat Linux as well.
Thanks.
 
money grubbing section goes here:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!