03.17
Good article on BDDhttp://www.codeproject.com/KB/architecture/Say_Hello_To_BDD.aspx
This is a story about a boy and his ability to push himself to learn new things…
Good article on BDDhttp://www.codeproject.com/KB/architecture/Say_Hello_To_BDD.aspx
Putting this here for future reference…
http://www.pantz.org/software/mysql/mysqlcommands.html
Right okay, I have had some massive troubles implementing this. I was using VS 2008 with SQL Server and trying to get NHibernate set up with it all. Now I have moved to using MySQL which I have had no experience with until today :).So to get this all hooked up - Download MySQL, NHibernate and MySQL Connector (6.2.4 if you have vista)Then create a new mvc project.Reference the NHibernate Assemblies, lazy loading ones too.Install MySQL and the Connector.Create a database, with tables.In your mvc project, add the xsd files to the root directory and the hibernate.cfg.xml:<?xml version=”1.0″ encoding=”utf-8″ ?><hibernate-configuration xmlns=”urn:nhibernate-configuration-2.2″><session-factory name=”BlogApp”><property name=”dialect”>BlogApp</property><property name=”connection.provider”>NHibernate.Connection.DriverConnectionProvider</property><property name=”connection.driver_class”>NHibernate.Driver.MySqlDataDriver</property><property name=”adonet.batch_size”>16</property><property name=”generate_statistics”>true</property><property name=”current_session_context_class”>web</property><property name=”proxyfactory.factory_class”>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property><property name=”connection.connection_string”>Server=localhost;Database=BlogDB;User ID=root;Password= </property><mapping assembly=”BlogApp”/></session-factory></hibernate-configuration>
Setting up mysql with nhibernate, there is this small gotcha I should remember from:http://www.dotnetguy.co.uk/post/2010/02/14/Configuring-NHibernate-to-use-MySql-e28093-and-the-small-runtime-gotcha!.aspxThere is a good chance you will run into this error at runtime once all the NHibernate configuration is setup.
The IDbCommand and IDbConnection implementation in the assembly MySql.Data could not be found. Ensure that the assembly MySql.Data is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly. When you installed the MySql Connector it put the MySql.Data assembly into the GAC for you. All you need to do is add the following information to your applications configuration file (in my case the web.config).
<runtime>
You can find out the Version Number and PublicKeyToken of the MySql.Data Assembly by using the Visual Studio command line and typing :-gacutil /l MySql.Data
<assemblyBinding xmlns=“urn:schemas-microsoft-com:asm.v1″>
<qualifyAssembly partialName=“MySql.Data”
fullName=“MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d”>
</qualifyAssembly>
</assemblyBinding>
</runtime>
Just thought I’d update after reading about Using and the way it manages IDisposable objects. Handy for when making calls to the DB or services which only need to be called once.http://www.w3enterprises.com/articles/using.aspx
Another good read, this time on Dependency Injection.http://en.wikipedia.org/wiki/Dependency_Injection
Just to update the site and let you know I am currently a Code & Test Eng at Sony on Playstation Home.
A good blog post on Mocking and Stubbing - I feel are essential when dealing with Unit Tests.http://www.skimedic.com/blog/post/2010/12/21/An-Introduction-to-Mocking-(Now-that-we-are-SOLID).aspx
I highly recommend checking out these Screen Casts by DimeCasts on the SOLID Principle…http://dimecasts.net/Casts/ByTag/SOLID%20Principle
I just wrote a breakout game in XNA, took hardly anytime at all and even unit tested it. Good times. Boy, do I love C#.