Mini Post – DotNetNuke and web.config problems

I could have Twittered this but I wanted to put it here: Every now and again I find myself refreshing my developer’s copy of my project on my local computer from source control.

The way I have source control is primitive and probably incorrect. I tend to save ALL of my project (DotNetNuke included) into source control, so when I get a clean setup, I can basically run it out of the box.

This particular time, I was working with a different database than I normally do. Because of this, my source control wrote over my web.config and copied the wrong database settings, which resulted in the web.config pointing to a no-longer existing database.

When I loaded up my website, I was greeted with the installation wizard from DotNetNuke. “Okay,” I thought, “Perhaps I forgot to update this particular database with the new DNN version.” I clicked on next a few times and realized it was just the wrong database being referenced. I changed the web.config to be the correct database and credentials and all was well…

Or was it?

I loaded up my project and I was getting rather unhelpful “I need to put a ScriptManager on the page in order to use” error. I just couldn’t figure it out! It worked before! Long story short, the DNN install wizard messed around with the web.config and broke a few things configured specifically to my install. Once I pulled up an older web.config, everything worked perfectly.

This wasted about 2 hours of my time (which I don’t really have) and was easily avoidable if I was paying attention.

Lesson learned: Always be methodical with processes which you perform regularly.  If something strange goes wrong within the process, it probably doesn’t belong and should be approached very, VERY carefully.

Opening to a New Window – Why Isn’t the Target Attribute a Valid Tag?

Ever since I was a young web developer going through college, it has been drilled into me to be standards compliant when developing for the web.  In fact, it went as far as being 20% of your grade just to be XHTML 1.0 Strict standards compliance.

Just to be clear, I am talking about XHTML 1.0 Strict.  Transitional, while it has its uses, doesn’t capture the essence and spirit of why we want to be standards compliant.  Creating your web sites to be standards compliant is something as web developers we should strive for.  It promotes standardization of markup, it helps to separate layout from content, and it creates the ability for all modern browsers to display the site same way… sort of.

One thing that really gripes me is the target attribute for the <a> tag.  This was marked as obsolete, and in the strict specifications, it’s invalid.  Why is this the case?  It’s very helpful,  unobtrusive, and works really well with tabbed browsers.  I can understand every other valid XHTML ‘no-no’ such as not using align attributes or a center tag, just this one just kind of escapes me.

<a href="" target="_blank">Why is this invalid?</a>

So why is it invalid? As far as I can tell, it’s because we shouldn’t assume it is what the user intended and that it should be left up to the user.  I really hate this explanation.  It makes me think whomever thinks it has never dealt with a real world user.  Most people outside of the technological world are not savvy enough to right-click and open a page in a new window.  For us that do know how to do it, it’s actually quite annoying.  Besides, when I link to a webpage outside of my domain, how often would we want the user to navigate away? It is not very user interface friendly in my opinion.

Another reason is the page loses the effectiveness of the back button.  Okay, I can buy this, but it’s packed neatly on a new tab on all new modern browsers.  It’s easy to navigate back to the original site.

A last reason I can discover is because of screen clutter.  This is becoming a moot point due to the fact that almost every popular browser uses tabs rather than opening a new window.  In fact, the only browser which doesn’t utilize tabs is IE6, and it’s popularity is quickly dying.

The standards compliant solution: Use Javascript. Bah!  That’s just something else I have to test.  target=”_blank” works fine in all cases.  Using Javascript to do something the browser does natively feels silly.  I know the code is pretty compact and with jQuery you could literally do it in one line, it’s not nearly as clean and understandable as target.

My user experience friendly solution: In order to appease the target-hating standards compliant gods, my solution is this:  Provide a setting on the top of the page which asks “Open all links in a new window” and “Open all links in the current window.”  This way, you allow the user to decide how it works, it’s standards compliant, and it’s fairly simple to implement.

Perhaps help is on the way. Doing some research on the topic, I came across the spec document for CSS3 Hyperlink Presentation (yes, this opens in a new window!) which describes using CSS to determine target parameters.  I can easily get on board with that!  Hopefully we can see CSS3 implemented across all major browsers in the not-to-distant future.

In Conclusion: I will still be using target=”_blank” to pop up new tabs on my blog.  The blog is validated in Transitional anyway.  My belief is that any hyperlink in a blog post will be clicked on to allow further reading of the topic.  That is the experience I want to provide for my readers.

