# 75 - Introdction to S#arp Architecture


1/6/2009
Level: Intermediate
Tags: NHibernate ASP.NET MVC
Comments: (9)
Author:
Kyle Baley
 
Presented By:
Manning Publications


In this episode we will give you an introduction to the S#arp Architecture for the ASP.NET MVC Framework.

This is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product
Click here to Watch this Episode

Download (30.46 MB) (11:33) (1440x900)
Download (19.38 MB) (11:33) (960x600)

Links/Resources:


Comments: (9)

Joe Young said....

I am currently watching this and the autor mentions that your controllers should be in a seperate assembly. I don't understand this thinking and would love some more explaination on this reasoning.


1/9/2009 7:49:07 AM

Kyle Baley said....

Joe,

There's some debate about that actually. Check out the discussion thread on it here: http://groups.google.com/group/sharp-architecture/browse_thread/thread/16c953466e2689b2/983ac8af9dfb7a72?hl=en&lnk=gst&q=controllers+assembly#983ac8af9dfb7a72


1/9/2009 8:15:10 AM

chris said....

I did exactly the same, just with a customer table.

Select's work, but creating new or updating existing always leads to this error:

System.IndexOutOfRangeException: Invalid index 4 for this SqlParameterCollection with Count=4.

Does anybody knows what I'm doing wrong?

 


1/11/2009 10:37:19 AM

chris said....

I found it, searching for ~5h? well, it was a stupid copy/paste error:

Map(x => x.Firstname, "cFirstname");
Map(x => x.Lastname, "cFirstname");

(first and lastname map to same column ...)

thanks for the dimecasts, they are excellent!


1/11/2009 10:54:41 AM

Wes said....

Thanks for the dimecast.  I've been playing around with the architecture for a bit now and i have to say that it is still definately in its infancy.  The lack of strong examples (northwind w/CRUD is a joke) and limited community support kills any immediate benefits. I would be very interested to see a dimecast on implementing search capability since this is one of the major missing examples at this time. 


4/13/2009 9:04:40 PM

Kyle said....

Wes,

I think that's an issue with nomenclature. It's not so much an architecture as it is a starting point for MVC apps with some useful base classes. Almost any question that asks, "How can you do this in Sharp Architecture?" can be generalized to "How can I do this in MVC?" I just started an MVC project that doesn't require a database. I used the Sharp project template to create my starting structure, then ripped out all the data access classes and the CRUD project. The benefit is that the projects are all there with references set up and I can still use the testing helpers. Made it a lot easier than starting from scratch with a single MVC web application project.


4/16/2009 12:38:04 PM

Wes said....

Kyle,

I agree and believe that i overstated the limitations of Sharp Architecture.  After reviewing numerous tutorials on Asp.net i came to the realization that like you said the Sharp Project is a starting point.  I was expecting it to be more like Codeigniter which i'm very familiar with.  Nevertheless, i'm quickly beginning to love the Sharp Project. 

Still having problems implementing search functionality, mostly related to my lack of knowledge in regards to asp.net mvc.  Just can't seem to put a search into place that utilizes pagination using nhibernate. Thanks again for the dimecasts.


4/16/2009 2:24:53 PM

Yazilim said....

I have to admit i liked wat i just saw.

NHibernate, MvcContrib and the default creation of all the projects like Controllers, Core. I suppose i have to S#arp Architecture with MVC from now on.


4/17/2009 1:57:01 PM

Ruchi Khanna said....

Where can we view the other videocasts  s#arp with webservices?


4/29/2009 5:50:10 AM


Name: *
Email (not displayed): *
Url:
Comments: *



So, you Human...?



Submit this story to DotNetKicks