What is .NET XmlSerializer?
2007 Jun 01
51 of 165 | W3C EXI Performance Testing Framework - The W3C Efficient XML Interchange (EXI) Performance Testing Framework is now publicly available for download. This is the testing framework used by the EXI WG to evaluate properties of "binary XML" candidates. Specifically, the framework can be used to measure Processing Efficiency and Compactness, and includes support for in-memory and network testing....
2007 Mar 29
52 of 165 | Latest news on Json-lib and xml - Following the recent updates on XML processing in Json-lib, now its possible to work with namespace prefixes and uris. If you feed an XML to the XMLSerializer and that XML has namespace declarations, each declaration will be added with a "@xmlns" prefix to the resulting JSONObject. The namespace handling has one side effect, previously you could read an array definition and the resulting object would be a JSONArray, because arrays do not have properties and the xmlns is a property, the resulting object would be a JSONObject....
2007 Mar 08
53 of 165 | .NET Compact Framework 2.0 SP2 is Available!! - You can download the English version of .NET Compact Framework 2.0 SP2 now
The localized versions should be available soon.
This version provides an update to the Remote Performance Monitor that allows you to now take snapshots of the heap and compare those snapshots over time. If you're not familiar with the Remote Performance Monitor, see Steven Pratschner's (from the .NET CF team) Remote Performance Monitor article.
Here's the published list of bug fixes…
Remote Performance Monitor fails on x64
Setup install/uninstall fails silently when the MSI is launched from Control Panel-Programs and Features on Vista
Finalizers fail on RTF objects because COM bindings are alrea......
2007 Jan 19
54 of 165 | World Wide Web Consortium Selects AgileDelta's Efficient XML as Basis for Global Web Standard Format -
Efficient XML was selected based on a comprehensive, independent review of binary XML formats by the W3C EXI Working Group.
...
2007 Jan 03
55 of 165 | Tim Bray on JSON and XML - Tim has an interesting post comparing JSON and XML that has me wondering about several things.
Here are some specific questions I have with the piece:
1. I don't see any reason why JSON has different streaming characteristics than XML. Every JSON parser I've written has a streaming I/O layer at the bottom and defers buffering (and type mapping) to a layer above, just like most modern XML stacks. Why is XML inherently more streamable?
2. Like Joe Gregorio states in the comments on Tim's post, I also prefer JSON's simplification of only allowing UTF-*-based encoding.
3. Tim states that you should use XML when the order of data matters, but JSON has a perfectly reason......
2006 Nov 20
56 of 165 | People are reflecting on XML after 10 years - Although XML wasn't officially released as a W3C Recommendation until February 1998, the effort that led to it began about 10 years ago. One recent anniversary is the first public working draft released on November 14, 1996. Another is its first public presentation at the SGML 1996 conference; the XML 2006 conference is being held and the same location and will include a retrospective by Jon Bosak, chair of the original XML WG. The IBM Systems Journal even has as special issue Celebrating 10 Years of XML. Yet as the Slashdot thread that dissects it makes clear, not everyone is celebrating. (The most memorable bit is Ti......
2006 Oct 02
57 of 165 | Collection properties need a setter implementation when using DataContractSerializer - I was having a problem with serializing a FaultException that had a custom details class that was a collection. Today I figured out that, when using the DataContractSerializer, you need to make sure you provide a setter implementation even for your collection based properties. Once again, this is a departure from the way that the XmlSerializer works. I'm trying to work through the scenarios where this is any kind of improvement over XmlSerializer, but I cannot think of any problem this solves.
Welp, I hope this saves someone else some headscratching. I truly hope Microsoft lifts the restriction of only being able to serialize fault details with the DataContractSerializer... I'm just not a ......
2006 Sep 28
58 of 165 | Collection property serialization with DataContractSerializer takes us a step backwards? - Since I have to define my fault details with DataContractSerializer attributes for now (I hope it's only for now anyway), I was looking at how to translate a property that was previously serialized by the XmlSerializer using XmlArrayAttribute and XmlArrayItemAttribute. Well, I figured out pretty quick there was no equivalent, found CollectionDataContractAttribute, but thought "noooo, this can't be the only way... can it?". Unfortunately a quick search revealed this post by Christian Weyer that confirmed my fears. Why oh why do I have to go writing a whole new collection class now just to decorate it with attributes when I could decorate the member itself?
Argh... there's nothing more frus......
2006 Sep 26
59 of 165 | Lightweight Invisible CAPTCHA Validator Control - Not too long ago I wrote about using heuristics to fight comment spam. A little later I pointed to the NoBot control as an independent implementation of the ideas I mentioned using Atlas. I think that control is a great start, but it does suffer from a few minor issues that prevent me from using it immediately. It requires Atlas and Atlas is pretty heavyweight. Atlas is pre-release right now. We’re waiting on a bug fix in Atlas to be implemented. It is not accessible as it doesn’t work if javascript is enabled. Let me elaborate on the first point. In order to get the NoBot control working, a developer needs to add a reference to two separate assemblies, Atlas and the Atlas Control To......
2006 Sep 20
60 of 165 | A deep XmlSerializer, supporting complex classes, enumerations, structs, collections, and arrays - A deep XmlSerializer, supporting complex classes, enumerations, structs, collections, and arrays....
2006 Aug 14
61 of 165 | UTF-8 Email in PHP with eZ Components - One of the subjects I brushed over last week was how you handle UTF-8 in email, because I don’t have a full picture on the best way to solve this. The fundamental problem is summarized nicely on Wikipedia’s discussion of MIME;
The basic Internet e-mail transmission protocol, SMTP, supports only 7-bit ASCII characters […]. This effectively limits Internet e-mail to messages which, when transmitted, include only the characters sufficient for writing a small number of languages, primarily English. Other languages based on the Latin alphabet typically include diacritics not supported in 7-bit ASCII, meaning text in these languages cannot be correctly represented in basic e-mail.
Part of th......
2006 Jul 21
62 of 165 | Processing Binary Documents Through BizTalk Via Web Services -
Just finishing up a two-week BizTalk Proof of Concept where I demonstrated an easier way to manage B2B interactions between a large
insurance company and their vendors. This post is focused on one part of the solution that accepts binary messages via web services,
and uses BizTalk to extract the message and send to SharePoint.
Instead of using DIME or MTOM, this company exposes a web service where the vendor puts a binary blob into a web service message
element. So how did I match this requirement? First, I started with the XML schema for the service interface. Instead of holding a
binary node, my DocumentContent node holds a string (base64).
The most important step......
2006 Jul 20
63 of 165 | Juggernaut: Comet for Rails? - Alex MacCaw has released a plugin for Ruby on Rails that “aims to revolutionize your Rails app by letting the server initiate a connection and push data to the client. In other words your app can have a real time connection to the server with the advantage of instant updates.”
The plugin Juggernaut initiates a flash xmlsocket between server and browser allowing real time communication between the two. The open socket connection allows the server to ‘push’ base64 encoded javascript to the browser which is subsequently decoded and evaluated.
I see this as Comet for Rails, as it is about the interaction model not technology (e.g. if Flash or not). Alex may disagree :)
Frequently Asked Ques......
2006 Jul 08
64 of 165 | Generic Dictionaries vs. the XmlSerializer - One of the neatest new features of .NET 2.0 is the concept of Generics. And one of the most common uses of this feature is in the new GenericCollections. Anyone who spent quality time extending CollectionBase and DictionaryBase in 1.1 (or just cheating using CodeSmith’s collection gen) will understand how useful these collections are.
Another of the very handy features of .NET is the built-in, nearly automagic XmlSerialization. Presuming one follows a few simple rules—principally having a blank, default constructor and making sure all properties implement Get and Set accessors—one can instantaneously serialze any object to Xml. This tactic, unfortunately, falls apart when one atte......
2006 Jun 26
65 of 165 | Getting Your Message Across in Binary -
What ever happened to ?Binary XML?? Is the Fast Web Services initiative going to bring solace?
...
66 of 165 | Getting Your Message Across in Binary -
What ever happened to ?Binary XML?? Is the Fast Web Services initiative going to bring solace?
...
2006 Jun 18
67 of 165 | Serialize and Deserialize IEnumerable Objects - CustomXmlSerializer is an alternative to XmlSerializer supporting ArrayLists, Collections, and Dictionaries....
2006 Jun 08
68 of 165 | Team Foundation Server: Subscribing to Policy Overriden Events on Checkin - I demonstrated over a year ago the code required to subscribe to the Policy Override event when developers checkin code, as you know you can apply Checkin policies to ensure developers do things like linking to Work Items, provide Checkin comments, etc. These can of course be "skipped" by Overriding the policy which is valid for scenarios like say 0200 when you need to get the code checked in for a change.
When I first demonstrated it, and plenty of people have demonstrated since, it involved in writing bits of code (not a lot but code nonetheless), things obviously improved as the product developed and here's the much cleaner way of achieving this.
You can simply use bissubscribe.e......
2006 Jun 07
69 of 165 | Reason #56: Why Hanselman rocks - Tonight I did a bit of referrer surfing, which could be deemed ego surfing. I started looking through my referrer logs to see who is linking to what. I stumbled across something I hadn't before... blogsearch.google.com.
It's no Technorati. They don't seem to offer a "search blogs that link to this URL" feature explicitly, but that functionality seems to come with simply searching a URL. There's no upsell to try to get you to click on a Google ad link, but there is plenty of relevance for the link list protrayed in the browser.
Good on ya Google for building it, shame on you for making if semi-obscure.
Anyway, that's how I came across several hits to ......
2006 May 15
70 of 165 | Why PowerPoint 2007 Rocks - I blogged awhile back on how impressed I am with PowerPoint in Office 2007. Since my first impression, it has only gotten better. I created a quick list of items:
Team Foundation Server
Work Item Tracking
Reporting
Collaboration
Source Code Management
ASP.NET
HttpHandler
HttpModule
ASMX
XmlSerializer
ASMX Lifecycle
I started tinkering with the ability to use Layouts in PowerPoint 2007 and the QuickStyles capability to quickly create some pretty impressive PowerPoint slides with an amazing quickness. Here are some quick images… I created all 3 of these in less than 30 seconds.
Funny that I gave up PowerPoint for my presentations in favor of my favorite text editor… ......
2006 May 09
71 of 165 | Using the XmlSerializer Attributes - How to serialize and de-serialize .Net objects and XML using the XmlSerializer and the serializer attributes....
2006 May 05
72 of 165 | Test Run: Emitting XML - This month James McCaffrey demonstrates how to emit test result data to an XML file using five different techniques: XmlTextWriter, XmlDocument, XPathDocument, DataSet, and XmlSerializer, and discusses when to use each....
2006 May 01
73 of 165 | MTOM Performance in JAX-WS - Since XML is a textual format, binary blobs must be represented as characters when embedded in an XML document. A popular encoding that permits this embedding is known as base64 encoding, and it corresponds to the XML Schema data type xsd:base64Binary. In a Web services toolkit that supports a binding framework, as it is the case in JAX-WS, a value of this type must be encoded before transmission and decoded before binding. The encoding and decoding process is expensive and linear to the size of the binary object. Moreover, the number of characters in the base64 encoding can be as much as one third greater than the number of bytes in the original binary blob.
The SOAP Message Transmission ......
2006 Apr 18
74 of 165 | Craig remains jumpy about XmlSerializer and element order... - Craig posted a rebuttal to my earlier post. I maintain that his original advice to implement IXmlSerializable is overkill. His argument is that you're in trouble unless you “explicitly control the order of serialization of [your] web service visible types“. I agree, except that I substitute “implicit“ for “explicit“. In either .NET 1.x or 2.0, you exercise implicit control by controlling the order of the properties or fields in your type. In .NET 2.0, you can also “explicitly“ control this using the XmlElementAttribute.Order property, which is clearly a good idea. So the only thing we disagree on is whether the implicit control available in .N......
2006 Apr 14
75 of 165 | Craig urges overkill, XmlSerializer sky is not falling - It's almost always Craig who coaxes me back into posting after a long absence. This time, it was this post about the perils of contract first and XmlSerializer. He was talking about the possibility of building types that serializer incorrectly and violate your contract definition. He concludes (among other things) that in .NET 1.x you should implement IXmlSerializable on every return type that you build when you start from a WSDL. That's a tall order, because when you implement IXmlSerializable, you have to build not just the emitter (which solves the problem he ran into) but also the parser. This is extreme overkill.
Craig got caught in a very particular set of circumstances. First, ......
76 of 165 | Solving the XSD versioning problem - The single biggest problem in the WS space today is data and service versioning. I've been thinking about this problem for years now, and I finally came to an answer that is simple, straight-forward and plays by all the rules. The inspiration came from Henry Thompson's presentation at the XSD workshop that happend last year. I also reread some pieces of the XSD spec, where he dropped some hints about this model. My current, and I hope final, solution to this problem grew from there.
Most OO folks assume that an XML instance is associated with a single XSD. Most XML people do not. Rather an XML instance may be valid according to a whole range of XSDs. In the case of versioning, those XSDs a......
2006 Apr 06
77 of 165 | High-Performance Web Services: Avoid XmlNode, Use IXmlSerializable - While talking with a friend about web services design and "commonplace" guidance, the discussion turned ugly. I was somewhat amazed to hear his perception that Microsoft commonly recommends returning XmlNode from all web services.
I let him argue it out, looking for where in the world he derived this "commonplace" notion of untyped web services being the norm. He cited Matt Powell's post about not returning strings from web services, favoring XmlNode instances, and Kzu's solution for avoiding the DOM in web services. There was also a mention of Dare's guidance for representing XML in the .NET Framework, and Don Box's MSDN TV episode where he warned against passing ......
2006 Apr 03
78 of 165 | Base16, Base32, and Base64 Data Encodings going to Last Call as a Proposed Standard -
Base16, Base32, and Base64
Data Encodings is going to
Last Call as a Proposed Standard.
Oh no.
I'm not a 64 bigot, and it's not that Base16 and Base32 are bad, it's just that they're new
and I'm afraid of the inevitable, which is, I'll predict right now, that shortly after
this becomes a Proposed Standard someone will complain that Atom is horribly broken
because it only accepts Base64. Mark my words.
...
2006 Mar 11
79 of 165 | Web App Design: Avoid Writing to Disk, Part 2 - Dasher left an interesting comment to my previous post on avoiding writing to disk:
Don't you hit the reverse problem with needing to save the image to a file for displaying in a webpage?
Nope, you can do the reverse just as easily. The trick is figuring out how to get the stream from the database and applying it to the ASP.NET Image control.
A simple solution is to create an HttpHandler that will serve as a dynamic image generator. To do this, create a Generic Handler (.ashx) and add the following code: <%@ WebHandler Language="C#" Class="ImageHandler" %>
using System;
using System.Web;
using System.Drawing.Imaging;
using System.Data.SqlClient;
using S......
2006 Mar 08
80 of 165 | XmlSerializerFactory Is Pretty Cool - The XmlSerializerFactory is a new class in .NET 2.0 that provides a factory pattern over the XmlSerializer. It maintains the cache of generated assemblies so that you can avoid the XmlSerializer leaks. Usage doesn't impact your code much at all.
Here is a quick demo that I threw together. I pulled up my blog's RSS feed and saved it into my Visual Studio project as "XmlFile1.xml". I then created a schema from it (in Visual Studio, use the "XML/Create Schema" menu item). Using the schema, I created a serializable class from that schema. This is simple using the command line tools:
xsd.exe /classes xmlfile1.xsd xmlfile11.xsd xmlfile12.xsd xmlfile13.xs......
2006 Feb 19
81 of 165 | Beatbox - I've been tinkering with Python for a while, but have wanted to try my hand at something more complex that hello world with it, I ended up building Beatbox, a simple to use, minimal dependency library for accessing the Salesforce.com API. (Given the pace of the branding train at Salesforce, I've decided to stop trying to put force or sforce in any of my sforce API tools).
Rather than some thick data binding layer, most of the stuff you pass into the library is dictionaries, and most of the data you get back is in the form of a xmltramp representation of the relevant result part of the soap response (xmltramp rocks BTW) It includes all the usual sforce perf recommendations, HTTP/1.1 persiste......
2006 Feb 02
82 of 165 | Simple string/byte[] encryption and decryption using AES in C# - Paste these methods in your Utils class or other and use them as is to encrypt and decrypt your
strings or byte[]s. The session key is derived from the password you supply. This works on any machine with .Net 1.1+ so you can encrypt on one machine and decrypt on another as needed. Only the same password must be used to decrypt:
/// <summary> /// Use AES to encrypt data string. The output string is the encrypted bytes as a base64 string. /// The same password must be used to decrypt the string. /// </summary> /// <param name="data">Clear string to encrypt.</param> /// <param name="password">Pass......
2006 Feb 01
83 of 165 | A little XmlSerializer Quiz. -
DateTime issued;
[XmlIgnore]
public DateTime
IssuedUtc
{ get { return issued;
} set { issued = value;
} }
[XmlElement("issued")]
public DateTime IssuedLocalTime
{ get { return Issued.ToLocalTime();
} set { Issued = value.ToUniversalTime();
} }
Why?
(c)2002-2005 Clemens Vasters.
You want to build service oriented applications on the Microsoft .NET Framework
and are not quite sure how?
newtelligence
AG Workshops get you going with concrete, pragmatic guidance on today's shipping
technology stack, keeping tom......
84 of 165 | XmlSerializer & UTC once more -
While I wasn't looking, Doug
Purdy, who is the PM for the team in charge of the XmlSerializer
has posted this little cryptic answer to my initial question:
String serializedDateTime = XmlConvert.ToString(
someDateTime );
DateTime deserializedDateTime =
XmlConvert.ToDateTime( serializedDateTime );
What Doug is showing is really what the serializer is doing with dates under the hood
and that I am incorrectly blaming the
XmlSerializer for the lack of UTC support. [XmlConvert.ToString() also does nothing
more than calling DateTime.ToString() with the appropriate format string]. As I was
already saying in......
85 of 165 | XmlSerializer and TimeSpan -
Just had to figure this out and
thought I’d share. With the XmlSerializer (.NET v1.1), one would think that
TimeSpan maps to the XML Schema type duration,
but it doesn’t – for whatever reason. Anyways … here’s a trick
to make it work. Interestingly enough, the XmlConvert class understands TimeSpan.
However it does not work correctly with fractional seconds and ignores them. That’s
enough for my purposes in the given app and therefore I am ignoring that issue in
the snippet below and treat all times of less than one second as equivalent to zero.
If it isn’t enough for you, you......
86 of 165 | XmlSerializer Quiz: The solution -
I posted a little question here,
just asking "Why?". For your reading convenience, I pull the code in here once more:
DateTime issued;
[XmlIgnore]
public DateTime
IssuedUtc
{ get { return issued;
} set { issued = value;
} }
[XmlElement("issued")]
public DateTime IssuedLocalTime
{ get { return Issued.ToLocalTime();
} set { Issued = value.ToUniversalTime();
} }
So, indeed, why am I doing this? Well, when I decided to normalize all times
handled by the backend engine of dasBlog into the UTC timezone, I really didn't
think of the XML Serializer being a problem at first. It turned out......
2006 Jan 26
87 of 165 | Simple string/byte[] encryption and decryption using AES in C# - Paste these methods in your Utils class or other and use them as is to encrypt and decrypt your
strings or byte[]s. The session key is derived from the password you supply. This works on any machine with .Net 1.1+ so you can encrypt on one machine and decrypt on another as needed. Only the same password must be used to decrypt:
/// <summary> /// Use AES to encrypt data string. The output string is the encrypted bytes as a base64 string. /// The same password must be used to decrypt the string. /// </summary> /// <param name="data">Clear string to encrypt.</param> /// <param name="password">Pass......
2006 Jan 13
88 of 165 | 23 Nov 2005 - Binary XML Politics has been interesting of late. I ran sessions at a number of conferences on three different continents, and found that people attending were in favour of W3C defining a more efficient transfer mechanism for XML, but vigorously opposed to "binary XML".
The reasons for opposition varied widely. Very few were stated clearly or coherently, so it's difficult to agree or disagree with them. As best I understand it, people are concerned about W3C introducing a second representation of XML documents into a world that already has dozens of widespread representations and probably thousands all told.
For instance, as far as an XML processor that doesn't understand EBCDIC knows,......
89 of 165 | A little XmlSerializer Quiz. -
DateTime issued;
[XmlIgnore]
public DateTime
IssuedUtc
{ get { return issued;
} set { issued = value;
} }
[XmlElement("issued")]
public DateTime IssuedLocalTime
{ get { return Issued.ToLocalTime();
} set { Issued = value.ToUniversalTime();
} }
Why?
(c)2002-2005 Clemens Vasters.
You want to build service oriented applications on the Microsoft .NET Framework
and are not quite sure how?
newtelligence
AG Workshops get you going with concrete, pragmatic guidance on today's shipping
technology stack, keeping tom......
90 of 165 | Base 64 Format Conversion - Recently, I was working with an InfoPath solutions prototype. The idea behind the solution was that a user would be taking a digital photo (JPEG). As they downloaded the pictures to their local machines, they would be able to include these camera shots into an InfoPath form that contained additional descriptive fields. By default, InfoPath takes these types of binaries and converts them into a Base 64 format. Once converted this data is then saved to an XML file. One requirement of the solution was to convert this data back to its original JPEG format once it was saved to the server, so that it could be displayed or saved. For an example application, I created a simple data source based o......
91 of 165 | XmlSerializer & UTC once more -
While I wasn't looking, Doug
Purdy, who is the PM for the team in charge of the XmlSerializer
has posted this little cryptic answer to my initial question:
String serializedDateTime = XmlConvert.ToString(
someDateTime );
DateTime deserializedDateTime =
XmlConvert.ToDateTime( serializedDateTime );
What Doug is showing is really what the serializer is doing with dates under the hood
and that I am incorrectly blaming the
XmlSerializer for the lack of UTC support. [XmlConvert.ToString() also does nothing
more than calling DateTime.ToString() with the appropriate format string]. As I was
already saying in......
92 of 165 | XmlSerializer Quiz: The solution -
I posted a little question here,
just asking "Why?". For your reading convenience, I pull the code in here once more:
DateTime issued;
[XmlIgnore]
public DateTime
IssuedUtc
{ get { return issued;
} set { issued = value;
} }
[XmlElement("issued")]
public DateTime IssuedLocalTime
{ get { return Issued.ToLocalTime();
} set { Issued = value.ToUniversalTime();
} }
So, indeed, why am I doing this? Well, when I decided to normalize all times
handled by the backend engine of dasBlog into the UTC timezone, I really didn't
think of the XML Serializer being a problem at first. It turned out......
2006 Jan 06
93 of 165 | Prettification of XML Serialization within Web Services - Prettification of XML Serialization within Web Services
This came up yesterday on an internal mailing list.
A colleague remarked that, following best practices in modular schema design results in bloat of serialized messages, particularly with namespace attributes. This issue manifests itself when using .NET Web Services, either client or server, either .NET 1.x or 2.0.
Was this person right Yes and No. This bloat can happen, but it can be avoided pretty simply in .NET if you know the knob to twist. Before I show you the knob I want to explain the problem a bit more.
The Schema and the Code
Consider the case where there is a common schema that is used across enterprise. As a simple exa......
2005 Dec 16
94 of 165 | How to: Specify an Alternate Element Name for an XML Stream - Using the XmlSerializer, you can generate more than one XML stream with the same set of classes. You might want to do this because two different XML Web services require the same basic information, with only slight differences. For example, imagine two XML Web services that process orders for books, and thus both require ISBN numbers. One service uses the tag while the second uses the tag . You have a class named Book that contains a field named ISBN. When an instance of the Book class is serialized, it will, by default, use the member name (ISBN) as the tag element name. For the first XML Web service, this is as expected. But to send the XML stream to the second XML Web service, you must ......
2005 Dec 12
95 of 165 | Processing XML in .NET: Antipatterns -
I run into this article "Harnessing the BackPack API" by Michael K. Campbell in the new and very cool "XML 4 Fun" column at MSDN. The article is otherwise brilliant and really fun, but XML processing code samples are not so good. It`s actually a great collection of XML processing antipatterns. Let`s see.
Here is a code snippet:
private void SinglePageReturned(string pageData)
{
// TODO: add try/catch etc
byte[] data = Encoding.UTF8.GetBytes(pageData);
MemoryStream stream = new MemoryStream(data);
XPathDocument input = new XPathDocument(stream);
XslCompiledTransform xsl = new XslCompiledTransform();
XmlNode stylesheet = this.LoadTransformDocument()......
2005 Dec 10
96 of 165 | You Can`t Click A Bus! - Push Button ParadiseBut thats not the point now is it.What I`d like to know is: does it give common questions a well-known, RESTy URL Or are the URL`s full of extra stuff, not really useful from a REST standpoint, merely adding overhead to folks that proverbially want to put the URL on the side of a busThis is a fantastic argument that Micah has brought to the surface. When we spend so much proselytizing the importance of XML being human readable -- using this argument as one of the many reasons why binary XML is a bad idea -- why then do some of us still force upon our site visitors URI`s that make absolutely no logical sense to anybody BUT the developers who wrote the server-side process......
97 of 165 | You Can`t Click A Bus! - Push Button ParadiseBut thats not the point now is it.What I`d like to know is: does it give common questions a well-known, RESTy URL Or are the URL`s full of extra stuff, not really useful from a REST standpoint, merely adding overhead to folks that proverbially want to put the URL on the side of a busThis is a fantastic argument that Micah has brought to the surface. When we spend so much proselytizing the importance of XML being human readable -- using this argument as one of the many reasons why binary XML is a bad idea -- why then do some of us still force upon our site visitors URI`s that make absolutely no logical sense to anybody BUT the developers who wrote the server-side process......
2005 Dec 04
98 of 165 | The One About Attributes - I love using .NET attributes.
When I am teaching a class on web services, I start by showing what an attribute is, how you can create custom attributes, and how to use GetCustomAttributes to detect your attribute. I then cruft up a sample CsvSerializer that serializes a class to a CSV file based on the metadata attributes. This helps show what the XmlSerializer is accomplishing behind the scenes, and selfishly gives me an opportunity to code using a part of the framework that I find fascinating.
I have been digging into ASMX lately a little more than I had previously, part of which requires that I spend more time looking at the System.Xml.Serialization attributes that affect XML seria......
2005 Nov 22
99 of 165 | W3C Launches EXI Working Group to Validate Binary XML - W3C announces working group to oversee integration between Binary XML and other XML implementations....
2005 Nov 17
100 of 165 | Issues when working with Ajax - Mercury Tide has written a mini-paper on Issues when working with Ajax.They cover basic items to do with working with XMLHttpRequest, focusing on cross-browser issues.Getting the XMLHttpRequest ObjectThey start with how to get the object itself:function getNewXMLHttpRequest() { var obj; try { // For Internet Explorer. obj = new ActiveXObject(`Microsoft.XMLHTTP`); } catch(e) { try { // Gecko-based browsers, Safari, and Opera. obj = new XMLHttpRequest(); } catch (e) { // Browser supports Javascript but not XMLHttpRequest. obj = false; } } return obj;}I actually prefer the clean way that Prototype does this:var Ajax = { ......