I have just began utilizing a content management systems (N2) with a template fundamental implementation using an internet site project template in vs2008. I have observed that after producing it it requires considerably longer than utilizing a web application project that we am more use to.
My questions are:
- How come it appear to consider considerably longer to compile?
- What's best to make use of?
- Must I convert it into as being a web application?
I apologise if this sounds like a replica however i could not look for a similar question.
The Major variations are:
Inside a Web Application project things are pre-put together all of the codebehind pages is going to be put together right into a .dll ---- Inside a Site Project nothing within the project is pre-put together, the compiler will compile everything to make sure it is valid but no put together pages are submitted. Whenever a user first tries to access the website each page is put together into its very own dll. What this means is inside a Site Project you'll be able to upload just one codebehind file.
Namespaces - Inside a Web Application project namespaces are produced automatically inside a Site Project they aren't.
Project files - An Internet Site Project doesn't have a "cproj" file a Web Application project does.
Transforming to some Web Application project could be harder then you definitely think particularly if you depend heavily the appcode folder.
Personally, i should you prefer a Web Application projects I've found them simpler to make use of and fewer annoying to deploy. I'd personally just use site project on something really small and straightforward.
Extra reading through from MSDN
Additionally towards the info supplied by Chris, it's also wise to observe that for Web Application Projects, Profiles aren't available as they are:
There's a workaround available here: http://code.msdn.microsoft.com/WebProfileBuilder
Essentially, the net Application Project doesn't have the Profile object instantly put into each page just like the site project, therefore we cannot get strongly-typed programmatic use of the profile qualities defined within our web.config file.
My preference is by using Website project over web application. I mainly depend on "View in Browser" to complete the page throughout development and never f5. I'm able to leave the browser window open and modify code without closing the runtime browser. Usually if I have to debug I attach the IDE towards the appropriate process. In my opinion it a lot more efficient to get it done by doing this rather than compile and restarting the application each time I must compile or make changes. This really is magnified much more when the application includes a login page. Requirement for signing in is prevented each time F5 is pressed - granted you will find ways to put it together. But preference isn't to.