Prep-Work to Developing An Orchard Module

In my last post, I discussed the need to perform some custom development within the Orchard Platform to provide specific functionality in the form of a widget that the site owner could include in pages within the site.  The Projector Module, though very customizable, did not allow me the flexibility to inject a precise html structure based on a list of content items.  A module called Featured Item Slider from NimblePros had very similar functionality that I was looking for, so I decided to roll up my sleeves, pop the hood to all the goodness that is Orchard and dare to build (or at least adapt) a custom module.

To do that though, there are some steps to take before hand.  You need the ability to debug the code and the Web Matrix IDE is just not going to be adequate enough; especially considering my crutch to using F12 on objects in Visual Studio 2010 (Function Key F12 traces an object back to it’s declaration from within code).

Here are the steps I took to get Orchard’s source code on my machine in an attempt to build a custom module:

  1. Getting familiar with the Source Code strategy
    So I joined up with CodePlex and read up on some tutorials on using Mercurial the source control system that Orchard/CodePlex is using.  The TekPub episode to Mercurialwas a valuable resource; the video quality is poor, but the content is enlightening to new users.Installed TortoiseHg and VisualHg to allow me to pull the source code and work with the repository within VS2010.

    Steps to creating a repository for the code (using TortoiseHg):
    While the functionality is the same between versions, the tutorial shows an outdated version of TortoiseHg.  Don’t let this hinder you understanding the concepts!

    1. Create a fork in the Orchard Project and clone the forked repository (TekPub episode @ 23:18).
      Or if starting a new Project (this is not related to Orchard development but good to know):
      Create repository in solution directory of project (TekPub episode @ 5:17)
      Keeping in mind that:

      1. The .hg folder that is created is the repository
      2. The .hgignore file represents all the files Mercurial should not track.
    2. Enable Visual Studio Integration for VisualHg (TekPub episode @ 8:37)
      1. Enabled in: Tools | Options | Source-Control | Plug-in Selectionimage
      2. To commit changes right-click on the project or file and select commitimage
    3. Sending code changes back to CodePlex (TekPub episode @ 17:32)
      1. Use the Clone URL from your CodePlex fork with the Synchronize command in TortoiseHg/VisualHg.
        image
  2. Fork the Orchard Project to my development branch titled DebuggingEnvironment and Clone it to my development machine (using Steps in 1A above)
    I now have a branch of the project in CodePlex that I have cloned to my local development machine and can begin creating a module.

In my next post, I’ll explain how to actually create a development module within the Orchard Project.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s