Thursday, April 22, 2010

A Few New Things In .Net 4 & C# 4

Tuple

http://msdn.microsoft.com/en-us/library/dd414846.aspx

http://msdn.microsoft.com/en-us/library/system.tuple.aspx

Basically a better option than using object[] in some scenarios (Tuple elements are typed).

Useful For

· Creating arbitrarily sized sets of individually typed elements (can be longer than 8, just tricky).

· Creating functions with multiple return values.

· Create simple structs/classes on the fly.

· Pass multiple parameters in a single one (e.g. Thread.Start(Object)).

MEF

http://msdn.microsoft.com/en-us/library/dd235164(v=VS.100).aspx

http://mef.codeplex.com/

Used to make plug-ins.

(Also note the similar preexisting alternative, MAF, in the System.Addin namespace).

DynamicObject

http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject(v=VS.100).aspx

This is the guy responsible for all of the dynamic keyword magic. You can subclass this to create your own dynamic objects (e.g. all properties on your object can dynamically be mapped to xml elements).

ExpandoObject

http://msdn.microsoft.com/en-us/library/system.dynamic.expandoobject(v=VS.100).aspx

This is the guy that you can add members to dynamically.

Named & Optional Parameters

http://www.dotnetcube.com/post/Overview-of-NET-40-features-e28093-C-40-Named-and-Optional-Parameters.aspx

Yay, C# has optional parameters now!

Parallelism

http://www.danielmoth.com/Blog/parallelising-loops-in-net-4.aspx

Getting fancy with threading syntax.

Task

http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx

http://www.danielmoth.com/Blog/New-And-Improved-CLR-4-Thread-Pool-Engine.aspx

http://www.danielmoth.com/Blog/Introducing-The-New-Task-Type.aspx

Super threading (thread pool enhancements).

Exception Handling Changes

http://geekswithblogs.net/sdorman/archive/2008/11/07/clr-4.0-corrupting-state-exceptions.aspx

Boring… but probably very important to know.

Tuesday, April 13, 2010

.net All-In-One Code Framework

Delineates the framework and skeleton of Microsoft development techniques through typical sample codes in three popular programming languages (Visual C#, VB.NET, Visual C++).

Basically a collection of samples for many of the APIs within the .Net Framework.



OpenRasta

OpenRasta is a resource-oriented framework for .NET enabling easy ReST-ful development of web sites and services.

Provides a Resources-Handlers-Codecs model similar to Model-View-Controller for serving up resources via URIs.

Project Home

cURL

"curl is a command line tool for transferring data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3 and RTSP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks"

Common Uses - www screen scraping & programatic form submissions; creating high level APIs for websites without having low level access.



Introduction

Hello! I am Troy Ingram. This is a place where I will keep a collection of 'extras'. That is, miscellaneous information that I come across on the web that I would like to log for later use. I hope that these resources will be helpful and interesting for you as well.

This is a companion blog to Coding Box.