Building a MVC2 Template, Part 19, Finishing NHibernate

5 Comments

This post will be fairly short. It will also tie together the two previous posts into our solution. If I haven’t left anything out, by the end of this article your solution will compile without errors and all the specifications will pass testing. We’ll start by creating the tables to hold our data. In part 18 we created the mapping from the tables we are going to create  to our POCOs. Then we’ll need to tell Ninject which provider repository to inject whenever one is requested.

So lets get started!

More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 18, Adding NHibernate

3 Comments

Here is the long awaited post that deals directly with adding NHibernate to our MVC2 template project. This post will present the code that gives our providers (Membership, Role, and Profile) access to the database. This implementation of the IProviderRepository interface will use NHibernate.
More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 17, Adding Provider Repository Specifications

2 Comments

In the next three series of posts we will be adding NHibernate, Fluent NHibernate, and NHibernate.Linq to our template. This specific installment on building a MVC2 template we will update the Nehemiah.Specs project. This project contains all of the specifications for the template. We’ll add the specifications for the provider repository. The provider repository is the data layer that supports our membership, role, and profile providers. The specifications are not unique to any data layer implementation. As such you could easily switch out the NHibernate provider repository to a LinqToSQL repository (which I have already done) without changing the specifications.

More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Adding NHibernate to our MVC2 Template

No Comments

The post on adding NHibernate to the MVC2 template is working out to be a huge post. Because of that, the NHibernate installment will be made in at least two posts, but no more than three. I expect to have the first post ready for Monday, Oct 18 and the follow up post to be available on Thursday, Oct 21. If it takes three posts the third one will be available on Monday, Oct 25.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 16, Fun With NHibernate

2 Comments

In the last post on building an MVC2 Application Template we stopped just short of implementing the repository for the membership, role, and profile providers. I have all the code and specs written for an NHibernate implementation of the provider repository. Issues started arising when I began validating the specifications. Those issues are presented here.

More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 15, Adding Ninject

No Comments

Our last post saw the creation of two logging services utilizing NLog and Log4Net. In this post we’ll add Ninject to our template and use it to inject the logging service of our choosing.

Let’s not kid ourselves.  Most of the development work on an application is done after deployment. No matter how well written the original application is, someone will be replacing part of the application sometime in it’s lifetime. If you’ve ever worked on a project where you’ve had to change the data repository or logging service or email service, you know how frustrating it can be when the core code and your service (i.e. data repository) are tightly knitted together.  We touched on this subject in our previous post, Part 14, Services and Interfaces.

More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 13, Finishing the Custom Profile Provider

No Comments

In part 13 in the Nehemiah Project series we’ll complete the Custom Profile Provider. The profile provider is a generic storage feature and gives our web application the ability to store unique user information. In the profile we can store such items as a web layout, color scheme, zip code, or billing and shipping addresses.

Then why write the custom profile provider. Well, to give us options. If you don’t like the way the SQLProfileProvider stores data you now have your own method. Or if you need to retrieve the data from an existing database or service you have an example of writing the specs and an implementation that can be modified to suit your needs. More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 12, Finishing the Custom Role Provider

1 Comment

We began writing the custom role provider in part 9 of this series.  In today’s post we’ll finish what we started in part 9. This will be nearly all code and no fluff commentary. Ok, maybe a little commentary.

When I initially ran through this exercise I had a separate repository for User, Role, and UserInRole. Which I felt was a bit ridiculous since these three will almost always be used together and I didn’t feel the need to pass a separate repository for every POCO that might be read or modified from our data repository.  So I merged all of them into the IProviderRepository interface. These are the kinds of things you run into as build and learn as you go. More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 11, Finishing the Custom Membership Provider

No Comments

In part 8 of this series we began creating a custom Membership Provider. We’ll finish our custom Membership Provider with this post. This entails expanding our specifications, finishing our membership provider code, and writing a mocking class for our data repository. More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Building a MVC2 Template, Part 10, Adding a Custom Profile Provider

No Comments

This is the third post on adding custom providers to our MVC2 template project. This post will simply setup the skeleton specifications and code for our own custom profile provider.

Add a class file named ProfileProviderSpecs.cs to the Providers folder in the Nehemiah.Specs project. Here’s our specifications for the custom profile provider. More

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)