Welcome to blog.chinoy.com Sign in | Join

August 2008 - Posts


Every so often, I get it in my teeny little head that I can write code.  This is probably due to the fact that I once, in ye olden times, wrote what then passed for as code.  So, my wooly brane says: Write some code!  These thoughts come to said head over the weekends and I figured I should at least write aboot what I've done this weekend so it doesn't, as so many others have, fall into disuse in a lonely directory of my harddrive.  At least the embarrassment of having shown it to the 2 people who read my blog (hi mom!) will motivate me to continue messing with it.

This weekend is "CRM Helper" - a windows forms application to help CRM Developers restore, import, publish, build, deploy, and load data into an organization so that they can develop and test.  A big fat caveat here is that this app draws heavily from the command-line only versions of these applications created by one Mr. Jack Hand.  So, with that said, you can take whatever this is with a grain of salt.

This was my design process: Wake up at 8:30a on Caturday, think & draw until about 9:30a, go hang out with WSJ on Kindle, Rocky Patel and Abigail, then come back and program for a few hours.  Sunday, repeat, with some variation.  This is what I ended up with:

Goals of this weekend's project were to:
  • Create a one-stop-shop app that could do all steps involved in a full restore to deploy to create a test/dev-ready organization
    • Restore a CRM Organization from a database backup
    • Import & Publish CRM Customizations
    • Build the CRM project, deploy to the server, register plugins
    • Load in Sample data
  • Refine each step into a more wizard-like process so that the intricacies of the various steps aren't a knowledge prerequisite
Future goals are to:
  • Have one big red button that does it all (chains all steps) for a non-developer audience
  • Use the Crm Deployment API to restore orgs
  • Allow remote usage in addition to on-server usage
  • Create libraries out of the command-line code
Parts that are working (but I'm not happy with) are:
  • Preferences - this is actually fairly good, but it's missing organization (and a "Microsoft" style), and persistence
  • Restore Database - calls an osql command as expected, could use some threading
  • Import & Publish - calls crmimportpublish.exe, and needs to be turned into a library and threaded properly; too many windows, can shorten
I always learn a whole lot more about .NET and winforms programming along the way, so my major challenge is to keep on focus and not spin off into how to best thread a process or best persist settings.  For me, once the core of the app is done (all features work, maybe not as expected, but work) the I can go back and refactor and optimize.  Refactoring and optimizing before the first cut of the full scope of the app has been done has, in my experience, tended to slow me down and discourage me from completing something, feeling like I have to go back and add in the latest thing I've learned.  Granted, that's not always completely true - if I find something compelling enough, I will refactor, it's just a risk to the first-cut scope being completed.

Next steps here are to make sure all parts work and then persist settings.  Major refactoring comes in right after that.
0 Comments
Added lightbox2 (finally).  Since I'm still using a fairly old edition of CommunityServer, I keep forgetting where various settings are.  I had to add css and js's for lightbox as well as modify the LayoutTemplate.ascx (in the Themes dir) and the communityserver.config (in the web root) to accommodate for the "rel" attribute in the anchor tag.  Without the setting to allow "rel" attributes in "a" elements, CS was stripping the necessary annotations for lightbox to function.

Completely boring non informative post.
0 Comments
0 Comments