My name is James Bigler. I am a software developer. This blog is mostly a collection of links related to software programming and technology.
Search This Blog
Friday, July 30, 2010
HunabKu: NHibernate LINQ provider extension
Best Monitor Stand Ever
Submitted by: Unknown
It also functions a nice place for you LEGO construction dudes and dudettes to hang out, while you use a CAD program to come up with your next project for them. – Frankie Fix-It
![]()
![]()
![]()
![]()
![]()
Wednesday, July 28, 2010
Solitude and Leadership: an article by William Deresiewicz | The American Scholar
If you want others to follow, learn to be alone with your thoughts
Friday, July 9, 2010
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default - ASP.NET Forums
I was able to resolve this issue in my own Windows 7 webserver using the Microsoft Web Installer Platform (http://www.microsoft.com/web/downloads/platform.aspx).
- From the GUI or finding it in the IIS MMC manager, Click on the Web Platform tab
- Then click on the Customize link below the Frameworks and Runtimes options.
- Select ASP.NET and ASP.NET MVC 1.0 (if necessary)
- and then click install.
Should resolve your issue. You can also probably do this without using the Web Installer Platform, but this was specifically the way I was able to resolve the same problem.
Verify JavaScript syntax using C#
In the past few days, I’ve worked on finding a way to do static code analysis on JavaScript files.The resaon is that I want to apply some sort of binary and source code checking like FxCop and StyleCop provides for C#.
Wednesday, June 30, 2010
Using Fluent NHibernate With Legacy Databases
So lets talk about the relevant Fluent Nhibernate features:
- Schema("viplookups.dbo");
The first item of interest is the Schema() method. The schema function tells NHibernate to pull this entity from a specified database. In my case this database exists on the same SQL Server. So I didn't need to try it on another server. If you have knowledge of this working on another server leave a comment here.
- Table("bnkroute");
The next item of interest is the Table() method. This is pretty straight forward Fluent NHibernate and specifies the legacy table to pull your data from.
- SchemaAction.None();
The next interesting feature is SchemaAction.None(). When developing our applications I have an integration test that is used to build all our default schema. I DONT want these table to be generated in our schema, they are external. SchemaAction.None() tells NHibernate not to create this entity in the database.
So that's it. A simple combination of Fluent NHibernate features to access data from a legacy database properly.
Monday, June 28, 2010
Friday, June 25, 2010
Test-Driven Javascript
Test-Driven JavaScript
In this talk my goal was to demonstrate as real as possible what it would be like to Test Drive your JavaScript Development, and to help you see that there really isn’t any reason why not to develop in this manner. And because of that I did not rehearse the actual coding exercise till perfection. I mean I know it was possible to do what I wanted, but I wanted to show the whole thinking about what to do as well, not just paste in pieces of code. Because that would not have been anywhere close to actual development. So needless to say I ran in a few small issues, but thankfully nothing that I couldn’t solve and if anything this was as real as it gets. So I am happy with this one. You can see the Test-Driven JavaScript recording here and also all the other recordings from NDC2010 here (well they will be there shortly, amazing how many they already made available).
How do I get started?
So after you have seen the recording and gotten all excited about Test Driving your JavaScript Development but you don’t really know where to go from here. Here is a small list of recourses and stuff that have helped me.
- All the original code for my website (which my demo was based upon) can be found on my GitHub account. This includes the JSpec specs as well as the Cucumber specs. The JSpec specs are in /public/jspec/unit/ where the page (Dom.html) that executes it is located one level higher. The JavaScript file under test is in /public/javascripts/ and the page containing it all is /public/index.htm.
- My actual website, so you can see the results, and also the JSpec specs and the JSLint output.
- JSpec is the JavaScript testing framework of my choice
- The slightly adjusted Dom.html page that includes a timer to facilitate the continuous testing.
- My own addition to better deal with animations, as the JSpec library doesn’t really threat these correctly.
- JSLint is a cool tool to get rid of smaller syntax errors and check the code quality.
- My JSLint execution page, not very special, but hey here it is.
Questions?
If you have any questions, then please let me know, I am more then happy to help where I can.
StoryQ
StoryQ is a portable (single dll), embedded BDD framework for .NET 3.5. It runs within your existing test runner and helps produce human-friendly test output (html or text). StoryQ's fluent interface adds strong typing, intellisense and documentation to your BDD grammar.
Bulk processing with NHibernate
On a recent project, much of the application integration is done through bulk, batch processing. Lots of FTP shuffling, moving files around, and processing large CSV or XML files. Everything worked great with our normal NHibernate usage, until recently when we had to process historical transactional data.
The basic problem is that we had to calculate historical customer order totals. Normally, this would be rather easy to do with a SQL-level bulk update. However, in our case, we had to process the items one-by-one, as each transaction could potentially trigger an event, “reward earned”. And naturally, the rules for this trigger are much too complex to attempt to do in straight T-SQL.
This meant that we still had to run our historical feed through the domain model.