GistLabs / mechanize

mechanize for java
http://gistlabs.com/software/mechanize-for-java/
Mozilla Public License 2.0
78 stars 21 forks source link

Reworking Page: Resource, ImageResource, and a Choice of Page or Document #47

Closed jheintz closed 12 years ago

jheintz commented 12 years ago

A single Page type is too limiting for a full RESTful multi-content client. The name Page is common and easily understood, but perhaps too ambiguous.

Suggested hierarchy of types: -Resource // the root of all returned types from the web, has bytestream - ImageResource // also has getImage()

@MartinKersten, I assume this is what you were suggesting. Please comment if this isn't what you were thinking about. I've been convinced :)

MartinKersten commented 12 years ago

Works well but I might go for HtmlPage her but actually it is in technical terms a HtmlDocument. Maybe we should subclass HtmlDocument by a HtmlPage (doing nothing than offering a different name for the one who like it too). I always like an adaptable framework offering me different names for describing different jobs. And scraping a web page feels better when you are able to name it HtmlPage. So you have my go.

jheintz commented 12 years ago

I think we should just have one of these... otherwise lead to confusion.

My vote would be for HtmlPage, but I'm not against HtmlDocument.

On Sun, Oct 14, 2012 at 3:29 PM, Martin Kersten notifications@github.comwrote:

Works well but I might go for HtmlPage her but actually it is in technical terms a HtmlDocument. Maybe we should subclass HtmlDocument by a HtmlPage (doing nothing than offering a different name for the one who like it too). I always like an adaptable framework offering me different names for describing different jobs. And scraping a web page feels better when you are able to name it HtmlPage. So you have my go.

— Reply to this email directly or view it on GitHubhttps://github.com/GistLabs/mechanize/issues/47#issuecomment-9426538.

John D. Heintz Agile, Lean, and everything in between

President, Gist Labs http://gistlabs.com Senior Consultant, Cutter Consortium http://cutter.com

Austin, TX (512) 633-1198

http://gistlabs.com

MartinKersten commented 12 years ago

What is the final decision on this?

jheintz commented 12 years ago

I think either Page or Document is fine, but I don't like having both present.

If I had to pick I'd go for document.Document

On Oct 16, 2012, at 14:46, Martin Kersten notifications@github.com wrote:

What is the final decision on this?

— Reply to this email directly or view it on GitHubhttps://github.com/GistLabs/mechanize/issues/47#issuecomment-9503872.