[tssg-tech] Re: Parsing BostonEventsList with ROME

  • From: Harry Henriques <harry_henriques@xxxxxxxxxxx>
  • To: tssg-tech@xxxxxxxxxxxxx
  • Date: Fri, 24 Sep 2010 17:07:55 -0700 (PDT)

Please see my comments that are embedded in Julie's message, below.

Best regards,
Harry Henriques
Java Developer




________________________________
From: Julie Carwellos <jcarwellos@xxxxxxxxx>
To: tssg-tech@xxxxxxxxxxxxx
Sent: Fri, September 24, 2010 2:13:01 PM
Subject: [tssg-tech] Re: Parsing BostonEventsList with ROME


Harry, you're right. We have an n-tiered app here - lots and lots of 
capabilities to be included (Java, JavaScript, XML, HTML, and we'll come across 
more, I'm sure). So it's important to be clear. The following might help, and 
anyone should jump in if I don't get it quite right:

****************************
I hope everyone is clear on the fact that Java and JavaScript are as different 
as Java and C++.  JavaScript is a unique language, and Java is another unique 
language.  I don't believe that it is possible to mix the two languages into 
one 
executable bytecode file.
*****************************

JDOM - Java's document object model for loading XML files so that app code can 
then traverse the model and pick and choose and change the information as it 
wants.

DOM - X/DHTML's document object model, for the same reason, but it's with 
Javascript. In this case, the incoming file needs to be HTML (Xtended or 
Dynamic, hence the XHTML or DHTML). PHP and Perl I think can access the DOM, 
too. But Android gives you hooks to use Javascript in apps.

Namespace is actually an XML thing, and the WWW Consortium has you put all 
kinds 
of special casing into your own namespace.  That way, anyone could define 
something like a "book.xml" file in any way they wanted to, and as long as the 
xml referenced it's own namespace there'd be no confusion.  In our case, if BEL 
had it's own namespace for RSS extensions, it could break down the XML tags 
into 
a much more granular level than the RSS standard defines (aka Extensions).

If we're planning on displaying each event separately in an Android Web View, 
then each event has to become a valid HTML file, most of which is in the 
Description tag, and we can wrap it with the required HEAD and BODY tags.

***************************
Because we have the URL of the "details page" thanks to ROME and JDOM, I 
thought 
that it would be a good idea to invoke the Adroid Web View (browser?) using the 
URL as a hyperlink.  The cell phone user would get an un-massaged view of the 
"details page", and this "details page" has all the info that the cell phone 
user is interested in.

Because we have the URL of the "details page", we could use HttpClient to 
retrieve this "details page" from the BEL server, and the BEL server would 
return an HTML page (completely intact) as a Java readable file.  The Java file 
then could be parsed in the background to facilitate the "search" functionality 
and database functionality.  


As Julie has suggested, it may be easier to work directly with the info in the 
Description tag, provided by ROME / JDOM.  The "details page" returned by the 
server is very involved.
**************************

This brings up another issue - where's the CSS? I would think we'd need to 
develop a mobile.css, much as BEL probably already has files for print.css and 
for other devices.

**************************
I'm not sure, but I don't think you would have to worry about Style Sheets.
**************************

-julie

Other related posts: