CodeMash Blog 7 of 10

CodeMash is a unique event that educates software developers on current practices, methodologies, and technology trends in a variety of platforms and development languages such as Java, .Net, Ruby, Python and PHP. Different than most conferences, this three-day event ‘mashes’ together ideologies and individual developer experiences to discuss, learn and even attack certain problems. Grand Rapids based, CQL, sent seven of its developers to this large software development conference. Following is our Codemash Installment #6 of 10.

Code Kata and Analysis

Enjoyed sitting through this presentation. “kata” is a martial arts practice that deals with doing the same moves over and over to build muscle memory. ‘Code Kata’ is the same idea focusing on small coding exercises repeated over and over to train your brain to “just know” how to do common tasks (reduce errors). In essence, this process is intended to better streamline issues identified during testing activities. During the presentation, we ran through some test cases intended to help the developer ‘notice’ potential problem areas prior to testing. As a summary, find the interesting tests and only do those…finding them comes with experience…Know: When to recognize duplication…need enough of it to be sure of the pattern…recognize points of interest…duplication in tests themselves, refactor.

Information Overload

This session was geared more toward how to balance all the crazy drags on a developer’s time (sales people, employer, etc. twitter, facebook, email, sms, etc, personal-family, etc) – in other words, creating ‘best practices’ to make your time more efficient. In order to be more effective in writing code, you have to be more effective in managing the outside influences on your day. The presenter discussed various suggestions, including:

  1. Be specific in how you handle email responses (filtering email inboxes or setting specific times to review emails – teach people how to treat you by being specific in your timing of responses)
  2. Conserve your keystrokes (train yourself to ‘just give the facts’ in your responses)
  3. Know your trusted resources (understand what responses should take priority based on your knowledge of the individual making the request)
  4. Personal scrums (work sprints for yourself)
  5. Document interruptions (become aware of how they are happening, when they are happening, etc., and seek to eliminate those situations)
  6. Package opportunities (e.g., listen to podcasts and learning activities on the treadmill)
  7. Eliminate the noise (find the right tools for the job – pick the one or two that works for you, and get rid of the rest – they cause noise).

The session continued with other ideas. Much of the items were common sense. Some seemed like, ‘yea right, be nice if I could do that, but not likely’ (think of every sales person you know).

Mobile Smackdown

This was a fairly fun activity. Three participants had to build a mobile app Iron Chef style. These participants knew the ‘ingredients’ ahead of time, so they could practice building the mobile application. During the smackdown, three additional ‘secret ingredients/requirements’ were added that they did not know about until the event. The mobile platforms represented in the competition included, Windows Mobile 7, iPhone and Android. The MC kept saying that it wasn’t a contest, just a showcase of how to do the same thing on all three platforms, however he was a Microsoft guy, and the Windows Phone did smoke the other two developers. Not sure if this can be viewed as a scientific test – I’m guessing not, but it was still fun.

Check back for Codemash Installment #7 of 10.

 

CodeMash Blog 5 of 10

CodeMash is a unique event that educates software developers on current practices, methodologies, and technology trends in a variety of platforms and development languages such as Java, .Net, Ruby, Python and PHP. Different than most conferences, this three-day event ‘mashes’ together ideologies and individual developer experiences to discuss, learn and even attack certain problems. Grand Rapids based, CQL, sent seven of its developers to this large software development conference. Following is our Codemash Installment #5 of 10.

The People vs. Javascript

This was a 4 hour presentation on the topic of the flaws in Javascript. The format was a 53 question online quiz that all the people in the session took, with the presenters explaining the answers after the group had answered. (The quiz itself was interesting, as it was written using Javascript sockets, with the presenter “pushing” new questions to the clients, and the clients posting the answers back to the server. The “score” for each answer was displayed in real-time as people answered, and next to each person’s name was an indicator for whether they answered the question correctly.) The questions mostly seemed to be the “trick-question” type of question, but they ended up being a very good teaching tool, as they illustrated the quirks of Javascript very well. The presentation was both interesting and informative, and was one of my better CodeMash experiences.

Blazingly Fast Services Using Node.js and MongoDB

