Plan for Chaos

I don’t know how many times I’ve walked into the following situation. A client asks us to come in to help solve a relatively straight forward problem they are having on their intranet. The first thing they do when showing us the existing functionality they need fixed or enhanced is to open up to the home page. Click on the menu. Click on the next menu. Click a link on that page.

Client 1 (Let’s call him Chuck) says, “Oh wait sorry that was the wrong link. Bob am I in the right place?”

Bob chuckles, “No I think you wanted to click on ‘Job Metrics’ on the last menu not ‘Job Tracking’.”

Chuck backs up and clicks on “Job Metrics”, then clicks the link on the page. “Here we go.” The client looks me straight in the eye and says in all seriousness, “So this is critical to how we manage the company.”

Wow…A critical piece of functionality for running the business and not only is it hidden three clicks down, but even the client got confused as to where it was. It would be funny if I didn’t see it so much. Now to be fair it isn’t 100% their fault. Companies get their hands on a rich portal and collaboration platform, and before they know it they have an intranet. The parts department sees it and says, “Hey IT, can we have a team site?” A blog here. A wiki there. Anyone for forums? The next thing they know they’ve got a tangled mess where no one can find anything and documents are outdated with no one updating content because they didn’t plan for on-going maintenance so there’s no budget for it, and IT is trying to figure out if that site that accounting had them set up is still being used or if can be deleted, but Marge that asked for it retired last month so nobody is sure, and the whole thing just keeps going on and on gaining momentum like a run-on sentence out of control. (Whew! ) I think you get the point.

So why do I bring this up now? I was just reviewing a brief write-up I did for just such a client. After discussing how to solve their immediate problem, I wrote a quick recommendation in order to facilitate a dialogue about the larger issue. The gist of the recommendation follows with the sincerest hopes that this helps anyone struggling to find critical information on their own intranets. The names, of course have been changed to protect the innocent.

We would also like to recommend that Company X seriously consider investing in a Discovery/Information Architecture project. This can help in two ways. First a discovery exorcise can provide a roadmap for building out the future phases of the Company X portal, at the same time providing an initial Information Architecture that can guide current and future efforts.

As Company X expands the usage of their intranet, it is worth keeping in mind that the primary reason that intranets fail is that information is too difficult to find. Often times when corporate portals are implemented they are grown organically without planning. Information becomes hard to find and it is often the case that old information is left on the server for users to discover, thus adding to user frustrations due to the site providing incorrect information. Many companies tend to feel that since they bought a product that can deliver the rich features that they need, they are done. Remember, any tool exists to be misused.

Investing in a Discovery/IA project at the point where groups are discovering the power of a portal solution can be critical not only to planning out a successful intranet, but also to putting together a plan for growth of a corporate presence. For global companies with multiple locations and subsidiaries, conducting a discovery/IA phase can be the key to promoting a corporate and brand presence throughout the company while allowing local offices to maintain a cultural identity of their own. We all interact with multiple communities every day depending on the task at hand. A well thought out IA can facilitate this multiplicity while a portal that has been put together haphazardly can provide a fractured experience that leads to frustration and the inevitable “going around the system” to get work done.

Restoring Microsoft CRM to a baseline state

Restoring to Baseline

Restoring the Microsoft CRM environment to a baseline state for development purposes requires several steps. These steps are simple but important.

The first step is to turn off any access to the database from the application. Please note that while this document includes all of the CRM components involved you will need to make sure that there are not any other applications or services such as SSRS or SSIS that may be trying to connect to the database.

Many of these actions may be scripted to assist with this process. It is common in a development environment to have one script to handle all of these actions in order to facilitate automated developer builds form a source control system. This only works in the case where all components reside on the same server (usually a virtual server).

STEPS TO RESTORING THE ENVIRONMENT TO A BASELINE STATE

On the CRM web front end and platform servers
* Stop the CRM Async Service [MSCRMAsyncService]
* Stop IIS

On the database server
* Restore the configuration database [MSCRM_CONFIG]
* Restore the working database. The name will depend on what you called it at installation time. Example [My_CRM]

On the CRM web front end and platform servers
* Start the CRM Async Service [MSCRMAsyncService]
* Start IIS

