daGrind
19Feb/100

PLINQO

I have been using LINQ to SQL for some time now and while it is incredible, it lacks what the CodeSmith templates that I have been using for years offer in flexibility. I have been reevalating some of the custom templates that I have developed to see how I could better use LINQ to SQL and that is where PLINQO enters the picture. I keep hearing about how awesome PLINQO is and that I need to take a look. The batched queries, cache features, and quick start templates seem to be exactly what I have been needed for the LINQ to SQL solutions that I have been working on. Take a look at this overview video of PLINQO for a great into!

More information can be found on the PLINQO website: http://plinqo.com.

10Feb/100

DPAPI

I wrote this documentation and project years ago and found it while looking through some of my archives last night. It probably still has some millage left and might be found useful to someone setting up DPAPI. You can download the binaries or source code below.

Download Binaries | Source

DPAPI Setup

1. Create the directory C:\DPAPI and copy the contents from the DPAPI directory (found in DPAPIBinaries.zip) into the new directory.

2. Create a local Windows account that will be used to run the Enterprise Services Application and Windows Service with the username DPAPIAccount. Make sure to uncheck the User must change password at next logon check box and check the Password never expires check box. Use the Local Security Policy tool in the Administrative Tools programs group to give the account the Log on locally and Log on as a batch job privileges.

You must log off with your current account and login as the DPAPIAccount user to create the user profile. Once you have logged in as the DPAPIAccount user you can then log off and log back in as your normal account.

3. Open a command prompt and run the following command to register the serviced component.

regsvcs C:\DPAPI\DPAPIComp.dll

4. Open the Component Services management console and navigate to the Component Services->Computers->My Computer->COM+ Applications folder. Right-click on the DPAPI Helper Application application and select the Properties menu option.

6. Click on the Identity tab and select the This user radio button. Enter the MachineName\DPAPIAccount username and password and then click on the OK button.

7. Expand the DPAPI Helper Application->Roles folder. You will need to add the users to the Roles\Users nodes that will need access to encrypt and decrypt. All users that need access to encrypt and/or decrypt must also be added to the Marshaler\Users node.

Add the MachineName\ASPNET ("NETWORK SERVICE" in IIS 6.0) user to all three groups for this example since we will test encrypting and decrypting through an ASP.NET application.

8. Open a command prompt and run the following command to install the Windows service.

installutil C:\DPAPI\DPAPIService.exe

Enter the MachineName\DPAPIAccount ("NETWORK SERVICE" in IIS 6.0) username and password and click the "OK" button.

9. Open the Services management console and start the DPAPI Service service.

10. Open the IIS management console and add a new virtual directory named DPAPIWeb.

11. Copy the contents from the DPAPIWeb directory (found in DPAPIBinaries.zip) into the new virtual directory.

12. Open http://localhost/DPAPIWeb/WebForm1.aspx in a browser and test encrypting and decrypting. Obviously, you would want to make sure that this application was not accessible outside of the local server.

3Feb/100

Sheeple On The iPad

Like all of the other iPhone developers, I too have been scheming planning how I can take advantage of the iPad with existing and new applications. As for my company, Tomato Factory, we plan on going down the Universal Applications route discussed here. The lack of information in the current iPhone SDK 3.2 beta seed is a bit frustrating. Also, the lack of information around when developers will have access to submit iPad native or universal applications is frustrating. I am sure that Apple doesn't want a horde of overly eager developers to submit iPad native applications without having ever tested their applications on a physical device. As all experienced iPhone developers know, the simulator is not the same as the physical device. I typically do not even bother using the simulator.

I decided to see how my application Sheeple looked on the iPad simulator. Here are screenshots of Sheeple running in both native iPhone 480x320 resolution (left) and scaled 2x resolution (right).


(click image to view full size)

It really doesn't look so bad at first glance, but it won't be long before users will not accept this compatibility mode. As soon as developers are taking advantage of the additional pixels they have access to on the iPad, this compatibility mode will probably be something that we will see less and less of. I am developing several games currently and we are using vector graphics, so creating a universal application should be a very straight forward process.

3Feb/100

Indie Appolis

I am excited to announce the launch of my new site Indie Appolis! Here is the information from our about page.

