July 2010
S M T W T F S
« Dec    
 123
45678910
11121314151617
18192021222324
25262728293031

Setting Up a Subversion Server Under Windows

I don’t have any original material to add to this excellent blog post by German developer Michael Stum regarding setting up Subversion to run over HTTP on Windows:

http://www.stum.de/2008/03/16/setting-up-a-build-environment-under-windows-using-subversion-part-1/
http://www.stum.de/2008/03/24/setting-up-a-build-environment-under-windows-using-subversion-part-2/

I’m excited to try this out (as this scenario has recently reared its head) and definitely want to share it with others. I know that git is the new hotness, and I really should learn more about TFS (haven’t used it in quite some time), but Subversion is still the way to go for me in my Windows environment, at least when it comes to open source VCS.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

PAX 2009 PC Room Stats

Every August/September I help run the Penny Arcade Expo, more reverently known as PAX. It’s North America’s largest gaming convention, and I run the PC Gaming Room. With approximately 900 computers networked together it is North America’s second largest gaming LAN, after Blizzcon. With the help of 60 additional Enforcers under my command and a dozen or so Intel employee/enthusiasts, we run both a “Bring Your Own Computer” (BYOC) side and a Freeplay/Tournament side. I’ve just compiled some pretty charts for your perusal:

Click for a larger image.

Firstly, the total number of attendees using the Freeplay machines:
PAX PCF 2009 Freeplay Throughput

Next, the total number of attendees processed by each Enforcer:

PAX PCF 2009 Freeplay Throughput by Enforcer

Lastly, the total number of Tournament registrations (which keeps the Freeplay numbers down):

PAX PCF 2009 Tournament Throughput

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

Windows Communication Framework (WCF) — Eliminating Principals on Endpoints (Part II)

A few days ago I made a post about eliminating security when using WCF. There are plenty of reasons to do this in a particular environment — for me, I handle authentication and authorization at a different level, and I don’t want to rely on an AD server or might not be running code in a domain with Kerberos authentication. Here are the steps I ended up taking:

Firstly, my published service’s app.config:

    <bindings>
      <netTcpBinding>
        <binding name="PCFComms" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="23:59:59" sendTimeout="00:01:00">
          <reliableSession ordered="true" inactivityTimeout="23:59:59"
            enabled="false" />
          <security mode="None">
               <transport clientCredentialType="None" />
               <message clientCredentialType="None" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
  

I use Visual Studio’s built in service proxy creator, which gives me this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <netTcpBinding>
                <binding name="PCFComms" closeTimeout="00:01:00" openTimeout="00:01:00"
                    receiveTimeout="23:59:59" sendTimeout="00:01:00" transactionFlow="false"
                    transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="23:59:59"
                        enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="None" />
                        <message clientCredentialType="None" />
                    </security>
                </binding>
            </netTcpBinding>
            <wsDualHttpBinding>
                <binding name="HttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
                    receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
                    transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="23:59:59" />
                    <security mode="None">
                        <message clientCredentialType="None" negotiateServiceCredential="false" />
                    </security>
                </binding>
            </wsDualHttpBinding>
        </bindings>
        <client>
            <endpoint address="net.tcp://10.10.8.192:8700/PCFComms/service"
                binding="netTcpBinding" bindingConfiguration="PCFComms"
                contract="PCFCommsGateway.PCFCommsService" name="PCFComms" />
            <endpoint address="http://10.10.8.192:8701/PCFComms/service"
                binding="wsDualHttpBinding" bindingConfiguration="HttpBinding"
                contract="PCFCommsGateway.PCFCommsService" name="HttpBinding" />
        </client>
    </system.serviceModel>
</configuration>

but I instantiate an instance of the service manually:

            // Create an instance of the NetTcpBinding and set the
            // security mode to none.
            NetTcpBinding myBinding = new NetTcpBinding();
            myBinding.Security.Mode = SecurityMode.None;

            // Create the address string, or get it from configuration.
            string tcpUri = "net.tcp://10.10.8.192:8700/PCFComms/";

            // Create an endpoint address with the address.
            EndpointAddress myEndpointAddress = new EndpointAddress(tcpUri);

            // Create an instance of the WCF client.
            PCFComms = new PCFCommsGateway.PCFCommsServiceClient(new InstanceContext(this), myBinding, myEndpointAddress);
            PCFComms.Open();
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

Presentation at August Tampa MVC meeting — using Spark View Engine with ASP.Net MVC Framework

In August I gave a presentation at the Tampa MVC meeting on utilizing the Spark View Engine inside of the ASP.Net MVC Framework. Here, finally, is the presentation and the demonstration code I used during the presentation.

I had a good time presenting, although it was WAY too much info for a mere half an hour, and too many of the attendees had a very important question on their minds: “Why would I use this?” Really, it’s up to the developer. It’s a stylistic difference that allows a developer to write very fluent code in their View, and that’s about it.

Regardless, I like the Spark View Engine, and I recommend using it for ASP.Net MVC development.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

T-SQL Random Number Generator [with NEWID()]

One interesting thing about T-SQL (the flavor or SQL that comes with Microsoft SQL Server), is that the RAND() function to seed a random number is called once per query. You can work around this using user defined functions, OR, just use the NEWID() function.