SAMPLE

Here is a sample script that can be used to restore a single server development environment to a baseline state.

WARNING: running this script will overwrite your current CRM database! While this sample doesn’t contain any way for the user to verify that they want to continue or give them a chance to cancel out of the script before running, you should 100% include such code in your process. I’ve provided the basics, it is up to you to enhance and embellish.

WARNING: running this script will overwrite your current CRM database! While this sample doesn’t contain any way for the user to verify that they want to continue or give them a chance to cancel out of the script before running, you should 100% include such code in your process. I’ve provided the basics, it is up to you to enhance and embellish.

REM Stopping services…
net stop MSCRMAsyncService
iisreset /stop

REM Restoring configuration database…
OSQL -E -Q “RESTORE DATABASE [MSCRM_CONFIG] FROM DISK = N’C:\Backups\MSCRM_CONFIG-Baseline.bak’ WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10”

REM Restoring working daatbase…
OSQL -E -Q “RESTORE DATABASE [My_MSCRM] FROM DISK = N’C:\Backups\My_MSCRM-Baseline.bak’ WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10”

REM Restarting services…
net start MSCRMAsyncService
iisreset /start

Baseline Data

While the cleanest and by far simplest way to restore your CRM system is to make a backup before you have added any data or made modification there a re a few points to consider that may aid in the process.

USERS

If you have a set number of users in the environment, it can be helpful to add and setup these users and include them in the backup. This way you don’t need to set them up each time. If you will be using a different set of user each time (For example in a training environment) it may be best to setup just the users that will always need to be included such as administrator.

DOMAIN ENTITIES

Domain entities such as listings of states or countries that do not change over time are good candidates for including in your baseline. Even though these may be custom entities, if they are static and will not change due to design updates they can be considered for inclusion.

As an example if you have a state entity that contains the state name, the two-letter code, and a time zone, this information will most likely not change over time. On the other hand if you are adding several custom fields to the state entity for use in calculations you may want to leave it out of your baseline as it may be subject to updates down the road. (Though honestly if you need to perform calculation based on state you may be better off having a simple static state table, and creating a second custom entity for your calculation fields.)

OOB ENTITIES

There are several out of the box entities that come with a basic CRM installation such as the account entity. You may decide that you would like to setup a simple shell for several accounts using the basic OOB fields to save time as you begin your customizations, or after you load a customized xml file. This is one that needs to be carefully considered and is highly dependent on the situation. You need to have a good understanding of how you are planning to use accounts so that you don’t fill in information that would be subject to change later, but if you fill out too little information it may not be useful.

iPhone 3.0 Beta Review

So we got the beta for the iPhone OS 3.0 and of course I loaded it up despite the warnings from Apple stating that it is only to be installed on development devices. After running it over the weekend I thought I ‘d give a mini review. After all, who doesn’t want to be the cool kid on the bus with the prettiest shiniest toys? As it turns out, in this case I hopped on the short bus. I’ll admit it. Cool technology is my kryptonite, and after a few days I found myself on Bizarro iPhone world. Superman metaphor too much? How about a western one…

The Good

  • Landscape Keyboard: For email and notes this was awesome. I know this didn’t bother everyone, but it was a big win for me.
  • Bluetooth Stereo: Another win. I have a BT stereo headset, and it’s always bothered me that I couldn’t use it with my iPhone. Now I can, and the sound quality is great. For those of you with BT stereo in your cars I could see this being a big win as well.
  • Search: I only used the feature a few times, but when I did it was extremely useful. I was able to search across both contacts and email, and I suspect it would have brought back items form my calendar if there had been a match.
  • New Features: There are far too many new features to go into here, but I can see a host of new applications being inspired by them, and a lot of existing applications getting a boost with items such as the notification framework that lets a server send a message to an iPhone application even when the application is shut down.
  • Cut and Paste: It’s there. It works. What can I say? It’s cut and paste.

