• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java & The Web

 
David Mace
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Essentially jsp seems to be the common denominator for web programming so I'm gonna post here. First off, I've been programming in Java for a little more than a year. Frist off, I was developing stand alone Swing applications which interfaced with our corporate databases and that was fairly straightforward after learning the ropes of Java, JDBC, object persistence, design patterns, etc etc etc (you get the drift).

Then we all decided we wanted something a little more web-centric so off I went doing my research and thought that since our main push for going to the web was to ease the pain of deployments and updates, well it might just be more suitable to go with JWS than actually reprogramming the user views into web pages. So that's what we did and to this day, I really like JWS for deploying apps in an intranet environment.

I'm now trying to advance the scope of my knowledge and branch out into web programming and have been diligently researching this topic for the past month just trying to get a grip on the standards used, common design methodologies, best practices, outdated technology, upcoming technologies, etc etc. To be honest, the number of choices and opinion is endless when you're looking at potential paths to take down the road.

Do I learn struts? Well, not sure because I read opinions on both sides of the spectrum from some people claiming it's so bloated it's not worth using and yet others adore it because they don't have to "reinvent the wheel" everytime they want to get something done in the context of a web application. I look at the complexity of the jobs I would like to tackle and, to some extent, I believe they fit the fill of being large enough to benefit, but I still wonder if the alternatives are better than struts (i.e. tapestry, spring, etc).

What about web-services? I know little about xml, but it doesn't seem to be all that convoluted. What are the benefits to having a web-service in my application in the first place? Can't I just as simply do everything I want to from a servlet or client-side via a jsp or applet? I can see some potential in being able to stream data from a web-service via xml, but I'm not sure that I can't achieve the very same thing through other channels, a I wrong here?

SOAP - Have to admit, I'm not even sure what this is, but I've seen it referenced in the context of getting .NET and Java services to communicate. I guess it's just another technology that has to be learned and evaluated.

EJB - To the best of my knowledge, this seems to be something that would be great on a resume, but I'm not entirely sure I want to give this technology a go until EJB3.0 comes out. I'm in love with Hibernate as my persistence mechanism and I'm not super-willing to just give that away as it really speeds up my development time. What other container services are here that I can't find in open-source peojects which have more flexible implementations?

Almost forgot - Java Server Faces. That's next on my list to search out, but as of now, I haven't the foggiest what they are.

And on top of the technologies involved, what about the general design principles of a web-application? Ok, I've done a few simple JSPs to pull data from a db and display, but they were non-interactive. Managing sessions, cookies, etc seems like it can be a little rough at first sight, but not nearly as difficult as deciding the technologies to use.

At the end of the day, it's almost a full-time job to keep up with the tech.
Let me hear some of your experiences....or maybe even post a link or two that you think might be helpful to me.

Thanks,
David
[ January 26, 2005: Message edited by: David Mace ]
 
Gert Cuppens
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mind you, I'm only a java amateur in both senses : non-professional and lover. I'm writing during my own hours web applications, just for the fun of it. And to keep my technical knowledge at an acceptable level; at work, I'm doing the analysis for axapta modules. And Axapta means X++, a javalike language.

When I read that you were doing database instructions inside JSP, I thought I had to add something about the MVC or Model-View-Controller model 2. JSP's are merely for showing the data, they are part of the presentation layer or View. The data you want to show, is wrapped inside Java Beans, which form the Model. The Controller takes care of the whole application : it accepts the requests and decides which response must be given. That's what servlets are for. ANd then there is another kind of objects, not mentioned in MVC but very important and that's the DAO or Data Access Object. These are the classes who contain the SQLinstructions to get data out of the database.
Seems complicated ? Better of with doing everything inside your JSP ? Perhaps for small web applications who don't change very often and can be maintained by one developer. But not for all the rest.

There are 2 books I want to mention if you want to study more on JSP.
1) "core servlets and Java Server Pages" from Marty Hall. You can download the first edition for free at www.coreservlets.com
2) "Apache Tomcat Bible"; the titel is somewhat misleading, since it covers the construction of an entire web application. It starts with explaining how to download and install Java SDK, Tomcat, MySQL, Eclipse. And it ends with explaining the source code of an entire web application built following the MVC principles.
 
David Mace
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I'd also like to share a link with others who may read this post. I found a rather nice book (free even) on theserverside.com. If you do a search for Falkner, you'll come up with the download page, it's really nice and does a complete walk through of setting up a web app as well as explaining setting up the environment, etc etc. Very nice indeed.

David
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!