We know how difficult it can be to gain visibility as an indie iPhone developer and we want to help! Advertising is very expensive on the main iPhone review sites and they are so swamped that your little unknown indie game might never be reviewed. That is where Indie Appolis comes into the picture. We want to help give your app the visibility that it deserves and also focus 100% on the core of what we think has made the iPhone an incredible gaming platform, the indie developer!

I was able to interview some incredible developers for the launch of the site and have others in the works. Check out these great interviews.

Trenches: Developer Interview | Game Review
MiniSquadron: Developer Interview | Game Review
Compression: Developer Interview | Game Review

I also wrote a custom ad tracking/management application that is in use on the site currently. I will be packaging it up and then offering it as a product of daGrind called AdMan.

3Feb/100

Tomato Factory

The past year has been extremely busy with the birth of my son, moving back to Texas, and getting into iPhone development. In July of 2009 I started an iPhone game development company. Tomato Factory released its first game Sheeple on September, 18 2009. It has been an incredible experience learning about both the development (easy) and the marketing (hard) aspects of the iPhone app marketplace! I have gotten to know some good indie iPhone developers and look forward to what 2010 has in store.

We are currently working on two other games and have some exciting plans for 2010. I will be posting regular development related news on this blog. If you haven't already tried Sheeple, then please do so. There is also a Lite version available.

2Feb/100

CruiseControl.NET Continuous Integration Server

Overview

The CruiseControl.NET Continuous Integration Server allows for automated continuous builds. These builds are triggered when new source code is committed to the source code repository and the build process can include steps to perform unit testing as well as other various build related tasks. More information can be found at the CruiseControl.NET website: http://ccnet.thoughtworks.com. This article assumes that you are using CVSDude as your SCM provider, but using an internal provider will require few changes.

Installation Prerequisites

These are the installation prerequisites for CruiseControl.NET Server. http://confluence.public.thoughtworks.org/display/CCNET/Installation+Prerequisites

  • Microsoft .NET Framwork 2.0
  • ASP.NET enabled web server (typically IIS with ASP.NET configured)

CruiseControl.NET Server Installation

The following steps are required to install the CruiseControl.NET Server and Web Dashboard.

  1. Download latest release of CruiseControl.NET on the build server. http://sourceforge.net/project/showfiles.php?group_id=71179&package_id=83198
  2. Execute the CruiseControl.NET setup installer on the build server.
  3. Click on the “Next >” button.
  4. Click on the “I Agree” button.
  5. Leave all of the CuirseControl.NET Server, Web Dashboard, and Examples components selected and click on the “Next >” button.
  6. Leave the “Install CC.Net server as a Windows service” and “Create virtual directory in IIS for Web Dashboard” options selected and click on the “Next >” button.
  7. Leave the default destination folder as “C:\Program Files\CruiseControl.NET” and click on the “Next >” button.
  8. Click on the “Install” button and wait for the “Installation Complete” message.
  9. Click on the “Next >” button.
  10. Click on the “Finish” button.

CruiseControl.NET Server Windows Service Configuration