The Bad

  • Keyboard Lag: at first everything was great but after a few days I found that the keyboard would freeze while I was typing and it would take several seconds for it to come back. It didn’t matter which orientation I was in and it got so bad that my cool new feature was now the bane of my existence. Even reboots didn’t help.
  • Some of my applications didn’t work: Yes a few of my applications didn’t work with the upgrade. The bad part was when one of them froze the screen and after I thought I had gotten out of it it turned out that the application was still running and eating up a lot of battery power. So much so that when I went to check the phone later on it was completely dead and I was sure I had turned my precious into a brick. I recharged it and all was right with the world, but still this had never happened to me before.

The Ugly

  • SOME OF MY APPLICATIONS DIDN’T WORK: Ok, so I know I just covered this under “The Bad”, but now I’m not just talking about a few games not working. I lost the use of both Pandora and the edit capabilities in Evernote. Two applications that i live in daily. I mean, come on. I can’t live without tunes and notes.
  • Restore: Did I say Restore? I meant to say, “There IS NO restore.” When Apple says only install on a dev device and you can’t restore, they’re not joking. I had read on another dev blog that as long as your phone was registered on a dev program you could restore, but that was crap.

Looking back there are a lot of cool things that this update will bring to the community once it’s released. Until then, be content with what you have. While I’m sure at some point there will be a more stable beta that comes out, don’t be tempted. If you do development and absolutely need to have your code on a device rather than in the simulator, pick up a second iPhone or better yet, if you don’t need the phone functionality, and iPod Touch. As for me I’m currently working on an app that i want to get released prior to the 3.0 upgrade so I can wait for awhile. Hopefully by the time I’m ready to get serious about a project that uses 3.0 the beta will be stable or I’ll pick up a second device. Hmmm I wonder how much a first gen is on eBay…

Note:
So I did finally get my phone back in working order with 2.2.1, but I’m still out of sync just a bit as not everything can be rolled back. Rather than going into what I had to do I’ll simply refer you to the post on BigBoss that got me back to normal.

Weather reporters don’t know $#!7

Yesterday I worked from home because according to the news it was supposed to be the end of days. Yea, right. I totally could have made it into the office because, funny thing, the freezing rain and snow they promised NEVER happened. “But don’t you fret.” they said. “It’s going to hit tonight and tomorrow will be the end of days.”

This morning I woke up and it was 37 degrees and most of the snow was melted. They said that it wasn’t supposed to snow until late this afternoon, so I thought, “Great. I’ll head into the office and worst case scenario I’ll leave a little early if it starts snowing.” By the time I got out of the shower it was snowing. HARD. By the time I got dressed and downstairs the enclosed photo is what I opened the front door to. At the most this was 45 minutes after I looked at the window to see most of the snow gone. We’ve probably had more snow in the last hour than in all of the last week combined.

Weather Reporters don’t know shit!
snow_12-18-2008

New Feature – Right Now

THE FEATURE
I spent the day adding in a new feature to the site called “Right Now.” The feature is now ready and you can start using it in two ways. First if you press the link in the top menu titled “Right Now”, (duh) a message will pup up with the most recent Tweet posted to twitter that contains the word “feel.” go try it, but be careful, it can be a bit addicting. I’ll wait here…Did you press it more than once? Was it funny? Inspirational? Sad? I could press that thing all day long, but then again I’m fascinated by cultural and social interactions among primates.

The second way you can use this feature is with the input field at the top of the right side panel. You’ll notice a button below it called “Right Now.” I guess that’s a pretty big clue. The default value for the input field is evil (after all, I am the malignant genius), but you can type any single word your heart desires. Press the button and it will return the most recent posting containing that word. When you’re done just press the close button.

[Right Now] is a feature I’ve been planning from the beginning. The idea for it came from two different sources. First I’ve always had an affinity for the music video to the song “Right Now” by Van Halen. If you’re not familiar with it, throughout the song they flash captions about things that are supposed to be happening right now. For example, “Right now someone is crying over a lost love.” The second is a site called We Feel Fine. My idea was to combine the two. Quick one offs that show up and then are gone. No tracking. No metrics. Think of it like passing a stranger on a rainy night and hearing what they are thinking at the moment. You keep walking to reach your destination and get out of the rain. There’s no turning back. Once you pass by it’s gone. A fleeting glimpse into a stranger. Sometimes sad, sometimes funny, with just a touch of the intimate. Such is life.