This was a pretty good session showing off Node.js (Javascript on the server). Most of the presentation was coding a web server in Node.js for a small two page website. The site was the usual – show a list of products, click a link to add or edit one. Save. Back to list. (Boring). It was the server side that was interesting. The presenter used a web framework called Express to set up routes and handle the GET and POST requests, saving and retrieving objects in MongoDB using a library called Mongoose. Keep in mind, this is all in Javascript – very strange for a web developer to see server side code in Javascript, but kind of cool at the same time. Javascript is enjoying somewhat of a resurgence of late, partly due to Node.js, and I can see why. There are a lot of modules being written for Node.js, and some companies are taking it seriously as a server technology. Maybe something we could try sometime?

Database Migration (and Rollbacks)

This presentation was basically an introduction to a tool called FluentMigrator for doing database deployments. This tool is a fluent C# library that you use to deploy database updates and optionally roll them back. It can also be included in MSDeploy deployments, which would make it easier to deploy web and database updates all at once. I think the consensus of our group is that this is a neat idea, and maybe worth a try, but would take some time and careful consideration before fully trusting it. The presentation showed some very simple examples, and while a lot of our database deployments are straight forward, we usually don’t need to roll them back either (and if so, a simple script is usually good enough). I just can’t see the advantage of using a tool like this, unless we were to move to a fully automated deployment process (which is unlikely based on our process). At the very least, it’s good to be aware of tools like this, so we understand our options.

Check back for Codemash Installment #6 of 10.

CodeMash Blog 4 of 10

Grand Rapids based, CQL, sent seven of its developers to a large software development conference called Codemash. CodeMash is a unique event that educates software developers on current practices, methodologies, and technology trends in a variety of platforms and development languages such as Java, .Net, Ruby, Python and PHP. Different than most conferences, this three-day event ‘mashes’ together ideologies and individual developer experiences to discuss, learn and even attack certain problems.

SignalR

SignalR is a realtime javascript framework (an asynchronous signaling library for ASP.NET that can be used to help build real-time multi-user web applications). It connects a bit of server code with javascript “magic” that lets you push data from the server to the client. The canonical example is a chat application – with SignalR, a software developer now has a better way of creating real-time information when utilizing an ASP.NET framework. There was a lot of talk around node.js during the weekend, and this Signal R framework lets you do some of the real-time activities that node.js does without requiring a whole new framework; it plugs into ASP.NET, quite nicely. Its purpose is different than node, but they overlap some. This was one of my favorite presentations from the weekend.

Why Our Customers Should Care:              Real-time updates of information is extremely beneficial for many customer applications/websites. SignalR when combined with MVC provides new possibilities in developing web applications and client side UX design. In other words, when the SignalR process is combined with ASP.NET MVC, it provides developers an easier way to create dynamic websites, and ultimately create a better experience for end users.

Backbone Coffee script

The talk was supposed to be about Coffee Script and Backbone.js. The speaker spent most of his time talking about Backbone. Backbone.js is a javascript MVC framework that supplies models with (1) key-value binding and custom events, (2) collections with a rich API of enumerable functions, (3) views with declarative event handling, and (4) connects it all to your existing API over a RESTful JSON interface. In other words, according to the official Backbone.js site (documentcloud.github.com/backbone), with Backbone, you represent your data as Models, which can be created, validated, destroyed, and saved to the server. Whenever a UI action causes an attribute of a model to change, the model triggers a “change” event; all the Views that display the model’s state can be notified of the change, so that they are able to respond accordingly, re-rendering themselves with the new information. The speaker made a (pretty good) argument that most web applications, these days, require interactivity and responsiveness, etc. The presenter said he got sick of trying to manage ajax with json and jQuery because the jQuery code ended up hard to support after development was done. Backbone changes that by moving the MVC framework into javscript. The server app ends up becoming an REST api only; all of the view templating, routing, and models are in JS, and Backbone is a framework for it. I found the idea fascinating, and at times found myself agreeing with the presenter that the ajax updates to pages can get cumbersome.

Why Our Customers Should Care:         It is important that software developers constantly search for better (and easier) development tools to achieve the desires/needs of their customers. This presentation on Backbone was just one example of how a great developer is always looking for new tools that make the coding experience better, and therefore a better output for the customer.

Check back for Codemash Installment #5 of 10.

 

CodeMash Blog 3 of 10

In our continuing series on observations made at the 2012 Codemash Conference, following is our Codemash Installment #3 of 10. As a reminder, Grand Rapids based, CQL sent seven of its developers to a large software development conference called Codemash. CodeMash is a unique event that educates software developers on current practices, methodologies, and technology trends in a variety of platforms and development languages such as Java, .NET, Ruby, Python and PHP. Different than most conferences, this three-day event ‘mashes’ together ideologies and individual developer experiences to discuss, learn and even attack certain problems.

