• Post Reply Bookmark Topic Watch Topic
  • New Topic

Web programming questions  RSS feed

 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

a few questions about web programming if anyone can answer them:

1) Can you recommend a good web programming book? I was looking at Deitels How to Program (Amazon) as it has a section on web programming and I heard their books are very good. I have bought more rubbish Java books than good ones, so as web programming seems so complex I would like a book with good explanations, etc!
2) Should I be web programming in java? I hear jsp isn't great compared to php.
3) As a complete beginner to web programming I would ideally like to write a simple html site where users upload info to a database on a server ie. an online shop, a flight booking system, hotel reservation, etc. so any books with tutorials along the lines of these applications would be a bonus.
4) I have written applications such as the above that read/write to a database; is it much more difficult to write these kinds of programs through web programming (ie in a web browser)?

Any info would be much appreciated. I know the net, even this site, has a ton of info but theres so much it gets overwhelming. I just need to learn the basics and work from there.

Thanks.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) HeadFirst Servlet.
2) PHP is faster to code because you have less "things" to learn. But, both of languages are greate and, in my country, Java pays more money (huge difference).
3) Ok, you can write it.
4) No, you just have to learn how. [=
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hebert Coelho wrote:2) PHP is faster to code because you have less "things" to learn. But, both of languages are greate and, in my country, Java pays more money (huge difference).

I don't know about that. I've programmed in both, and JSP isn't that much different from PHP. The main difference is the "automatic" variables; PHP has some like $_REQUEST, $_POST, $_SESSION and $_SERVER, JSP has request, response, session, etc. The only thing that PHP will make a lot easier for you is file uploads; PHP gives you $_FILES whereas in Java you need to do this yourself (preferably with Apache Commons FileUpload).
Now servlets, that's a whole different story. That does require a lot more configuration to work, and requires a web container restart after any change in either the servlet or configuration.

As for the third problem, a simple HTML form and a JSP / servlet to process the results should do it. Use the HttpServletRequest to get the parameters from the form.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!