[OSCON 2008] Google XML Pages (GXP) by Harry Heymann and Laurence Gonsalves
GXP is a templating system that Harry and Laurence developed at Google. It was original created by Laurence in late 2001 (Java run-time, compiler written in Python) as part of the AdWords rewrite. I'm attending this session because I heard from a Google employee that they were using WebWork + their proprietary templating framework for the view. My suspicion is that GXP is that framework. The presentation I'm listening to is available at the following URL:
http://docs.google.com/Present?docid=dcbpz3ck_8gphq8bdt
Google XML Pages has the following features:
- static type checking
- convenient parameter passing/modularization system
- partial markup validation
- automatic escaping of untrusted content
- encourages functional style, discourages side-effects
- internationalization support
- lightweight runtime
GXP is an open source project as of today and is available at http://gxp.googlecode.com. It's used by AdWords, AdSense, Checkout, Blogger, Analytics, Reader and many more.
HelloWorld.gxp:
<gxp:template name='com.google.sample.HelloWorld' xmlns:gxp='http://google.com/2001/gxp'> Hello, World! </gxp:template>
Output:
Hello, World!
GXP has compile-time markup validation as well as static-type checking. GXP has native data types: for text/html, text/plain, text/css and text/javascript. It supports loops, conditionals, abbreviations, internationalization (i.e. <gxp:msg>Hello, World</gxp:msg>) with placeholders. You can call GXP in the same package using <call:GXPName>. To call something outside a package, you can use <gxp:import> to import packages or classes. You can also use a qualified XML namespace to access another package.
Posted by Renat Zubairov on July 26, 2008 at 01:41 PM MDT #
Posted by JB on July 31, 2008 at 01:07 PM MDT #
Posted by josé moreira on August 05, 2008 at 05:03 PM MDT #