I am new to Umbraco 6 and relatively new to MVC as well, so have a naive question. We have websites that used 4.7.1 and web forms. There we used to create a User Control, deploy corresponding .dll and ascx forms and add a macro using .net control in CMS. What is the equivalent way of achieving the same in Umbraco 6 using MVC framework?
Note: I am using Visual Studio to install umbraco 6 in local. Planning to keep the same in subversion and deploy needed files from there.
To summarize the questions:
1) What files/folders do I need to keep in Subversion for a v6 website, so that replica of same website is maintained in local and host server?
2) What needs to be deployed over host server? i.e. Do you deploy views separately, and the Model+Controllers get deployed with the website .dll?
It is basically the same as a webforms project. All files with a .cs extension will be compiled into your project DLL. (Models and Controllers). Macros, views and partials (and any other files with a .cshtml or .aspx extension) need to be deployed to the webserver.
You can set up the SVN in the same way. I use Mercurial but as an example here is my ignore file to show you what I exclude from source control (mainly auto generated files, include any files you actually work on)
#
# Offroadcode's Mercurial Ignore file
# visit /blog/2012/4/5/mercurial-ignore-file-for-umbraco/ for updates/additions
# Thanks!
#
##### File globs to match ####
syntax: glob
# Data folders/files
*/ExamineIndexes/*
www/App_Data/umbraco.config
*/App_Browsers/*
*/_systemUmbracoIndexDontDelete/*
*/App_Data/*
*/umbraco/*
*/umbraco_client/*
# Dll's and related C# crud
*/bin/Debug/*
*/obj/Debug/*
*/obj/*
*.pdb
*.user
*.DS_Store
# Resharpener
*_ReSharper*
# ImageGen
*/Cached/*
www/media/*/Cached/
# Misc crud
*.orig
*/Thumbs.db
*/log.txt
# For safety's sake
web.config
# Visual Studio goodies taken from (http://stackoverflow.com/questions/4095696/mercurial-hgignore-for-visual-studio-2010-projects)
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.cache
*.ilk
*.log
*.lib
*.sbr
*.scc
[Bb]in
[Dd]ebug*/
obj/
[Rr]elease*/
_ReSharper*/
[Tt]humbs.db
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.resharper
Deploying an Umbraco 6 website with controllers
Hi,
I am new to Umbraco 6 and relatively new to MVC as well, so have a naive question. We have websites that used 4.7.1 and web forms. There we used to create a User Control, deploy corresponding .dll and ascx forms and add a macro using .net control in CMS. What is the equivalent way of achieving the same in Umbraco 6 using MVC framework?
Note: I am using Visual Studio to install umbraco 6 in local. Planning to keep the same in subversion and deploy needed files from there.
To summarize the questions:
1) What files/folders do I need to keep in Subversion for a v6 website, so that replica of same website is maintained in local and host server?
2) What needs to be deployed over host server? i.e. Do you deploy views separately, and the Model+Controllers get deployed with the website .dll?
Hi M,
It is basically the same as a webforms project. All files with a .cs extension will be compiled into your project DLL. (Models and Controllers). Macros, views and partials (and any other files with a .cshtml or .aspx extension) need to be deployed to the webserver.
You can set up the SVN in the same way. I use Mercurial but as an example here is my ignore file to show you what I exclude from source control (mainly auto generated files, include any files you actually work on)
Thanks for the prompt response Barry.
is working on a reply...