HTML5
June 3rd, 2010 — alexTo Google or not to Google, that is the question.
Whether ’tis nobler on the web to suffer the sling and arrows of outrageous layout
Or to take up HTML5 and by opposing end them.
To Google or not to Google, that is the question.
Whether ’tis nobler on the web to suffer the sling and arrows of outrageous layout
Or to take up HTML5 and by opposing end them.
Someone you’ve never met or heard of would like to inform the entire company that someone else you’ve never met or heard of will be replacing yet another person you’ve never met or heard of in a position that you were not even aware existed nor would you be likely to notice if it simply ceased to exist.
The replacement has a long history of successfully doing jobs you are not aware of and seems to have had almost zero impact on your life or the lives of anyone you know.
One thing is certain, all of these very important people make a lot more money than most of you and therefore you need to know all this so that you may display the appropriate deference on the extremely slim chance that you ever actually do meet any of these very important people.
The beatings will continue until morale improves. That is all.
XSL is like a nuclear weapon, it might serve a purpose but firing in anger is a bad idea and not terribly scalable.
Is the request for an “Inversion of Control” a sign that the requester knows nothing about software design?
No, but it may appear to in some use cases. If you use redirect:write a lot for example:
<redirect:write file="{$outfile}">
...
</redirect:write>
The solution here is to bracket the write with open and close so that the engine does not have to implicitly track the open file stream:
<redirect:open file="{$outfile}"/>
<redirect:write file="{$outfile}">
...
</redirect:write>
<redirect:close file="{$outfile}"/>
This is a common question and the answers out there are pretty sketchy. So I’m going to provide my example code:
package demo;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
public class HTMLDemo {
public static void main(String[] args) {
FileOutputStream outputStream = null;
try {
Document newDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
Element html = newDocument.createElement("html");
Element head = newDocument.createElement("head");
Element body = newDocument.createElement("body");
Element p = newDocument.createElement("p");
Text textNode = newDocument.createTextNode("Hello World");
p.appendChild(textNode);
body.appendChild(p);
html.appendChild(head);
html.appendChild(body);
newDocument.appendChild(html);
outputStream = new FileOutputStream("/demo.html");
TransformerFactory.newInstance().newTransformer().transform(
new DOMSource(newDocument), new StreamResult(outputStream));
} catch (Exception e) {
e.printStackTrace();
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
I leave things like doctype as an exercise to the reader.
It’s certainly looking that way. After all I’m posting this from a Blackberry!
This qwerty keyboard is great for all sorts of things.
It seems that everyone and their dog is creating handheld computing devices with WiFi and/or 3G GSM. I think that the migration away from latops has begun.
Is XML just plain bad? Or is it an otherwise useful tool that gets abused?