The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Woof. XmlSerializer written in JavaScript - for the Chubby Client

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Hanselman

Posts: 1031
Nickname: glucopilot
Registered: Aug, 2003

Scott Hanselman is the Chief Architect at Corillian Corporation and the Microsoft RD for Oregon.
Woof. XmlSerializer written in JavaScript - for the Chubby Client Posted: Aug 26, 2004 5:06 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Scott Hanselman.
Original Post: Woof. XmlSerializer written in JavaScript - for the Chubby Client
Feed Title: Scott Hanselman's ComputerZen.com
Feed URL: http://radio-weblogs.com/0106747/rss.xml
Feed Description: Scott Hanselman's ComputerZen.com is a .NET/WebServices/XML Weblog. I offer details of obscurities (internals of ASP.NET, WebServices, XML, etc) and best practices from real world scenarios.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Scott Hanselman
Latest Posts From Scott Hanselman's ComputerZen.com

Advertisement

I'll need at least a day to digest this.  Anders has written an XmlSerializer in JavaScript using the Javascript equivalent of Declarative Attributes called annotations.  He's used the Java syntax for attributes, as he says "JavaScript has a closer relation to the Java language than .NET."

(Which isn't really true, as Netscape's LiveScript begat JavaScript begat ECMAScript.  Java is in the name only for sex appeal.)

He's built a Javascript Reflection subsystem that parses the comments and gives a reflection-style API and feel.  The XmlSerializer is built on top of that Reflection system.  To implement "properties" you create get accessors for your fields. 

Example:

 Calculator.square=function(num) {
/**
 
*@Version(“1.0.0”)
 
*@Modifiers(modifiers=Modifier.static|Modifier.public
 
*@Returns(type=”number”,description=”The square of the given number”)
*/
 return num*num;
}

Kudos to you Anders!

Read: Woof. XmlSerializer written in JavaScript - for the Chubby Client

Topic: We're (LankaCom) Online Previous Topic   Next Topic Topic: Stopping email identity spoofing

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use