How to analyze Kentico 7 installation for dependencies and custom web parts - analysis

Using Kentico for the first time and have inherited a version 7 project with custom web parts. There are folders with .cs files, folders with .dlls, and folders with .ascx/ascx.cs web parts. Most are active. Some are not.
What's the best way to assess what is used and what is compiled when looking at a Kentico instance? I'm trying to sort what Kentico stores for configuration, how Kentico knows what to compile, and how Kentico provides a pathway for custom ascx/ascx.cs webparts to use (via using) various libraries in folders on the Kentico instance folder structure.

Having worked with Kentico for quite a while it's pretty easy to identify them simply by looking in a few directories.
If you haven't worked with it before you might try to do a fresh install of version 7 which you can get from the Kentico Client Portal and compare them.
If the install was done with best practices, you can look in the following documentation and the "custom code" should be in the green and blue directories in the documentation.

There is an open-sourced utility called KInspector (it`s made by Kentico consulting team). This utility should show you your custom code (among the others) in Kentico instance (afaik it is in the Analysis module).

Related

Umbraco class library and Web Site

I have a project I was brought onto a few years ago and the original developer is no longer available. We have an Umbraco 6 based website. The solution has two projects, a Web Site and a class library call Umbraco.Extensions. I believe I read some conventional wisdom pertaining to Umbraco at some point where it is recommended to split it up like this but I am looking for more information about this particular style of setup and how it is supposed to work. For example right now I am dealing with a missing assembly issue, and i fixed it by copying a dll from the bin of Extensions to the bin of the Web Site. How is this handled regularly?
it's generally a good idea to keep the projects separated. You should have some kind of automation (maybe a post-build action) to copy the dll of the class library to the bin of the umbraco project. Or maybe rebuild the umbraco project with the correct references, but I dont usually do that.

.net architecture for module based solution

I'm in the research/planning phase of a project (.Net c#, mvc or silverlight). It's a web project that offers certain services bundled into packages. The client can sign up for one of the different packages.
I'm looking for any suggestions on which architecture/framework to use for this kind of project. I want the ability to load or unload modules depending on the package. I also want to be able to enable and disable features within the packages themselves.
The modules have to be highly portable and plug-able into different clients. I know there are MEF and Prism but I haven't really worked with both. I also read about MVC and Areas. I would rather design everything from scratch and not depend on a third party if the task is simple enough. I just don't know where or how to start.
I appreciate the suggestions.
MG
You can forget about unloading. You have to use seperate appdomsins to be able to unload modules. And that's nothing that I would ever try with a ASP.NET website.
You have to get used to the thought that all modules are loaded at all times. You can use role based security to control if a user can use a module or not (one or more roles per plugin).
As for loading things dynamically: I've written an article about how you can create a plugin system using my Griffin.MvcContrib: http://www.codeproject.com/Articles/386674/ASP-NET-MVC-3-plug-in-architecture-using-Griffin-M

upgrading asp.net mvc apps

Upgrading MVC apps done with VS 2010 has been the biggest issue for me. I have an application that I use to run various websites and I maintain and develop this application separetely then upgrade the sites based on it. A lot of things might change during development of a new version - new Views, new Controllers, stuff added into JS files, updated stylesheets etc.
I've searched around the web but nothing useful came up besides this Haack's article but no source code is available.
I also tried making a Nuget package for the entire MVC app and while this works, it doesn't package up the resource files (an issue within Nuget itself) and my apps rely on those so until this is fixed I cannot use this method.
I checked how others do it and this pretty much summarizes Umbraco's way and it's the same painful way of a dozen of steps like I do it now.
Do you have any good advice on it?
You don't specify the target OS, but I create native packages, i.e. .deb for Ubuntu servers.
However this still means you need to specify all files, manage configuration, upgrade database schemes. But if you test this on a CI server it becomes more reliable, and you can do it iteratively. This is all part of good deployment practice. I can recommend the Continuous Delivery book.

Best way to share an ASP.NET MVC Azure project among 3 PCs?

I zipped an ASP.NET MVC Azure project up and copied it to another computer (both have VS 2008). I thought I could just unzip it in "Documents\Visual Studio\Projects", but I can't quite get it working. My site builds, but the browser doesn't see the master page or Site.css. Should moving projects around as Zip files just work?
My real question is, what's the best way for one developer to share an ASP.NET MVC Azure project among 3 different computers? Should I use something like Dropbox or Live Mesh? Or, github maybe?
OP here. The problem was that "Static Content" was not enabled in IIS on the second computer. The latest installation instructions for Azure (March '09 CTP) omit this crucial step. The first computer originally ran the Jan '09 CTP, whose instructions included the step about enabling Static Content. Moving projects around by zipping them up seems to work fine.
I love using git and github. I've shared my code among many computers with it. This was C# with Visual Studio solution files, so it sounds very similar to your situation.
Of course, I love git for source code management. I'd recommend it to anyone, but there's a decent learning curve if you're new to it. I can recommend resources that helped me, since it was really only about 8 months ago that I delved into it for the first time.
If you're not looking to adopt git as your source code management tool, then you might want to look at other options for moving code between machines.
Perhaps your IIS virtual folders are configured differently on the machines? You said it builds, but does not run. This suggests that configuration of the web site itself might differ between the 2 machines (and we're getting into some things I'm not aware of about how ASP MVC works at this point).
Yes, moving projects around in a zip should work assuming all of your files are in the subdirectory you zipped up. Sometimes you might add files to your solution that aren't in the subdirectory, and that can cause problems. References to other files need to be relative, instead of absolute.
A problem you might encounter is if both of you edit the same file, or accidentally overwrite an edited file with one from a developers machine that doesn't have that change yet.
Most developers use a source control system to share projects. Git is a fairly new one that has a growing audience. Subversion has been around a little longer and is very popular. Visual Studio integrates with TeamFoundation Server.
ProjectLocker.com offers free subversion hosting(so that you don't have to setup your own subversion repository).
Codeplex.com offers Team Foundation Server hosting for open source projects.
It sounds like the type of thing you see if the app-root isn't an application, or if the application isn't handling virtual directories correctly.
With virtuals; for example, you should rarely use "/foo/bar" - because if your app isn't installed at the site root you'll get unexpected behaviour - you mean "~/foo/bar", but this often needs extra code, as discussed here.

ASP.NET MVC - Script Combine

The ASP.NET team released the script combining feature in 3.5 SP1 as detailed here http://www.asp.net/Learn/3.5-SP1/video-296.aspx. Is there a similar feature already for the MVC framework? If not, is this in scope or is it possible to somehow leverage the webforms capability in MVC? I see this site uses a custom jquery.package.master which, I assume, they have rolled themselves (maybe into the build cycle, however it is not all minified therefore I think they have manually appended the scripts together rather than some automated minify & combine task). Would be interested in any ideas how to accomplish this in MVC but I dont want to begin rolling any of my own functionality in case I will be duplicating work in progress.
Here's what I do, in case it's helpful.
In my postbuild I call a command line version of Dean Edwards's Packer. It combines the scripts and packs them for me.
For now though, I keep all of my stuff seperate and use a Helper method to include my scripts, and if the debug flag is not present it will include the packed versions, otherwise it includes the unpacked.
Another option is in the Telerik Native UI Extensions for MVC (free library and open source), called ScriptRegistar. It will combine and compress javascript for you, and is fairly feature rich. There is also a class for doing the same to css as well.
I am using this to combine +20 javascript files into one file which is downloaded by the browser.
http://www.telerik.com/products/aspnet-mvc.aspx and you can get it via NuGet.
Every day there is a different way of doing things and the techniques changes.
At this time there is a very good Nuget Package released in CodePlex.
Combres - WebForm & MVC Client-side Resource Combine Library
http://combres.codeplex.com/
http://weblogs.asp.net/gunnarpeipman/archive/2009/07/04/asp-net-mvc-how-to-combine-scripts-and-other-resources.aspx

Resources