NEWID creates a GUID, but can be cast into a whole manner of different data types. I like this:

DECLARE @maxval TINYINT, @minval TINYINT
select @maxval=24,@minval=5

update tbl_orders set quantity=CAST(((@maxval + 1) - @minval) *
    RAND(CHECKSUM(NEWID())) + @minval AS TINYINT)
    where abs(quantity)>24
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

Windows Communication Framework (WCF) — Eliminating Principals on Endpoints

I don’t need to securitize my WCF services with windows principals at this point — at this point I tend to want various and sundry types to be able to access them. To affect this, I need to use a blank identity when I go to consume an endpoint.

From stackoverflow.com I saw that you can pass in an blank SpnEndpointIdentity when instantiating your communication layer:

    using con As new OfferingTap.OfferingTapClient( _
        new ServiceModel.InstanceContext(callback), "NetTcpBinding_IOfferingTap", _
        new ServiceModel.EndpointAddress(new Uri("net.tcp://qa1offerings:8190/"), _
        new ServiceModel.SpnEndpointIdentity("")))

In my config file, however, I just zap it out:

<endpoint address="net.tcp://localhost:8700/PCFComms/service"
    binding="netTcpBinding" contract="PCFCommsGateway.PCFCommsService"
    name="PCFComms">
    <identity />
</endpoint>
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

MvcAjax Plugin Update and Presenting Spark at the Tampa MVC Meeting

For starters, I bumped my MvcAjax plugin to 1.0. I was having anomalous issues with the row height in various browsers so I added a browser check. I wish I could have used jQuery.support(), but I’m not sure which browser feature(s) are causing the issues I was seeing. For a future release.  Right now the paging and sorting works excellently on Chromium, Firefox, and IE, and I’ll be testing Opera and Safari soon enough.

I really enjoyed working on this plugin, as I’ve found that too many people are focusing strictly on client-side sorting and paging, passing the entire dataset to the client for presentation.  The sparse server-side options define their grid inside of their jQuery calls, and in my opinion that is not the best place for them.  Currently, MvcContrib has the best way of creating grids that’s in keeping with the spirit of Asp.Net MVC, and I think it’s Grid() extension method is a good starting point for any Asp.Net MVC developer who needs to present tabular data.

In other exciting news, I’m going to be presenting at the Tampa MVC Open-Mic in a few weeks.  I will be demonstrating the Spark View Engine, and how a developer can use it in place of (and frankly, side by side) the standard Asp.Net MVC view engine.  I’ve been using Spark for over a month now (though I’ve been otherwise disengaged the past two weeks), and I think it’s provides a wonderful, syntactic way of writing one’s views without much of the tag spam.  There’s an adage that teaching others about something is a surefire way to boost your own knowledge in a subject, so I can’t wait to get up in front of 75 of Tampa Bay’s best developers and strut my stuff.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

MvcContrib Ajax Sorting and Paging with jQuery

I started a new project at Codeplex for the MvcContrib/jQuery tinkering I’ve been doing. You can find it here, and it’s titled “MvcContrib Ajax Sorting and Paging with jQuery”.  I created a jQuery plugin that wraps around the MvcContrib Grid and Pager outputs (no more extending MvcContrib), and utilizes jQuery.ajax() to offers server-side paging and sorting.  In addition, I created some new tidbits:

  • a new HtmlHelper I wrote outside of MvcContrib, entitled PageDropDown, that gives a “page x of y” dropdown.
  • a scrollable grid with fixed headers that is about 90% complete (separate issues in Firefox and IE)

My good friend Chris made me realize that I don’t need to extend MvcContrib at all — by utilize jQuery, I can augment the MvcContrib library output and convert the grid header and pager items into links.  As long as the user utilizes the right controller signature, everything works excellently.

I invite everyone to check out my project “MvcContrib Ajax Sorting and Paging with jQuery”, and let me know what you think.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

Adding AJAX-based server-side paging and sorting to MvcContrib Grid using jQuery

Edit: Check out my follow-up to this post for more information on the Codeplex demonstration / proof-of-concept project I’m working on.

MvcContrib is an excellent, well known Asp.NET MVC resource adding major functionality on top of the recent 1.0 MVC release. jQuery is an excellent, well-known javascript accelerator library that is tremendously extensible and powerful. Utilizing them together can improve the speed with which you can get an application into production and enhance the configurability and maintainability of same. There are pitfalls working with any framework, yes, but these two libraries, on top of the Asp.NET MVC framework, can help us deliver our data quickly and with an AJAXified (AJAXian?) flair.

Continue reading Adding AJAX-based server-side paging and sorting to MvcContrib Grid using jQuery

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot

Tampa MVC

Hit up the Tampa MVC Users Group yesterday — great bunch of people, and a pretty high-caliber group.  It was my first meeting, and I’m happy that I missed the past few months as they were more beginner oriented.  Yesterday there was an intro to ActionFilters and ActionResults, and we went over a site that brought everything all together.

The thing that excites me the most is the T4 templating engine.  I’m thinking about using Linq-to-Sql as my model for most of my MVC work, and T4 is another RAD tool Microsoft has come out with to make our lives a bit easier.

Last year Scott Hanselman came out with a nice intro post to T4 that I plan on digging into soon, to see how I can replace my CodeSmith and CodeToaster templates.

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot