So far, you have been reading up a lot of stuff about MVC.
Assuming you are following the set sequence at our reading order link (find it
here), you have all the essential knowledge to figure out the part about
creating a new project in visual studio.
Under visual studio ( usually run visual studio as
administrator) , you will go with File > New > Project > Web . When
you do this, you will be presented with a number of web development options
(including those related to Azure development). Here, go ahead and choose ASP
DOT NET MVC. Before you continue with the actual project creation, there are
some other components on this page. Let’s explain them a bit.
Even if you are not familiar with it, analytics is a big
part of any application that will be deployed. Analytics allows those who are
managing the application to figure out which sections and which methods, which
pages, which apis (and the list just goes on and on) are being accessed by the
user during application usage.
Google Analytics is probably the most used analytics package
and it works with almost any web enabled app. Application Insights (a cute name
for sure) is the Microsoft version of analytics stuff. So, when you are
creating a new project, you could leave this box checked, to have the necessary
libraries included in your project. If you are planning not to do analytics
(which you probably don’t wish to when you are just learning MVC or your client
does not care for analytics right now) or planning to use something else (like
Google Analytics), you should uncheck this box.
I have written about version controls (this is separate from
software versions) and git in some of my posts. You can find them here.
As with application insights, visual studio allows you to
attach the necessary git files into your project from the word go. If you are
using version control in your software development, you will probably want to
leave it checked. If not (actually, I cannot imagine any software developer not
using version control but you know, to each his own) then leave it unchecked.
For some reason, I don’t like to use GUI tools for version
control. So, I actually leave the ‘git’ option unchecked. Then, I use the
gitbash command line tool to do the version control, after the project has been
created. So, that is how roll. You might be different.
Of course, you will also have the option to choose the
project location on your computer. I usually leave it where it is.
You should also give it a meaningful name. I never leave the
default project name, as it makes me look lazy and it comes bundled with all
the problems associated with not having a meaningful name.
Okay then, once you taken care of the above, you will be
presented with a big box with lots of options. Obviously, you will select MVC.
Along with there are some more options here.
Making things easier is a running theme when it comes to
visual studio, as it should be with any IDE that wants to be cool (and visual
studio is already the living incarnation of coolness). Keeping that in mind,
Microsoft allows you to include a pretty powerful authentication system and
bundle it into your project from the word go.
There are four options here. Usually I go with ‘Individual
Authentication’ for two reasons. Mostly because most of my projects have used
individual authentication system (where you have the standard username and
password system that is created by the user). Further, it also provides
Facebook and Google and other login systems. Which is also cool.
Another reason why I like to leave ‘Individual
Authentication’ on, is because it gives a ready to use connection string (which
you will find in web config) for future use. I know it’s silly but well you
know, I just like it that way.
You will also notice that there is an Azure hosting option
provided. As always, this can be useful, just like the authentication system.
However, I have noticed that doing the Azure thing even before the project is
built is kind of unnecessary. Also, sometimes visual studio does not work all
that well with your Azure management portal. In addition to that, I really
doubt that your office or manager or IT will give you direct access to Azure.
So, most of the time you will leave it unchecked. However,
if you are checking out Azure, then you will keep it checked, and let it do its
Yeah, leave it unchecked for now.
Okay, now that you checked and unchecked what you want, the
project will be created for you. Depending on your computer, it may take a
minute or up to 5 minutes. So, be patient and let it do its thing.
Once it loads, before you do anything else, just build the
project and run it. Then, do your other development stuff. If you have enabled
authentication, in the website that is running, register and login. If that
works, that means the connection string is working which in turn means, the
database is working fine and it also means entity framework is installed and is