Mini Post: Tags and Categories

I was helping my fiancee set up her blog, when she asked the question:  “What is the difference between tags and categories?”

I explained that categories were used for organizing your posts in a hierarchical manner, whereas tags can be used more for searches.  I tried to show her using my blog, to which I discovered:  I don’t use either correctly, at all!  I think my tag cloud is weak, and my category structure is non-existent.

Fortunately, Google, as always, is to the rescue.  I did a quick search on the topic, and discovered this blog post: Categories versus Tags – What’s the Difference and Which One? The blog post describes that categories are primarily for internal navigation on your site, should be fairly well defined and are hierarchical, whereas tags are better suited for searches on other sites such as Technorati. It’s also important to note that categories are not tags, but tags can be categories.

Over the next few weeks, I’ll be looking to incorporate a better category structure on my blog and work on creating better tags. It’s always fun to learn new things when trying to teach others.

Social Media Myths

When we think of social media, we think of Facebook, LinkedIn, Twitter and MySpace primarily.  Some call social media ‘Web 3.0.’ Truth be told, social media has been in existence ever since people could connect to an ISP.  We have forums, newsgroups, mail lists, chat rooms and even guest books.  In fact, we still have these grandparents of social media to this day, and still have great uses.

But I digress.  I read an article from WebWorkerDaily on six common myths which people not in the know believe.  The author, Aliza Sherman, attempts to dispel all the myths and does a great job doing so.  The myths and her explanations are straight forward and clear, but here are some that I had opinions on:

You can easily use your Facebook profile for both your personal life and work.
Aliza discusses that it’s hard to manage your facebook profile for both work and personal life, because it is difficult to have a healthy balance of work and personal life status updates.  I agree that this myth is false, however one thing should be pointed out:  you never know when a friend will turn into a business contact.  My suggestion is to keep work away from Facebook, but to update Facebook with big professional changes/events that happen in your life.  If your friends are truly your friends, they would be interested to know anyway.

LinkedIn is just a resume site.
I believe that LinkedIn is the best ‘social media’ site you can be a part of for your professional career. Making professional contacts and being introduced to 2nd degree contacts is a great way to get to know people and form a healthy network of potential clients, merchants, and yes-employers. While I agree that LinkedIn isn’t just a resume site (the author does a great job explaining this) I don’t think we should be blind to the fact that we ARE essentially putting our resume up for the LinkedIn world to see. Recruiters use LinkedIn to find candidates for other jobs. If a current employer is worried about such a ‘problem,’ they should focus less on where their employers are putting their information and focus more on being a great place to work.

Social media is the new advertising platform.
I am not sure how I feel about this myth and whether I agree it’s false or not. The author explains that with this old mentality of “hey, we can advertise on this!” is what caused the boom and bust of the ‘bubble’ back at the turn of the century, that we’d be foolish to apply the same methods of advertising on the social media platform because it’s supposed to bring the power back to the people.

If the myth read, “You can be successful using tried and true methods of advertising on the social media platform”  I would be inclined to agree that it is not true.  However, there is plenty of advertising going on in the social media world.  The ones which are most successful are those which don’t look like advertising at all.

Take a look at Twitter, and at some of the more prolific followers you have.  You’ve followed them for 6 months, they’ve always had interesting things to say, and you agree with most of it.  Then they post a link to their book.  If you’ve been following them and agreeing with them for a while, you’re inclined to go and at least check it out and see if you’d be interested.  You wouldn’t immediately unfollow them because they advertised–if you do, shame on you… stop being so pompous and take it for what it is!

Is this advertising?  YES, and it’s pretty effective!  It’s establishing trust before the purchase, something which is very difficult to do.

In conclusion
The article is very good. I’ve always thought what was missing from the social media world is a clear purpose. This article shows me that there are people thinking about it.

Oh and for my own myth:
Sites such as Facebook and Twitter will eventually be the death of blogging
This is false. Blogs are only enhanced by the usage of Twitter and Facebook. Blogs will always be important because:

  • Easily customizable
  • You can set your own rules and policies on your own blog
  • RSS feeds are a great way to aggregate and read blog posts
  • Much more adaptable to prose writing, which is missing from status updates.

What are your thoughts on social media and some of the misconceptions about it?