Podcasts - These days there are so many useful sources of information for software developers: websites, user groups, message boards, second life events, conferences, not to mention good old print mediums such as magazines and books. In the last few years another interesting means of content delivery has come into play with the proliferation of portable mp3 players... podcasts. I'd like to share a few that I've found useful not only for keeping me up to date on the latest and greatest software development news but to pass the time during my 60 miles of driving every day. Keep in mind to play these you only need podcatching software, not necessarily an iPod or other portable mp3 player. .Net Rocks! - This is a great podcast hosted by Richard Campbell and Carl Franklin...
ironruby - for the last year i've somehow been avoiding doing any ruby work. been writing plenty of python for prototyping as and duct tape for work as well as hobby, but nothing in the way of ruby. one of the reasons i've had the opportunity to write some python is because of ironpython. no matter how much diversity i would like in my professional development the truth is i work in a microsoft shop. it's just that simple. because ironpython lives in the .net runtime i only have to be slightly creative to get some professional use out of it. with the advent of .net 3.5 microsoft (thanks in part to john lam) has introduced ironruby. much like ironpython the idea is simple. marry the .net runtime with the ruby programming language...
POCO Entities in ADO.NET 4.0 - One of the most anticipated features of the Entity Framework 4.0 is the ability to have POCO (Plain Old CLR Object) entities. This allows developers to produce domain objects free of any persistence baggage, with no requirements imposed inheritance-wise. Up till now entity objects were required to either inherit EntityObject or had to implement IEntityWithKey, IEntityWithChangeTracker and IEntityWithRelationships. This makes it far easier to use EF with legacy domain classes and keeps data models clean and unconcerned with their own persistence. To demonstrate this feature I'll start out with a basic SQL Server table structure and test data that maps employees to departments. Database create table Departments ( Department_ID int identity primary key clustered, Name varchar(255) not null ) create table Employees ( Employee_ID int identity primary key clustered, FirstName varchar(255)...
Exchange webdav automation - Recently a situation arose where it would be very handy for me to write some code to automate some tasks dealing with exchange server that I'd have gone to CDO for in the past. I was basically trying to pull attachments out of unread mails with specific subjects and mark the owning mail as read. My first move was strait to CDO... Low and behold microsoft REALLY does not want you using CDO from within .net (generally not supported except for circumstances incompatible with my needs) and accessing exchange via ADO is supported only on the exchange server itself and this was prohibited by circumstances beyond my control. Since I wasn't prepared to use CDOX in an unsupported fashion the only real option I had available was to issue commands to...
Linq to Object Performance - Linq (specifically Linq to object) really has improved the "feel" and readability of .Net code by turning what we used to do with flow control, like loops and conditionals, into a query expression. Few people love tight code during development more than I, but I also have to support applications as they age. As the user base and application data grows performance almost always becomes a concern. In that vein I figured I'd whip up a simple test over a sizable amount of data and compare the execution times of a Linq and a traditional approach to filtering a list. First I needed something to build a list of: public class Movie { public string Title { get; set; } public TimeSpan RunTime { get; set; } } Then I filled...
Using Entity Framework with Oracle - I've long thought that the Entity Framework hasn't gotten a fair shake. Sure, there's some room for improvement but for an out-of-the-box ORM that ships with the framework it's not too bad. One thing has always troubled me, though. I was never sure what kind of traction it had with data sources other than SQL Server. Recently in a project circumstances conspired in such a fashion that it would be pretty darn handy to use EF to access data in Oracle. Turns out it that despite being a little rough around the edges it's very feasible. The Provider The first step is to download and install an Entity Framework provider for Oracle. There are several options out there but the Oracle Data Provider for Entity Framework on CodePlex seems to be...
Now in IronRuby on Rails - Just a quick note. I've again changed the architecture of this site. It's now in IronRuby on rails, running on Windows Server 2008 with SQL 2008 R2/Solr. Previously I was using django on linux with Oracle Express/Solr which was just one node in a long list of architectures I've used here. Why the change from django? Why the choice of IronRuby-microsoft-ish stack? Well, I'll surely be blogging about that shortly when I update my Tale of a Website post. In the meantime please keep an eye out for anything not working and let me know if you find something broken.
Templating with NDjango - It never ceases to amaze me how many great open source tools and libraries have been ported to .Net. NUnit... NHibernate... NAnt... All incredibly widely adopted. Today, however I'd like to focus one that a coworker brought to my attention which may actually get some use at the office, NDjango. During my recent Django work I've become quite attached to Django's template language. It took me a while to warm up to it but I'm hooked. When I heard that the templating had been ported to .Net I was naturally quite interested. Examples As you'd expect, there really isn't all that much to it. Consider the following code /* The data we'll pass into the template */ Dictionary<string, object> context = new Dictionary<string, object>(); context.Add("name", "Chris Umbel"); context.Add("profession", "Database Administrator"); /*...
Scripting Your .Net Applications with IronPython - At several points in my .Net development career I've had the need to make an application I wrote scriptable. Sometimes it was to provide easy product extension to customers or lower level information workers. Sometimes it was to ease maintenance of very fine grained logic that has the capacity to change frequently or unpredictably. But every time I found it to be one of the more interesting facets of the project at hand. Early in .Net's history this was made easy by using Visual Studio for Applications (VSA) which allowed you to host arbitrary C# or VB.Net code within the executing AppDomain. Unfortunately VSA was plagued with resource leak problems and was therefore impractical in most enterprise situations. VSA was eventually deprecated. One of the many alternatives is to perform dynamic,...
Clojure, A Lisp for the JVM and CLR - I've been becoming increasingly interested in functional languages in the last few years and I'm apparently not the only one. It's pretty hard to listen to any general purpose software development podcast without hearing about Erlang, Haskell or F#. Another one came up recently that I just had to play with. It's a Lisp variant named Clojure. The reason I find Clojure particularly interesting is that it's designed to be hosted in the Java Virtual Machine and the .Net Common Language Runtime (via the DLR). From a practical perspective that's wonderful considering integration with other commonly used libraries in the business world is a snap. I'm sure it annoys Lisp purists, but it makes Clojure much more adoptable between 9 and 5. As is frequently the case this is not something...
Parallel Programming with the Task Parallel Library and PLINQ in .Net 4.0 - It's no secret that parallel computing is becoming more important. As clock speeds have stagnated and the number of cores per die have increased one thing has become clear. Software developers have to adapt to the current state of processors by writing code that's more parallelizable. In the past many programmers have avoided parallel processing when possible mainly due to its complexity even in the face of an obvious increase in throughput. Those that have parallelized have often done it poorly and suffered through some serious misery as a result. We're running out of options, though. In order to get more done faster we have to do more at once. Development platform providers have been scrambling lately to try to simplify parallel development and minimize the amount of work we'll have...
Solrnet, a Solr Client Library for .Net - One of the strength's of Solr is it's ease of consumption by other platforms due to its REST API and response writers which include XML, JSON, native Ruby and native Python code. If you're trying to consume a Solr service from .Net you could easily use a WebClient and parse the results with .Net's System.Xml namespace and perhaps even build an object wrapper on top of it. Luckily that work's already been done with the solrnet library. In this post I'll outline the fundamentals of solrnet usage. Prerequisites This article assumes you have a .Net development environment such as Visual Studio and a functional Solr install in servlet container. I'll also assume that you understand how to configure Solr's schema. If that's not the case please consult the official Solr wiki....