Building Social Games Using HTML5, Window 8, Azure, .NET

Using HTML5 paves the way for creating social games that run across a variety of platforms, without the pain of developing unique code for each device. Using Azure enables a potentially inexpensive way to scale big for very low cost (I’m more sold on the cloud after seeing some of it in action.) For a social game like Tankster (Scorched Earth on HTML5), Azure Compute is used to host an ASP.Net MVC 3 application in an Web Role which uses WCF to communicate to the gaming client before game startup. As players gather before a gaming session starts, the app server offloads incoming requests to be handled by a combination of an Azure Queue and another Azure Worker Role. The Worker Role process (similar in concept to a Win32 Service) creates a specially named JSON-formatted file on Azure Blob Storage (think Amazon s3) for download among connected clients awaiting the game to start (files contain game info, names, weapons). Clients poll the file frequently looking for the game start signal similar in construct to a command query pattern. According to the team’s tests, this is actually quite cost effective since it avoids costly CPU hours polling the “heavier” web app running on ASP Web Role.

Once started, the gaming clients communicate to a Node.js server running on an Azure Web Role to communicate among the gaming clients near instantaneously. Node.js is an open source single threaded, event-driven, non-blocking i/o, very fast, lightweight, perfect for data intensive real time application that run across distributed devices (hence great for games requiring real time communications online).  It’s the current “hot thing” in web socket communications (built into HTML5). Microsoft has a program manager responsible for ensuring this works in the Azure cloud.

Using Azure allows a conceptual project to scale up to support increased incoming requests by spinning up more Web and Worker roles. Surprisingly, there is no autoscaling (adding more CPU etc as load increases) built in to Azure, but 3rd-party modules can be used to implement this functionality.

As an interesting note, Azure Storage Services (Blob, Table) maintains 6 copies of data spread across two geographically separate data centers.

Why Our Customers Should Care:              Many clients are seeking cost-effective recommendations for how to scale their larger, data intensive solutions. As a software solutions provider, CQL continuously investigates available options including “cloud offerings.” Gaming solutions are large consumers of data-intensive processes, and provide opportunities to test the scalable support options that will house your next critical business application.

TDD in .NET vs. BDD in .NET

Test Driven Development (‘TDD’) gives you courage to improve the code base without breaking existing functionality.

  • Typically your unit tests should not be ordered and run independently returning the system to its former state.
  • Adhere to the “Highlander” principle….”there can be only one” thing the test is testing.
  • TDD zealots would have you believe that you write less code…I agree that certainly you write twice the code when you do TED (test eventually development…writing tests after the fact).
  • Certainly many more tenents, all Googleable.

Behavior Driven Development (‘BDD’) helps create test specifications that are easy to read even for non-programmers and allows the design of the software to be driven by its purpose. BDD enables a non-programmer to write stories (“As a admin when I enter Joe as the UserName and ‘I wish I could be at Codemash’ and press ‘add post’ I should see a page that shows ‘thanks Mr. Non-programmer, sorry you couldn’t come”) using an English-like language called Gherkin (e.g., what you just read).

In the context of a MVC web application, a Visual Studio plugin compiles it down to C-Sharp code which calls various tests you write. Running the complete test fires off a browser which increments through the steps, validating the test. Previously, only crummy tools on .Net were available. SpecFlow and Selenium are now more fully featured, compelling way to make this happen. The English-like language tests help ensure that clients get what’s expected and what works…not just what works.

BDD allows more non-technical people (e.g., project manager or project sponsor at client) to more fully participate in the software development process.

Why Our Customers Should Care:              Testing is critical in the software development process. There are different ways in which developers engage clients to perform these tests, but ultimately any testing process that makes it easier for a non-technical client to participate in the software development process is good for everyone – better outcomes for the developer (faster confirmation/feedback is provided by the client) as well as for the client (more cost effective solutions in a shorter amount of time).

Dynamics In C#

There is room for the ‘dark magic’ of dynamics in a statically typed language like C#. MVC3 is already using it with the concept of a ViewBag (replacement for ViewData["somevalue"] in older versions of MVC). Though typically we are using a more strongly typed ViewModel which I think is better anyway.

