Difference: JavaNotes (18 vs. 19)

Revision 1911 Mar 2004 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingNotes"
Deleted:
<
<
(back to ProgrammingNotes)
 Java is a popular programming language written by Sun Microsystems. It's an object-oriented language that runs inside a "virtual machine" which, at least in theory, allows code to run on many different machines. Sun calls this "Write once, run anywhere", and in practice it actually works reasonably well, although it took years for this to happen.

Java is extremely popular in commercial software development - it's dominant in the area that I work in: operations support software for communications companies. It's not at all popular in the Free Software community because it's a proprietary product owned and controlled by Sun.

Line: 12 to 10
 

Books

Changed:
<
<
Bruce Eckels Thinking in Java
>
>
http://www.mindview.net/Books/TIJ/ - Bruce Eckels Thinking in Java. I used Thinking in C++ to learn C++ and it was excellent, so it's likely that this book is, too.
 
Changed:
<
<
Nutshell
>
>
O-Reilly Nutshell Book
 

Development Tools

Line: 46 to 44
  tomcat - servlet engine, jboss - j2ee container, openejb - ejb container, avalon - server framework, maverick - presentation framework
Deleted:
<
<

Libraries

trace logging: log4j

 

Coding Conventions

Use Sun's http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html and override what you feel is wrong. Personally, I feel that the 80 column constraint is too limiting; I prefer to allow people to use 132 column line widths.

Line: 94 to 88
  There was another implementation but it seems to have fallen off the net. Google had cached entries for a package called TCE/Java at http://www.voicenet.com/~hsk0/tce/ but it seems to have fallen off the net. The guy that wrote it is Howard Kapustein, maybe he'll show up again.
Added:
>
>

XML Parsing

http://cafeconleche.org/books/xmljava/ - looks like a good starter book.

Java as of version 1.4 comes with a competent XML parser and XSLT transformer built in, but sometimes it's preferable to use a different one, for features or speed.

There are two ways that an application can get a parser so you need to either know which one you're trying to use or cover both.

SAX Parser

This is the old approach.

Property

  • javax.xml.parsers.SAXParserFactory
    • org.apache.xerces.jaxp.SAXParserFactoryImpl - value to use for Xerces (xercesImpl.jar on the classpath)

Code

http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParserFactory.html

XML Reader

This is the new approach.

Property

  • org.xml.sax.driver
    • org.apache.xerces.parsers.SAXParser - value to use for Xerces

Code

http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/helpers/XMLReaderFactory.html

				parser = XMLReaderFactory.createXMLReader();
 

Misc Notes

IBM's JVM 1.4.1 for GNU/Linux doesn't seem to recognize old-style timezone names. My /etc/localtime was a link to /usr/share/zoneinfo/US/Eastern and the JVM would never use daylight savings - it was always GMT+5. When I changed the link to /usr/share/zoneinfo/America/New_York it worked fine. See http://www.mainframeforum.com/t590240.html which seems to be relevant despite being a mainframe forum.

View topic | History: r36 < r35 < r34 < r33 | More topic actions...
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback