Monday, April 13, 2009
emerging technologies conference in philadelphia
Glenn Mazza: emerging technologies conference in philadelphia
Don’t Invent XML Languages
Don’t Invent XML Languages
Tim Bray in 06 suggested that you shouldn't reinvent any XMl language, unless you can prove it doesn't fit the "BIG 5":
The Big Five
Suppose you’ve got an application where a markup language would be handy, and you’re wisely resisting the temptation to build your own. What are you going to do, then? ¶
The smartest thing to do would be to find a way to use one of the perfectly good markup languages that have been designed and debugged and have validators and authoring software and parsers and generators and all that other good stuff. Here’s a radical idea: don’t even think of making your own language until you’re sure that you can’t do the job using one of the Big Five: XHTML, DocBook, ODF, UBL, and Atom.
XHTML + Microformats:
If you’re delivering information to humans over the Web, even if you don’t think of it as “Web Pages”, it’s almost certainly insane not to use XHTML. Yes, XHTML is semantically weak and doesn’t really grok hierarchy and has a bunch of other problems. That’s OK, because it has a general-purpose class attribute and ignores markup it doesn’t know about and you can bastardize it eight ways from center without anything breaking. The Kool Kids call this “Microformats” and in fact I accidentally invented one on ongoing last November; look at that template and its class attributes. ¶
And of course, if you use XHTML you can feed it to the browsers that are already there on a few hundred million desktops and humans can read it, and if they want to know how to do what it’s doing, they can “View Source”—these are powerful arguments.
DocBook
Suppose you’re building something that needs to go bigger and deeper and richer than XHTML is comfy with, and you want to repurpose it for print and electronic and voice, and you need chapters and sections and appendices and bibliographies and footnotes and so on. DocBook is what you need. It’s got everything you could possibly begin to imagine already built-in, and there are lots of good tools out there to do useful things with it. ¶
ODF
Suppose you’re working with material that’s going to have a lot of workflow around it, and be complex, visually if not structurally, and maybe some day will be printed out and have signatures at the bottom. ODF is what you want. Not the most Web-oriented approach, but on the other hand the authoring tools are more human-friendly than anything else on this list. ¶
UBL
If you’re working with invoices and purchase orders and that kind of stuff (and who isn’t?), do not even think of inventing anything. A whole bunch of smart people have put hundreds of person-years into pulling together the basics, and they did a good job, and it’s ready to go today. Look no further. ¶
Atom
Suppose you think of your data as a list of, well, anything: stock prices or workflow steps or cake ingredients or sports statistics. Atom might be for you. Suppose the things in the list ought to have human-readable labels and have to carry a timestamp and might be re-aggregated into other lists. Atom is almost certainly what you need. And for a data format that didn’t exist a year ago, there’s a whole great big butt-load of software that understands it. ¶
Tim Bray in 06 suggested that you shouldn't reinvent any XMl language, unless you can prove it doesn't fit the "BIG 5":
The Big Five
Suppose you’ve got an application where a markup language would be handy, and you’re wisely resisting the temptation to build your own. What are you going to do, then? ¶
The smartest thing to do would be to find a way to use one of the perfectly good markup languages that have been designed and debugged and have validators and authoring software and parsers and generators and all that other good stuff. Here’s a radical idea: don’t even think of making your own language until you’re sure that you can’t do the job using one of the Big Five: XHTML, DocBook, ODF, UBL, and Atom.
XHTML + Microformats:
If you’re delivering information to humans over the Web, even if you don’t think of it as “Web Pages”, it’s almost certainly insane not to use XHTML. Yes, XHTML is semantically weak and doesn’t really grok hierarchy and has a bunch of other problems. That’s OK, because it has a general-purpose class attribute and ignores markup it doesn’t know about and you can bastardize it eight ways from center without anything breaking. The Kool Kids call this “Microformats” and in fact I accidentally invented one on ongoing last November; look at that template and its class attributes. ¶
And of course, if you use XHTML you can feed it to the browsers that are already there on a few hundred million desktops and humans can read it, and if they want to know how to do what it’s doing, they can “View Source”—these are powerful arguments.
DocBook
Suppose you’re building something that needs to go bigger and deeper and richer than XHTML is comfy with, and you want to repurpose it for print and electronic and voice, and you need chapters and sections and appendices and bibliographies and footnotes and so on. DocBook is what you need. It’s got everything you could possibly begin to imagine already built-in, and there are lots of good tools out there to do useful things with it. ¶
ODF
Suppose you’re working with material that’s going to have a lot of workflow around it, and be complex, visually if not structurally, and maybe some day will be printed out and have signatures at the bottom. ODF is what you want. Not the most Web-oriented approach, but on the other hand the authoring tools are more human-friendly than anything else on this list. ¶
UBL
If you’re working with invoices and purchase orders and that kind of stuff (and who isn’t?), do not even think of inventing anything. A whole bunch of smart people have put hundreds of person-years into pulling together the basics, and they did a good job, and it’s ready to go today. Look no further. ¶
Atom
Suppose you think of your data as a list of, well, anything: stock prices or workflow steps or cake ingredients or sports statistics. Atom might be for you. Suppose the things in the list ought to have human-readable labels and have to carry a timestamp and might be re-aggregated into other lists. Atom is almost certainly what you need. And for a data format that didn’t exist a year ago, there’s a whole great big butt-load of software that understands it. ¶
Friday, April 10, 2009
More ESB comparisons
More ESB comparisons
See also: Manning: Good book: Open-Source ESBs in Action (Chapter1)
Wikipedia http://en.wikipedia.org/wiki/Comparison_of_business_integration_software
Aqualogic vs Mule vs Servicemix vs Websphere: http://eugeneciurana.com/musings/ESB-comparison.pdf
or http://www.networkcomputing.com/article/printFullArticle.jhtml?articleID=181501276
& finally the above references scorecard:
See also: Manning: Good book: Open-Source ESBs in Action (Chapter1)
Wikipedia http://en.wikipedia.org/wiki/Comparison_of_business_integration_software
Aqualogic vs Mule vs Servicemix vs Websphere: http://eugeneciurana.com/musings/ESB-comparison.pdf
or http://www.networkcomputing.com/article/printFullArticle.jhtml?articleID=181501276
& finally the above references scorecard:
Wednesday, April 01, 2009
weirdness with java 6 JAX-WS
strange error occuring with Jax-ws on Java JDK 1.6.0_06 or lower. after building the stubs with wsimport and writing a trivial client, you get javax.xml.ws.WebServiceException: unexpected XML reader state. expected: END_ELEMENT but found: START_ELEMENT when running against a document/literal web service However, upon upgrading to JDK 1.6.0_07 (or higher) it now works? seems there was a bugfix in 07 update
Tomcat security
One painful thing I'm learning is the restrictions tomcat has when running under the -security option.Basically many things (eg: jaxb, jax-ws, axis) can't run.
Locating the appropriate permissions is pretty daunting.Now lhttp://www.onjava.com/pub/a/onjava/2007/01/03/discovering-java-security-requirements.html has a tool calledProfilingSecurityManager (which is just a custom SecurityManager class) which displays the permissions required(basically start catalina with -Djava.security.manager=secmgr.ProfingSecurityManager)You then use a perl script
Another reference is http://www.petrovic.org/blog/2006/05/07/tomcat-security-option-and-catalinapolicy-file
Basically export CATALINA_OPTS=-Djava.security.debug=access,failurethen run catalina.sh run -security
Look in catalina.out for denied.Then seek for "domain that failed ProtectionDomain" for the codebase or domain.
http://www.jchains.org/ also allows you to do the same for standard java execution.
Locating the appropriate permissions is pretty daunting.Now lhttp://www.onjava.com/pub/a/onjava/2007/01/03/discovering-java-security-requirements.html has a tool calledProfilingSecurityManager (which is just a custom SecurityManager class) which displays the permissions required(basically start catalina with -Djava.security.manager=secmgr.ProfingSecurityManager)You then use a perl script
Another reference is http://www.petrovic.org/blog/2006/05/07/tomcat-security-option-and-catalinapolicy-file
Basically export CATALINA_OPTS=-Djava.security.debug=access,failurethen run catalina.sh run -security
Look in catalina.out for denied.Then seek for "domain that failed ProtectionDomain" for the codebase or domain.
http://www.jchains.org/ also allows you to do the same for standard java execution.
Tuesday, March 31, 2009
Java Logging API and How To Use It
Java Logging API and How To Use It
On tomcat 5.5 we have the JULI library which replaces the standard java logger.
So to get per-context logging, put
logging.properties into WEB-INF/classes with the following contents:
On tomcat 5.5 we have the JULI library which replaces the standard java logger.
So to get per-context logging, put
logging.properties into WEB-INF/classes with the following contents:
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = myapp-prefix.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
ps: here are the standard set of JULI properties:
- org.apache.juli.FileHandler.directory
- org.apache.juli.FileHandler.prefix
- org.apache.juli.FileHandler.suffix
- org.apache.juli.FileHandler.level
- org.apache.juli.FileHandler.filter
- org.apache.juli.FileHandler.formatter
Tuesday, March 24, 2009
Disabling Certificate Validation in an HTTPS Connection (Java Developers Almanac Example)
Whilst suffering extreme pain due to self-signed certificates (hint: UTS IT ?) here is a nify trick to roll your own non certificate checking class:
Disabling Certificate Validation in an HTTPS Connection (Java Developers Almanac Example E502)
e502. Disabling Certificate Validation in an HTTPS Connection
By default, accessing an HTTPS URL using the URL class results in an exception if the server's certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.
exception if the server's certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.
Client:
Disabling Certificate Validation in an HTTPS Connection (Java Developers Almanac Example E502)
e502. Disabling Certificate Validation in an HTTPS Connection
By default, accessing an HTTPS URL using the URL class results in an exception if the server's certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.
exception if the server's certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
};
// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
}
Client:
// Now you can access an https URL without having the certificate in the truststore
try {
URL url = new URL("https://hostname/index.html");
} catch (MalformedURLException e) {
}
Saturday, March 21, 2009
Google street view hits cairns!
I couldn't believe this - Google street view covers a huge chunk of oz!
And here is the old Cairns house: <http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=16+ward+st+mooroobool&sll=-16.933004,145.728707&sspn=0.024592,0.038967&ie=UTF8&ll=-16.933989,145.743728&spn=0.005542,0.019484&z=16&iwloc=addr&layer=c&cbll=-16.93399,145.74373&panoid=5E_F8Yl08u2hRIHT1aW_tw&cbp=11,48.12376890949633,,0,4.008810572687228>
And here is the old Cairns house: <http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=16+ward+st+mooroobool&sll=-16.933004,145.728707&sspn=0.024592,0.038967&ie=UTF8&ll=-16.933989,145.743728&spn=0.005542,0.019484&z=16&iwloc=addr&layer=c&cbll=-16.93399,145.74373&panoid=5E_F8Yl08u2hRIHT1aW_tw&cbp=11,48.12376890949633,,0,4.008810572687228>
Friday, March 20, 2009
Critical Steps to Secure Tomcat on Windows NT/2K/XP
Critical Steps to Secure Tomcat on Windows NT/2K/XP
wow, running tomcat can really cause security holes.
fancy
wow, running tomcat can really cause security holes.
fancy
Runtime rt = Runtime.getRuntime();
rt.exec("c:\\SomeDirectory\\SomeUnsafeProgram.exe")
running under the system context (As Administrator!!) of windows.
boo yaa!
Wednesday, March 18, 2009
this is a blog post using w.bloggar http://wbloggar.com/download.php
A quick way of entering blog entries.
chris
A quick way of entering blog entries.
chris
Tuesday, March 17, 2009
converting unix date to excel date
been bugged by this for while - on unix the date timestamp is number of seconds since 1/1/1970
On excel, it's 1/1/1900
So to convert the unix timestamp to microsoft excel, use the formula:
=timestamp/86400 + "1/1/1970"
(where 86400 = 24 * 60* 60 ie: # seconds in a day).
Oh you might also want to add/subtract an offset for the timezone (depending on the timezone settings of your unix box). eg: for +10 GMT (sydney, melbourne, canberra) add 10/24 ie: 0.416667
ps: make the cell format Date or Time or Custom format.
Personally I prefer ddd dd/mm/yyyy HH:mm:ss (ie: Tue 03/03/1999 23:59:43)
On excel, it's 1/1/1900
So to convert the unix timestamp to microsoft excel, use the formula:
=timestamp/86400 + "1/1/1970"
(where 86400 = 24 * 60* 60 ie: # seconds in a day).
Oh you might also want to add/subtract an offset for the timezone (depending on the timezone settings of your unix box). eg: for +10 GMT (sydney, melbourne, canberra) add 10/24 ie: 0.416667
ps: make the cell format Date or Time or Custom format.
Personally I prefer ddd dd/mm/yyyy HH:mm:ss (ie: Tue 03/03/1999 23:59:43)
Sunday, March 15, 2009
2008 SOA magazine readers choice
I'm personally a bit dubious about the readers choice result from SOA magazine ( http://soa.sys-con.com ) since it gives very high rankings to IBM websphere software.
Some make sense and some don't.
Best App server:
Best Integration Server
Best Opensource SOA
Best Portal
Best Security
Best SOA platform
Best SOA Testing tool
Best SOA Tool
It's a bit weird to mix development tools (#3 RSA & #4 Rational Team) with servers (#1, #2). Maybe that's why IBM got pushed down, staff got confused..
Best SOA training site
Best SOA Book
Best SOA or XML Site:
Yeah they are ok. What about non-vendor stuff.
Con-clusion:
sys-con SOAWorld magazine tries to be a vendor neutral but they need some mechanism to do a real unbiased report. Maybe if Gartner or any of the reputable firms would run the survey I would be less skeptical.
Some make sense and some don't.
Best App server:
- IBM websphere (yeah, huge number of commercial, plus ambigous since this includes WASCE and probably Apache Geronimo)
- Glassfish (big push from SUN)
- Weblogic (ol' favorite, but Oracle owns this now and god knows how they market it)
- WSO2 (** weird?? Where did this come from? Maybe manipulation?)
- JBoss (huh, would have thought this near #2 or #4)
- NetBeans (assuming 6.1, which is excellent)
- Rational Application Developer (eclipse)
- Oracle JDeveloper (not eclipse)
Best Integration Server
- Websphere Integration Developer
- Fiorano ESB
- Java CAPS (glassfish++)
Best Opensource SOA
- WASCE (does this include Apache Geronimo??)
- Sun openESB
- SoapUI
Best Portal
- IBM Websphere Portal
- Sun Portal
- Weblogic Portal 10.2
Best Security
- IBM Datapower XML security gateway XS40
- Sun access manager/open SSO
- oracle web services management
- Metro
Best SOA platform
- IBM Websphere
- Fiorano SOA
- Sun Java CAPS
Best SOA Testing tool
- Rational Tester for SOA
- SoapUI
Best SOA Tool
- Fiorano ESB
- Sun Java CAPS
- Rational Software Architect
- Rational Team concert
It's a bit weird to mix development tools (#3 RSA & #4 Rational Team) with servers (#1, #2). Maybe that's why IBM got pushed down, staff got confused..
Best SOA training site
- IBM SOA Sandbox
- SOA Training Curriculum (MomentumSI)
Best SOA Book
- IBM"The New Language of Business: SOA & Web 2.0"
- Amberpoint et al An Implementorメs Guide to SOA ヨ Getting it Right
- IONA Understanding SOA with Web Services
Best SOA or XML Site:
Yeah they are ok. What about non-vendor stuff.
Con-clusion:
sys-con SOAWorld magazine tries to be a vendor neutral but they need some mechanism to do a real unbiased report. Maybe if Gartner or any of the reputable firms would run the survey I would be less skeptical.
Thursday, February 26, 2009
Do's and don'ts with babies :: Hilarious pics
Do's and don'ts with babies :: Hilarious pics
Made me cry with laughter. Though I didn't see what's wrong with the last 2 ones..
Made me cry with laughter. Though I didn't see what's wrong with the last 2 ones..
Tuesday, October 21, 2008
Dustin's Software Development Cogitations and Speculations: Standardization: The Dangerous Relationship for Open Source
An interesting post about how standardisation can destroy open source software
eg: xdoclet eg: log4j
Dustin's Software Development Cogitations and Speculations: Standardization: The Dangerous Relationship for Open Source
The main factor of course with open source is the commitment of the developers, supporters, vendors and community of users. Like every fad, they can come and go really quickly....
FUD rulez!
eg: xdoclet eg: log4j
Dustin's Software Development Cogitations and Speculations: Standardization: The Dangerous Relationship for Open Source
The main factor of course with open source is the commitment of the developers, supporters, vendors and community of users. Like every fad, they can come and go really quickly....
FUD rulez!
Sunday, October 19, 2008
Aarne-Thompson classification system - Wikipedia, the free encyclopedia
Good grief. As kids we used to joke about how movies all seemed to follow basic plotlines.
So star wars was standard plot 5 & 17 with subplots 3 with twist 8.
Well... at the turn of last century, Aarne & Thompson developed the Aarne-Thompson classification system for classifying folktales!!
Good grief I say!
After all, the classic stories about clever foxes is "The Clever Fox (Other Animal) 1–69"
or how about Realistic Tales (Novelle) : "The Man Marries the Princess 850–869"
omg. Now for a phD for my classification system for movies and tv plots. .
mmm
nice.
So star wars was standard plot 5 & 17 with subplots 3 with twist 8.
Well... at the turn of last century, Aarne & Thompson developed the Aarne-Thompson classification system for classifying folktales!!
Good grief I say!
After all, the classic stories about clever foxes is "The Clever Fox (Other Animal) 1–69"
or how about Realistic Tales (Novelle) : "The Man Marries the Princess 850–869"
omg. Now for a phD for my classification system for movies and tv plots. .
mmm
nice.
Thursday, October 16, 2008
most popular programming language
Well it seems Java is still #1 for programming languages according to the TIOBE Software: Tiobe Index October 08 edition
The rest are:
What's happened to ABAP (SAP)??
The rest are:
Oct 2008 | Position Oct 2007 | Delta in Position | Programming Language | Ratings Oct 2008 | Delta Oct 2007 | Status |
|---|---|---|---|---|---|---|
| 1 | 1 | ![]() | Java | 20.949% | -0.67% | A |
| 2 | 2 | ![]() | C | 15.565% | +0.97% | A |
| 3 | 4 | | C++ | 10.954% | +1.37% | A |
| 4 | 3 | | (Visual) Basic | 9.811% | -1.35% | A |
| 5 | 5 | ![]() | PHP | 8.612% | -0.89% | A |
| 6 | 8 | ![]() | Python | 4.565% | +1.13% | A |
| 7 | 6 | | Perl | 4.419% | -0.93% | A |
| 8 | 7 | | C# | 3.767% | +0.03% | A |
| 9 | 13 | ![]() ![]() ![]() | Delphi | 3.288% | +1.75% | A |
| 10 | 10 | ![]() | Ruby | 2.860% | +0.47% | A |
| 11 | 9 | ![]() | JavaScript | 2.670% | -0.01% | A |
| 12 | 12 | ![]() | D | 1.333% | -0.26% | A |
| 13 | 11 | ![]() | PL/SQL | 1.024% | -0.94% | A- |
| 14 | 14 | ![]() | SAS | 0.600% | -0.78% | B |
| 15 | 17 | ![]() | Lua | 0.551% | -0.04% | B |
| 16 | 21 | ![]() ![]() ![]() ![]() | Pascal | 0.520% | +0.10% | B |
| 17 | 22 | ![]() ![]() ![]() ![]() | ActionScript | 0.506% | +0.14% | B |
| 18 | 16 | ![]() | COBOL | 0.491% | -0.19% | B |
| 19 | 18 | | Lisp/Scheme | 0.485% | -0.09% | B |
| 20 | 15 | ![]() ![]() ![]() ![]() | ABAP | 0.445% | -0.40% | B |
Subscribe to:
Posts (Atom)

