20080723 Wednesday July 23, 2008

[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 in Open Source at Jul 23 2008, 03:23:44 PM MDT 3 Comments

Comments:

Hm... seems to be yet another open source framework from Google that isn't used by anyone outside of Google :) I was just wondering wherever it will be presented on OSCON in case it wouldn't be made by Google but just by some other guys.

Posted by Renat Zubairov on July 26, 2008 at 07:41 AM MDT #

It's not used by anyone outside of Google because it's just being released by Google now....that was a silly statement.

Posted by JB on July 31, 2008 at 07:07 AM MDT #

well if it works for them why does it matter if anyone else uses it? it doesn't make it necessarily a bad framework.

Posted by josé moreira on August 05, 2008 at 11:03 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a UI Architect specializing in open source web frameworks. Contact me for rates.
« July 2009
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today

Recent Entries

Tag Cloud