Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Jonathan Allen on Jun 18, 2007 06:23 AM
A common problem with programming languages, including those of .NET, is the lack of decent time zone support. In order to properly support them, programs have to either carry around the time zone as a separate field or carefully convert them to and from a canonical value. Too often developers pretend that time zones do not exist at all rather than go through this level of effort.
Microsoft seeks to change this for .NET programmers by introducing two new classes. The first class is TimeZoneInfo. This provides deeper support for time zone information than the older TimeZone class, including the ability to enumerate time zone information stored at the OS level.
The second class being added is the one that will really change things. Called DateTimeOffset, this class replaces DateTime under most circumstances. Unlike DateTime, which can only refer to the local and UTC time zones, DateTimeOffset can be tagged with any time zone as an offset from UTC.
According to Anthony Moore, DateTimeOffset should be considered the default for most circumstances involving time. The exceptions are…
Use DateTime for any cases where the absolute point in time does not apply: e.g. store opening times that apply across time zones.
Use DateTime for interop scenarios where the information is a Date and Time without information about the time zone, e.g. OLE Automation, databases, existing .NET APIs that use DateTime, etc.
Use DateTime with a 00:00:00 time component to represent whole dates, e.g. Date of birth.
Use TimeSpan to represent times of day without a date.
According to Justin Van Patten, the Base Class Library (BCL) will be moving towards DateTimeOffset in the future, though not everyone is happy with this decision. Some are calling for an IDateTime interface to replace all DateTime signatures, while others want a DateTime class that only stores UTC time.
It remains to be seen how these classes will play into the rest of the framework, especially with the technologies like ADO.NET and LINQ.
If only M$ could learn from postgreSQL how to handle dates (e.g. in SQLServer) properly it would be a cause for celebration. E.M.
Anthony Moore has posted a follow-up with the history of DateTime and more information on how and why the new classes were developed. http://blogs.msdn.com/bclteam/archive/2007/06/18/a-brief-history-of-datetime-anthony-moore.aspx
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
2 comments
Watch Thread Reply