CodeGarden 10: The sixth annual Umbraco Developer Conference
June 23-25th 2010 - free ASP.NET MVC pre-conference. Register today!

How to create an umbraco application - The basic steps

This is minutes from cg09 open space, so should not be considered a complete tutorial</h4>

Basically an umbraco application consists of a tree and a set of .aspx pages to handle the data you want to manage. The tree of course manages what is possible e.g. create, delete etc. and to load the respective pages in the dashboard area. So here are the basic steps in creating an umbraco application.

Step to create an umbraco application pre v4.1

- Overwrite BaseTree and create your own application tree
(/umbraco/trees here you can find all umbraco trees - interesting trees: FileSystemTree)

- You can attach to tree events (Shannon will add this to his documentation on the new tree)

- Add in database table umbracoApp and umbracoAppTree (this is actually the installiation of the application) We will make package actions available for you to install your application  (important that alias in db is the same as the string alias name of the the tree that you have)

- Customize your tree. Let's start by adding a simple Create action - Create your custom .aspx editor page for adding your own editing controls

- if you want it to look umbraco-ish add namespace...

- Set Action property of a rendered node in tree class to be a javascript call to load the content frame's URL location to be that of your editor page and pass in the NodeId in the query string (Example: '/data/packages/...') 

- Create a user control
- implement ITaskReturnUrl to handle the creation of your node/data item must return URL of your edit page with id in query (same as setting action property)
- Add the CreateAction.instance to your nodes action list in the tree class you have created in order for the 'create' to appear in the context menu
- Add to /umbraco/config/UI.xml your user control path and alias of the tree (in the db) (A package action to modify the UI.xml file will addad for your comfort)  

Step to create an umbraco application v4.1

In the upcoming v4.1 of umbraco core member Shannon Deminick has refactored the tree so it in the future will work a lot smoother.

This however does change some of the stuff mentioned above, so Shannon please insert 4.1 new stuff here :o)