File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Learning about programming web applications

 
amk pitt
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

This is my first post here. I am currently a student who is studying cs. I have a good handle on java and am learning C, but still have plenty more to learn. One thing I am interested in learning is how to write a program that interacts with information on the web. Take this as an example:


Write a small application that lets a user input their email and a desired product (productId or productName) and sends them an email when the price hits at least 20% off the original price.


I have no experience with writing code that can extract information from the web. I have only done things that either read in user input or read information from a text file. I essentially have no idea how I would go about interacting with the web. I was wondering if anyone who knows how to do this could give me a good starting point for learning how to do this. I understand thats a broad question, but I'm really ignorant on the subject. Can I use Java? Do you have any links for tutorials that would be useful? Any advice would be greatly appreciated.

Thanks.
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why you think that "interacting with the web" is part of the solution for that question.

But that's mostly because the specifications are incomplete. For example: where is the data for those products stored? Are you supposed to arrange that storage yourself, or is the data already somewhere and you're just supposed to access it?
 
amk pitt
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured since all the user was inputting was his email and product name, that I would have to have my program search for the product's lowest price on the web, and then alert the user once that product is available somewhere on the web for 20% less. Perhaps that is more than the assignment is asking, but assuming I wanted to do this, I would have to access the web. Assume this is the type of problem I want to be able to tackle.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"On the web" is pretty broad. Exactly where do intend to get the information from? A web service? Screen-scraping a web page? Other?

Part of learning to program is learning how to specify problems. You'll need to be much more complete.
 
amk pitt
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:"On the web" is pretty broad. Exactly where do intend to get the information from? A web service? Screen-scraping a web page? Other?

Part of learning to program is learning how to specify problems. You'll need to be much more complete.


Ok I see. I guess I would use a Screen-scraping method. I guess thats one place i should start. Thanks Bear.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To fetch things from the web, check out the classes in the java.net package; especially URLConnection.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Screen scraping is a LOT more complex now than in the old days of "terminal" displays. Where a terminal display was once created from a single stream of characters, a modern web page may be built from dozens of different resources.

Bill
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't forget that once you have the screen-scraping part working, all that gives you is the current price for the item. You also need somewhere to store the user's e-mail address and the price of the item at the time the user made the request, so that when three weeks later you find a new price which is 20% lower, you'll be able to send that long-awaited e-mail.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic