1
votes

Complete Sitecore newbie here i'm afraid. I've downloaded Sitecore 8.2 and have set it up to run through IIS which works fine. i have 3 folders

-- data
-- databases
-- website

I have created a TDS project in vs2015 and can sync with Sitecore. I want to create a new MVC project in my vs solution and then I presume publish it to the website folder of Sitecore, but Sitecore comes with a lot of files / dlls etc already in there. I'm wondering what type of web project I create in vs2015 and how I get the existing files into the web project. Do I simply create an MVC web application and copy and paste them over or is there a different way of doing this?

3

3 Answers

0
votes

Yes. you can initially start with a simple MVC application. You dont have to include all the config files in your project.
That being said, you should include the config files that you customize or create.
The most common one would be yoursite.Config that should have the site details . As your site keeps growing or if you add something like glassmapper or sitecore ship - your App_Config files will keep getting added.

0
votes

It all depends on how you want to structure your application. I would suggest to create an Empty MVC Project within the same solution where your TDS project resides. You can also create Class Library Project which stores the business logics

Then you can structure the different folders such as Views, Model and Controller and additional folders if required. I usually has a folder named Lib where I store all the Sitecore Assemblies that I required in the project. For example, I will have Sitecore.Kernel.dll in the Lib folder. Then, I add it as a reference in the project.

Note: The Lib folder is not included in the project.

When you compile your solution, it should only copy the assemblies, views and configuration of your projects to the respective directory. This can be done by using TDS to deploy the files to the website inner folders.

0
votes

No, you should never get Sitecore into you Source control, you just need to create your web application and deploy it on top of sitecore (be careful and check you are not overriding web.congif, global.asax, etc) I would recommend following the latest best practices as described here: http://helix.sitecore.net/principles/visual-studio/index.html You will be hearing Helix and Habitat everywhere, so get used to it.

It's not mandatory, but these are becoming the standard in the Sitecore world. You can always adapt it to your own preferences and requirements, but following this practices will make life easier for you and whoever inherits your project.