Dynamics are much better for dealing with an undetermined API (JSON from the browser, or RavenDB, or Couch, Mongo) or metaprogramming (programs writing programs. A practical example would include https://github.com/markrendle/Simple.Data a dynamically generate data access library.

Nonetheless, the drawbacks are fairly significant so care must be used. Code is much less self-documenting (no contextual documentation), no intellisense (argh!). Really to use it extensively, you better be using a solid TDD approach as a team as it requires quite a bit of discipline.

Why Our Customers Should Care:              Data is ‘king.’ Technology that makes it easier to for developers to create solutions for manipulating and exposing this data is extremely important. Customers must be aware that there are definite concerns regarding how this data is treated, and the importance of providing enough time/opportunity for developers to ‘test’ their solutions.

Check back for Codemash Installment #4 of 10.

CodeMash Blog 2 of 10

Recently, CQL sent seven of its developers to a large software development conference called Codemash. CodeMash is a unique event that educates software developers on current practices, methodologies, and technology trends in a variety of platforms and development languages such as Java, .Net, Ruby, Python and PHP. Different than most conferences, this three-day event ‘mashes’ together ideologies and individual developer experiences to discuss, learn and even attack certain problems. Following is our Codemash Installment #2 of 10:

Migrating Apps to Azure

This 4 hour session was split into two smaller sections. The first was an intro to Microsoft’s cloud platform, Azure. The biggest difference between something like Amazon and Azure is that Amazon takes control of the hardware for you, but leaves the rest alone; you still need to manage IIS and .NET, etc. With Azure, you have an entire Application stack; you don’t need to worry about IIS and service packs and all that ‘stuff.’ The benefit is less management, but with the potential drawback of less flexibility.

We also talked about reasons to go to the cloud, and a long list of things to remember when moving to the cloud (e.g., sessions and logging, etc.). In the second half of the session we took an app from Codeplex and converted it to run in Azure.

Why Our Customers Should Care:              For purposes of growth in the Cloud industry, expanded use of Cloud services by companies already using the Cloud, security concerns, and hosting costs and server workloads, many clients are examining the impact of utilizing the Cloud for support of their business applications. Some recent trends identified by Cloudspectator indicate some interesting direction of Cloud computing. (1) $150 Billion: the size of the Cloud Computing Market by 2013; (2) 70% of companies currently using cloud services will move additional applications to the cloud; (3) 54% – amount of respondents citing Security as their top concern for transitioning to the cloud; (4) 60% – server workloads that will be virtualized by 2014 – up from 12% in 2008

Responsive Web Design

This was actually more of a design talk, but I enjoyed it, anyway. “Responsive” web design means designing your site so that you have 1 site (not a separate tablet version, and a separate mobile version, etc.) that scales well to different sized screens. Flexibility is the new “hotness” when it comes to sites. Responsive web design is a different approach than traditional web designing, and speaks more to the ability to render a site across different devices (tablet, smartphone, laptop, etc.) without having to design the same site to fit the specific device. There are some definite “gotchas” that a developer must be aware of, but overall, customers demand flexibility in the presentation of their software applications.

Why Our Customers Should Care:              Businesses understand that their customers interact with their systems from a variety of devices. All businesses should push their software development partner or internal development team to recommend tools or processes that make it easier (and more cost effective) for sites and applications to be served up to customers.

Database Migrations for Web Applications

This was another deployment talk, but this time talking about Database deployments. The speaker talked about versioning and migrating changes. He specifically showed a particular tool (fluent migrations), but mentioned several others that are similar. This talk further supported the importance of Automated Deployment Management. The importance of Automated Deployment Management, in software development, seeks to identify efficiencies in deployment of applications.

Why Our Customers Should Care:            Making deployments more efficient should have a direct cost benefit for client software development.

Check back for Codemash Installment #3 of 10.

CodeMash Blog 1 of 10

As a custom software development firm, CQL must constantly put our developers in a position to be exposed to the latest technology trends, not only within in the .Net development framework, but across multiple development platforms. Recently, CQL sent seven of its software developers to a large software development conference called Codemash. CodeMash is a unique event that educates software developers on current practices, methodologies, and technology trends in a variety of platforms and software development languages such as Java, .Net, Ruby, Python and PHP. Different than most conferences, this three-day event ‘mashes’ together ideologies and individual developer experiences to discuss, learn and even attack certain problems.

Having our developers attend this type of conference provides tremendous benefit to our customers. Even though CQL has the largest collection of .Net Developers in Grand Rapids, Michigan, we understand our approach with clients must be technology agnostic, and be willing to recommend the best platform and development language to meet the needs of our customers. Codemash offers excellent opportunities to tie together those areas of most interest to our clients, including Ecommerce, Business Intelligence, Content Management and custom web development.

In the next ten blog entries, we will provide some insights from our technologists who attended this conference on software development concepts that should be important to our customers (even if they don’t understand the underlying technology topic). Following is Codemash Installment 1 of 10:

Heroku (http://www.heroku.com/)

This was informative in a “here’s how an awesome deployment system could work” kind of way, perhaps made a bit sweeter because the presenter is a Heroku employee.  Heroku is a cloud environment that has lately been adding more languages/platforms that they can host.  Deployment is done using a git push, which then forces the system to recompile, test, and deploy the application.  Very interesting system, and I just read a blog post about someone getting a .Net app onto Heroku using Mono and a bunch of duct tape, but it wouldn’t surprise me if .Net were added in the near future.  Something to watch.

Why Our Customers Should Care:            Recently named the 2012 Technology of the Year, by InfoWorld, Heroku provides a platform as a service (PAAS) for building, deploying, and running cloud apps using Ruby. The platform includes tools for deployment and management, a runtime for scalability, fault tolerance, and an add-on system for extending the capabilities of our platform. In essence, it allows your software developer to more quickly develop and expand your software solution.

PhoneGap (http://phonegap.com/)

This was a pretty cool session.  PhoneGap lets you build an HTML + JS application that can then be packaged up and put on the various mobile app stores.  A few alternatives were mentioned (but not discussed in depth) – rhomobile, MoSync, SenchaTouch, Appcelerator.  The presenter also pointed out JQTouch as a way to make the app look and feel a bit more like a native application.  Also mentioned (very briefly) was Mulberry, which is apparently kind of like Rails for PhoneGap development.  Something to check out for sure.

Why Our Customers Should Care:            PhoneGap is an open source solution for building cross-platform mobile apps with standards-based Web technologies like HTML, JavaScript, and Cascading Style Sheets (CSS). Based on HTML5, PhoneGap leverages web technologies developers already know best… HTML and JavaScript, and provides access to native APIs. PhoneGap uses standards-based web technologies to bridge web applications and mobile devices. Something all of our clients should be considering.

CI++

This session was a bit disappointing for a few reasons totally unrelated to the content.  The presenter started out by discussing various bits of automation and testing going from standard practice up through “this-doesn’t-really-exist-but-who-knows (for example: Unit Tests for your Unit Tests and a Semantic code analysis tool that can find bugs to an impossible degree).”  He lost a few audience members while talking about some of the non-existent tools, probably still 5 minutes before he said “oh, and by the way I made up a bunch of those things.”  He discussed automating DB artifact deployment (by writing the scripts exactly like we do at CQL), and a few other parts of deployment, but then ran out of time before he could get into the stuff that I was looking forward to (although I have a feeling that his presentation was largely meant to lead into a sales pitch). Overall, it is an important topic, but the presentation simply missed the mark.

Why Our Customers Should Care:            In software development, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently. Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development. Obviously, at CQL we take this topic very seriously, as we want our customers to experience the best results with the custom software applications we develop.

Check back for Codemash Installment 2 of 10.

Mobile Monday Grand Rapids January Recap

Last summer, I joined the Mobile Monday of Grand Rapids (MoMoGR) organizing committee because more of our clients want to learn about Mobile development and how it can help their business.  “MoMo” stands for Mobile Monday, and the Grand Rapids location is just one of many chapters that exist, globally. The MoMo organization brings together software developers and designers who practice their skills across many different development platforms. CQL is very engaged in developing custom software solutions across various mobile platforms (e.g., Apple, Android, Windows Mobile, etc.). As devices continue to become smaller and provide greater computing power, our clients find that critical (and non-critical) software applications need to be delivered through these mobile devices.

This week, MoMoGR held their quarterly event at Grand Valley’s Loosemore Auditorium.  This event was focused on Gamification, which according to our keynote speaker, Venu Vasudevan, means the use of game design techniques and mechanics to solve problems and engage audiences.

Venu is the Senior Director at Motorola Mobility and definitely had a lot of insight on where this mobile movement will take us.  He started his presentation covering the past and informing us on why TV, which has had very few changes in the last 10 years, has only been a one-sided media experience.

Example: Visual of a couch potato sitting hours with only the occasional bathroom break, or beer break.   Definitely a one sided exchange because the only entity that is engaging is the TV.

But what if you could engage your TV and were encouraged with Games?   It would revolutionize the way we currently watch TV.  Venu gave his opinion on what works and what doesn’t, explaining that gaming only works when you take it a step further than badges and leader boards.  When gaming truly works, a ‘rewards’ structure must consist of Intrinsic Motivation.

His Examples are:

Stack Overflow

USA Network

Seeking Alpha

Before the keynote, there were three short 4-5 minute talks from local people that have started to use games in either an application or a development practice.   The most unique was a Grand Valley State University grad student presenting what he calls “Pocket PT”; a suite of accessorized theuraputic iOS games being designed to help patients recover from traumatic brain injuries. The goal of this application was to use gaming as an incentive for repetitive exercises.  It is fully customizable and the clinics receive valuable feedback.   Check out the video below.

Get Microsoft Silverlight

It’s amazing how such a simple concept can change the way we’re engaging patients with traumatic injuries.

The event was great and I’m definitely looking forward to the next one (check out the MeetUp or our blog for updates).  What I realized is that gaming, whether on a Mobile application or not, is going to have a huge impact on how CQL builds applications.   In the future I see users more actively interacting with live televisions shows, advertisers, and much much more. Really the possibilities are endless.

 

Top 5 Reasons to Develop a WP7 App for the New 2012 Year

The Windows Phone 7 platform has been out for just over a year now and promises to be an exciting new platform for both users and developers.  The user interface is fresh and new compared to the other existing platforms.  For developers, Microsoft has created a powerful and fun toolset with which to work, including an emulator with all the bells and whistles, for free.  The features of the phone and developer tools are rapidly improving and now are very competitive to other platforms.  After a year of personal development, I thought I’d share my top 5 reasons to start building a WP7 application for the new year.

5. Learn something new
There are tons of free resources provided by Microsoft and others to help learn this new platform, including tutorials, sample code/project, blogs, etc.  If you are a Silverlight or WPF developer, then you have a really good jump start on learning the platform and you will feel right at home with the XAML.  If you are an XNA developer, the gaming toolset will be easy to dive into.

4. Gain some work experience
Picking up a new technology can help you improve your development skills in general… and who knows maybe someday the XAML will come in handy for a work project, whether it be WP7, Silverlight, or a WPF app.

3. Make some money
Sign up for the marketplace and submit one or two applications.  Even if they are simple free apps, you can additionally sign up for the MS Adcenter and place some ads on your apps to make a few bucks.  For the first year (2011), if you created two apps, Microsoft even gave a rebate so your marketplace membership fee was free.  There are also plenty of contests to enter for prizes or recognition.

2. Good excuse to buy a new phone
Let’s face it, many of us are a bit cheap when it comes to cell phones.  With plenty of free choices out there, I always go for the deals and grab a free one.  As long as it makes calls, that’s all I ever cared about.  Smart phones, however, can be pretty fun.  Especially a WP7 phone if you are an MS developer.  There are deals to be had, but smart phones can still be pricey.  Creating a couple of simple apps gave me a good excuse to buy my HTC HD7 for “testing” my apps.  I was able to recoup the cost of the phone over time.

1. It’s fun
For me, the Windows Phone 7 platform has been all of the above, but also very fun and exciting.  It’s cool, new, and fresh to play around with GPS, accelerometers, and all of the other fun gadgets on mobile devices.  The tech is growing fast and it’s not just phones anymore (phones, tablets, etc.)  There are plenty of choices with which you can experiment.  Even if you never intend to join the market place and submit an app, why not spin the wheels, it’s free after all.  Just check out App Hub, read a few articles, first, and if you like what you read, then download the tools.  Have a blast this year creating the next Angry Birds, Mom’s recipe book, or a sports statistics app, whatever topic you love the most!

Ultimately, most of us work at CQL to provide client solutions. Our clients need to understand that everything is moving “mobile” at this time, and being a developer who can deliver solutions in these multiple platforms makes us more valuable.

Microsoft Data Protection Manager 2010 (DPM)

CQL has done away with old slow tape backups and implemented Microsoft DPM 2010.  DPM 2010 seamlessly uses disk, tape and cloud-based repositories to deliver an easy-to-use and best-of-breed backup and recovery solution for Windows environments.

This tool allows CQL to backup RAW data along with full VHD snapshots every 15 minutes if needed or requested by the client.  With a few clicks within DPM you can restore data or a full VHD to the same location or to another physical server.  CQL uses a product called “Firestreamer” to push our disk backups to an external disk drive which is stored securely at an offsite location.  Firestreamer simulates tapes by carving out slices in any HHD.  For example, we can have 100 virtual tapes on one HHD; again much faster than ordinary tapes.

Even though CQL is a leading custom software development shop in West Michigan, we also have a small data center. In my role at CQL, I manage the data center and I’m also responsible for managing client infrastructure needs. DPM has been a welcome addition to the tools I use to support our clients.

Running DPM 2010 at CQL allows us to provide our clients with multiple backup solutions to fit their data recovery timeline.

I’m Sold on Dapper

Don’t get me wrong, I love my LINQ. I just have mixed feelings about LINQ2SQL, or anything that promises to make my life easier by allowing me to write fewer SQL statements.

I’ve been burned a few times too many by seemingly innocuous LINQ2SQL queries that ended up ballooning into resource hogs once deployed to the real world. Often, it’s a sleeper; some query that’s been running just fine for years and then, BAM! You get jolted by a spiked CPU like a shovel to the face because an email campaign hit some remote part of the site that hadn’t been pored over. A little digging finds that LINQ2SQL has drunkenly taken over the kegger at your parents’ house, smashing lamps and vases and shoving your friends into the pool, wreaking all sorts of havoc and running your CPU off the charts.

It’s that friend you learn to limit. He may be great in certain situations, like running the basic CRUD (Create, Read, Update, Delete) routines on all those cumbersome admin screens, but once you take him into the real world, once you expose him to all your other friends on your high traffic ecommerce site, once you give him a broader audience, you run the risk that he’ll show his true colors, and you may not like what they see.

Such has become my relationship with any ORM that promises to lift the burden of having to write straight SQL. It’s fine in the right circumstances and saves loads of time writing basic operations. But once you cook up a slightly more complex query and roll it into a public website with tens of thousands of hits an hour, it’s just not enough. Trusting the black box of ORM SQL generation often turns out to be a risky endeavor.

I’d rather be in direct control of what SQL gets executed when writing finely tuned database access. Thus, I’ve come to love what Dapper has to offer. Dapper, by the folks over at stackoverflow.com, is an extremely lightweight data access layer optimized for pulling raw data into your own POCOs (Plain Old C# Objects). It’s that perfect fit between the nauseatingly redundant world of SqlCommands and DataReaders, and the overzealous and overbearing friend you find in LINQ2SQL. No longer do I have to guess at what kind of query an ORM is going to generate. No longer do I have to worry that LINQ2SQL is going to fly off the handle and take up all my CPU trying to compile the same dastardly query over and over again. I can instead write the SQL myself and get it into my POCO of choice with less effort than it takes to bash my head on the keyboard.

For example, let’s say I’ve got this domain object:

public class OmgWtf
{
    public string Acronym { get; set; }
    public string Sentence { get; set; }
}



All I have to do to yank the data from the database is this:

using (var conn = new SqlConnection(ConnString))
{
    conn.Open();

    string sql = @"
        SELECT TOP 1 omg.Acronym, wtf.Sentence
        FROM OnoMatopoeicGiddiness omg
            JOIN WordsToFollow wtf ON wtf.OmgID = omg.ID
        WHERE wtf.ID = @WtfID";

    var omgwtf = conn.Query<OmgWtf>(sql, new { WtfID = 3 }).First();

    Console.Write("{0}: {1}", omgwtf.Acronym, omgwtf.Sentence);
}



The result is, of course:

SQL: I Squeal for SQL!

No longer do I have to suffer the fate of black box SQL generation when all I really want is a clean, easy, and fast way to get my SQL or stored procedure results directly into my domain objects. I’m sold on Dapper for many of my high-performing pages. As we maintain our sites and find the occasional bloated LINQ2SQL resource hog, we’re swapping out the queries to straight SQL, stored procedures, and Dapper, and it has really sped things up.

Go ahead, give it a shot yourself. It’s available on the NuGet Gallery, and only imports a single C# file; no extra assemblies required. They’ve got plenty of examples at the project site. I’m wondering how I ever lived without it.