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.