views:

55

answers:

1

I'm having a hard time resolving a naming convention conflict I'm having with implementing part of the W3C HTML5 specification using .Net.

The issue is that I like to conform to standard .Net naming conventions, which use UpperCamelCasing, but the W3C specifications indicate that the naming conventions should use lowerCamelCasing.

Should I deviate from the specification in order to write code that is friendly and familiar to the .Net community, or should I use the W3C-recommended conventions in order to stick to the specification as closely as possible, even though this will make my Code.notVeryPretty()?

EDIT

Example:

The W3C defines an interface IDOMImplementation with a member hasFeature(). If I were writing .Net code without a W3C specification guiding the implementation, these would be named IDomImplementation and HasFeature(), but the W3C defines naming conventions as specified above.

EDIT

To ask this question a completely different way, is there any downside to deviating from the W3C-recommended casing conventions when implementating their specification using .Net?

+5  A: 

Use UpperCamelCasing for .NET code and lowerCamelCasing for your HTML/CSS/Javascript/other W3C stuff.

In what situation would you code .NET code using W3C recommended naming conventions?

Edit:

Now that you have clarified exactly what you mean, I would say that since your code is to be consumed within .NET, you should stick with .NET conventions, even when implementing an interface defined by W3C.

Oded
In other words, stick to the pure W3C spec where it is defined and use normal .Net naming conventions elsewhere? See my edit above for an example of what I was talking about.
Nathan Ridley
Yeah. Make JavaScript look like it should and C# look like it should. They do indeed have different conventions, and it makes it easier for those used to both to follow the code.
Oded
JavaScript is a different matter and would probably be wrapped anyway to ensure that only appropriate functionality is exposed to the scripting engine.
Nathan Ridley