The following steps are required to ensure that the CruiseControl.NET Server Windows service is automatically started when Windows starts.

  1. Click on the “Start” menu.
  2. Click on “Run…”.
  3. Enter “services.msc” and click on the “OK” button.
  4. Right-click the “CruiseControl.NET Server” service and click on the “Properties” menu option.
  5. Click on the “Log On” tab.
  6. Click on the “This account” radio button.
  7. Enter the username and password for the account that is currently logged into the build server. This is required because subversion will not be able to verify the trust of CVSDude’s certificate. In a future step below we will permanently cache our decision to trust CVSDude’s certificate and that is why the user credentials must match since the cached server authentication is stored in a user director (i.e. “C:\Documents and Settings\Username\Application Data\Subversion\auth\svn.ssl.server”.
  8. Click on the “General” tab.
  9. Change the startup type to “Automatic”.
  10. Click on the “Start” button.
  11. Click on the “OK” button.
  12. Close the Services window.

CruiseControl.NET Web Dashboard Configuration

The following steps are required to ensure that the CruiseControl.NET Web Dashboard is property configured to run as an ASP.NET 2.0 application.

  1. Click on the “Start” menu.
  2. Click on “Run…”.
  3. Enter “inetmgr” and click on the “OK” button.
  4. Expand the “(local computer)” node.
  5. Expand the “Web Sites” node.
  6. Expand the “Default Web Site” node.
  7. Right-click on the “ccnet” virtual directory and click on the “Properties” menu option.
  8. Click on the “ASP.NET” tab.
  9. Ensure that the ASP.NET version is set to 2.0.50727.
  10. If there are other ASP.NET 1.x applications on this web server then you will need to make sure that the ASP.NET 1.x and ASP.NET 2.0 application use separate application pools for the different ASP.NET versions.
  11. Click on the “OK” button.
  12. Close the Internet Information Services Manager window.
  13. Open http://localhost/ccnet in a browser and ensure that the website displays without errors.

Subversion Installation

The following steps are required to install Subversion on the build server.

  1. Download the Win32 binary package of Subversion onto the builder server.
    http://subversion.apache.org/packages.html
  2. Extract the contents of the zip file’s versioned “svn-win32-#.#.#” directory into the “C:\Program Files\Subversion” directory.
  3. Download ThoughtWorks.CruiseControl.MSBuild.dll to the “C:\Program Files\CruiseControl.NET” directory.
    http://ccnetlive.thoughtworks.com/MSBuildXmlLogger-Builds/ThoughtWorks.CruiseControl.MSBuild.dll

CruiseControl.NET Project Configuration

The following steps are required to configure CruiseControl.NET.

  1. Create a build directory (ex. C:\CruiseControl.NET.Builds).
  2. Create the project directory in the build directory created in step 1 (ex. C:\CruiseControl.NET.Builds\[PROJECT_NAME_GOES_HERE]).
  3. Run the following command from the C:\Program Files\Subversion\bin directory.
    svn checkout https://[REPOSITORY_URL_GOES_HERE] c:\CruiseControl.NET.Builds\[PROJECT_NAME_GOES_HERE] --username user --password pass
  4. You will be prompted that there was an error validating the server certificate. Press ‘p’ to permanently cache the authentication.
  5. Setup the IIS virtual directory for project.
  6. Open the C:\Program Files\CruiseControl.NET\server\ccnet.config file in a text editor.
  7. Add a project section to the ccnet.config file.
    <project>
    <workingDirectory>C:\CruiseControl.NET.Builds\[PROJECT_NAME_GOES_HERE]\</workingDirectory>
    <webURL>http://localhost/ccnet</webURL>
    <sourcecontrol autoGetSource="true">
    <trunkUrl>https://[REPOSITORY_URL_GOES_HERE]</trunkUrl>
    <executable>C:\Program Files\Subversion\bin\svn.exe</executable>
    <workingDirectory>C:\CruiseControl.NET.Builds\[PROJECT_NAME_GOES_HERE]\</workingDirectory>
    <username>username</username>
    <password>password</password>
    </sourcecontrol>
    <tasks>
    <msbuild>
    <executable>C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
    <workingDirectory>C:\CruiseControl.NET.Builds\[PROJECT_NAME_GOES_HERE]</workingDirectory>
    <projectFile>[PROJECT_NAME_GOES_HERE].sln</projectFile>
    <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</buildArgs>
    <targets>Build</targets>
    <timeout>15</timeout>
    <logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files\CruiseControl.NET\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
    </msbuild>
    </tasks>
    <triggers>
    <intervalTrigger name="continuous" seconds="3600" buildCondition="IfModificationExists" />
    </triggers>
    <publishers>
    <xmllogger>
    <logDir>C:\CruiseControl.NET.Builds\Logs\[PROJECT_NAME_GOES_HERE]\</logDir>
    </xmllogger>
    </publishers>
    </project>
  8. Open the “C:\Program Files\CruiseControl.NET\webdashboard\dashboard.config” configuration file.
  9. Add the line “<xslFile>xsl/compile-msbuild.xsl</xslFile>” to the list of <xslFileNames></xslFileNames> section.
  10. Add a <xslReportBuildPlugin /> item.
    <xslReportBuildPlugin description=”MSBuild Output” actionName=”MSBuildOutputBuildPlugin” xslFileName=”xsl\msbuild.xsl” />
  11. Restart the CruiseControl.NET Service (i.e. Start->Run…->services.msc).