THE TECHNOLOGY
I went around a bit about where to get the data from. Originally I wanted to use blog posts, but that got into issues such as: What search engines have API’s; Do I search just titles or whole posts; How do I get just the piece I want; etc. In my quest I stumbled upon the Twitter Search API. It was simple, and produced either an ATOM feed or JSON. There was no issue with what to display since the title and the post are one and the same. Also the very nature of Twitter seemed to go with the philosophy I was implementing. Tiny bits of random thoughts.

With the source selected the next question to answer was how to implement. I knew I wanted to display this information from the main menu, it should take a small amount of real estate (no page redirects), and that if it wasn’t active it should disappear. I settled on a [div] tag set to an absolute location on the page. A JavaScript activates and deactivates the text of the post. I pretty much knew this is what I wanted from the start, but here are a few options I thought about and rejected.

  • Reuse the real estate right below the site title. There is plenty of space there and when not in use it would pretty much disappear.
  • Popup a new window. In the end I didn’t feel it was very elegant.
  • Throw it on the top of the right panel. When active it would adjust everything down. Again not very elegant.
  • Page redirect. As I mentioned I really didn’t like this idea, but when I was thinking I might have to display an entire blog post I had to consider it.

With the data source and display mechanisms selected it was just a matter of hooking it up. While this is a relatively straight forward feature there were a few issues to deal with.

First, postback or AJAX. This was a no brainer. With a small amount of data to get and a web API to get at it, AJAX was the hands down winner.

Next, what framework to use. I thought about using the ASP.NET AJAX framework that’s a part of ASP.NET 3.5 as well as jscript since M$ has decided to support it in a future release of the framework. In the end I decided to use my own framework. My reasons are as follows. 1) I already have my own light framework. I’ve been doing this for a while and have my own scripts for AJAX from the days when we didn’t have all of the choices developers do now. 2) There was no algorithmic reason to interact with .NET. All I needed to do was pull data from a third party. 3) Finally, and this is probably the biggest reason, the other frameworks are monolithic and way heavier than I needed. All the code I needed was probably about 30 lines total, and most of that is error handling and validation.

Lastly, since I was going to be calling across domains I needed to be able to handle that fact that most browsers would deny the request due to security reasons. My answer to this was a local proxy. My AJAX code would call a local proxy and then the proxy could call out to Twitter. Now you might be thinking that this goes against the second item in the previous paragraph. Notice how I was careful to say there was no “algorithmic” reason to interact with .NET. To be honest at this point I almost went back to ASP.NET AJAX. The overhead still kept me from it though. So for the proxy instead of using WCF (Even though I’m a big fan), or a web service, I decided to create an ashx file instead. I may change this at some point, but it seemed to be the easiest way to implement what I needed. Remember our agile principles, functioning code first, refactor for performance later. There are really only two points of note about the proxy which follow here:

  • The return type is [text/plain]. I basically return the innerHTML of the display div.
  • Caching is turned off. Otherwise you’ll get the same results every time. Here is the line of code to do so.
    ** context.Response.CacheControl = “NO-CACHE”;

CONCLUSION

This really didn’t take very long to implement. Hopefully you have a good understanding of the process I went through to develop this feature. I haven’t posted any of the code as that is really not the purpose. As I talk about the features of the site I will always talk more indirectly about the architectural considerations that go into making my decisions rather than focusing on code implementation. I’m always happy to answer questions about implementation, but there are literally thousands of blogs that talk about lines of code. IMHO precious few talk you through the software design.

In closing, I love this feature even if no one else does. In fact I just went out and pinged it. “i’m at complete peace with my feelings now. i don’t feel angry or mad or really that upset anymore. what a nice feeling.” Welcome to someone’s inner thoughts.

Site Update 1

Just did a quick update to the site. Added a new feature, “Right Now.” See the following post that talks about the feature. I also updated the colors. Made it a bit darker. I think it looks much cleaner stylistically.

Bug: There is a problem with the site when viewed in IE8. If you switch to compatibility mode it will look fine. I’ll be looking to fix it with the next site update.