For those of us building large applications with multiple teams it is nice to be able to separate a solution into multiple projects and modularize it. Asp.Net MVC3 does have a built in way to separate out sections of your project using a feature called "Areas."
To create an "Area" in the MVC3 app there is a template. You right click on the solution and choose Add -> Area. A dialog comes up to allow you to name the area. Once you are done the template will create the Area in an "Areas" folder in the MVC project. If you don't already have an Areas folder it will be added.
If you read my previous blog post about the trials and tribulations of providing a connection string to the Entity Framework context in a multi-tenant SaaS app you will see that reflection magic was needed to get where I wanted to go.
Now for the next problem. I haven't solved this one, so please HELP.
The multi-tenant app implements the concept of what we call a portal. Each tenant has their own portal. Each customer is assigned a portalID when we set them up in the system.
A multi-tenant application is generally defined as a single instance application that serves multiple tenants or user organizations from a single IIS application instance. Each tenant has their own set of users and company data. It would be very bad if a user from tenant A could see tenant B’s data.
There are several ways to implement such a system especially in regards to the database. The two basic schools of thought on the database is have one for the application that contains all tenant’s data on it partitioning the data using a tenant field on each table.
That which we call a namespace by any other name would organize our class hierarchy.
When creating an Entity Framework model the add item wizard prompts you for two names.
The first is a text box on the "Choose your data connection page." It is at the bottom under a check box labeled "Save entity connection settings in App.config as:". The name defaults to your database name with "Entities" appended to it. If you uncheck the check box this text box grays out not allowing you to edit the value.
In Visual Studio when you add a folder to a solution, and then add an item into that folder the namespace on the generated item includes the folder name.
For example, if I have a project named Project1 with a folder named Folder1 and I right click on Folder1 to add a new class... the namespace created in that file is generated as:
namespace Project1.Folder1 {}
While I want to organize my code files inside my project... I really don't want the folder hierarchy to build a namespace hierarchy. I assume for some people they do this, or want to do this.
Today I upgraded our ASP.Net 2.0 project from Visual Studio 2008 to Visual Studio 2010 targeting .Net 4.0.
I ran into some issues and just wanted to list them here so others might be forewarned.
Today I upgraded my web site to Drupal 6.16 and all my out dated modules as needed. This takes me to long cause I don't do it very often. So I have to remind myself where I have everything stored.
I would put it here, but I think that would be TMI. ;)
I guess if you follow my blog you might wonder where I've been. Well, I'm still here plugging away. But, I'm not very verbose. If I find something exciting and worthy of sharing I will blog it.
However, I am going to make an effort to blog more. I have been concerned that if I don't provide value that it's not worth sharing.
I use the brilliant NotePad++ editor. It is free and very light weight. So, I wanted to configure svn to call NotePad++.
There are several ways to specify an editor for svn. You can use environmental variables, the registry, specify it on the command line or within the subversion config file.
Specifying it in the config file made the most sense to me. I am using Windows 7 so the config file can be found at:
\Users\YourUserName\AppData\Roaming\Subversion
If you are running with the default windows explorer settings the AppData folder is hidden.
I am an avid reader and Kindle owner and am always looking for a new author to add to my list of favorites. I recently saw a thread on my favorite forum over at MobiledRead.com about a book for $.99 and while I don't buy every book for $.99 this one was highly recommended by some of the members. It turns out the book was a sequel and the first book was 1¢. Yes a penny. So I bought the two books for a buck.
The books are [Soul Identity][soulid] and [Soul Intent][soulintent] by Dennis Batchelder.
For me surfing the web and trying to remember a different password for each site is a difficult if not impossible task. So, I did, what I'm sure many people did, I used the same login credentials at most every site. I did this with the exception of my email, bank, paypal, brokerage, and other sites where my private information was critical.
However, I knew in the back of my head this wasn't the most secure method. While I have an OpenID very few sites support it today. In addition it isn't to the secure level where a bank or brokerage.