how do you guys setup when developing a module [simple]

Topics: Customizing Orchard, Writing modules
Jun 22, 2011 at 11:32 AM

Simple question,

I have the latest source listing (via TortoiseHg) for orchard. I want to develop a module.

But now, if I debug Orchard.Web I will have to setup a new site first? Is this how you guys do it?

Somehow I would rather not change anything in the src listing, apart from the modules I'll write. I'm building two sets of modules for two different sites. 

Is there a way to reset Orchard.Web? Or would I keep a clean copy of the original source, then make a copy of that repo for each set of modules I make? Would my local copies still be able to hg pull updates from codeplex?

 

Thanks

Jun 22, 2011 at 12:43 PM

I usually create my web site and start working on the module. If I hit a road block, say I don't want to create migrations for fields I discovered to be missing from my Record, I just delete everything in the AppData/Sites and start again.

You might be able to create a backup of everything you have in AppData/Sites after a clean install, and when you want to start fresh, without recreating everything, just shut iis or webdev down, replace the existing files in AppData/Sites, for SQLCe.

For a Sql Server I think you can easily restore a database backup instead of the db you are currently using.

Jun 22, 2011 at 12:46 PM

Your local copy should be able to pull from the hg repository just fine. orchard keeps everything content related in the AppData folder and in the db. SQLCE db is stored withing AppData/Sites. Sql Server DB is stored on SQLServer.

Jun 22, 2011 at 6:41 PM

excellent, pretty much exactly what i was looking for thanks so much :)

Jun 22, 2011 at 7:13 PM

If you're working on a number of modules and want to keep them in your own source code control, it's helpful to use NTFS junction points so your modules are physically on a different path but also appear in the Modules folder.

Jun 23, 2011 at 8:23 AM

yea i used symbolic links to accomplish having modules under SVN but working in Orchard Source

Jun 26, 2011 at 3:08 PM
randompete wrote:

If you're working on a number of modules and want to keep them in your own source code control, it's helpful to use NTFS junction points so your modules are physically on a different path but also appear in the Modules folder.

Can you elaborate a little on this one? It sounds useful to me.

Jun 27, 2011 at 11:32 AM

The easiest approach to this is get CreateSymbolicLinks.cmd from Media Garden, and see the very brief documentation here: Setting up symbolic links to your Orchard enlistment

It's in the root of the source tree; just customise that file for your own modules - I have several copies of it locally for different projects, and then another batch file that calls each of my CreateSymbolicLinks.cmd files with a parameter of my default Orchard location. The parameter allows it to easily be used for multiple Orchard instances.

Jun 27, 2011 at 2:22 PM

Thanks you very much! I was not aware of this. Very useful ;-)