Types of ASP.NET MVC View Engines

Types of ASP.NET MVC View Engines


A view engine provides Controllers with the ability to translate views into HTML. There are multiple reasons why you may choose one view engine over another. Here is a list of different types of ASP.NET MVC View Engines, the first two are available with ASP.NET MVC 3 -
  • WebForms /ASPX – classic ASP.NET MVC views

  • Razor (CSHTML)

  • Spark

  • NHAML -  (pronounced enamel) is a pure .NET implementation of the popular Rails Haml view engine.

  • NVelocity 

  • Brail

It is possible to use multiple view engines in the same project

Related reading:
ASP.NET MVC View Engine Comparison
Spark and NHaml - Crazy ASP.NET MVC ViewEngines

Read More
Search Engine for Comics

Search Engine for Comics

A relevant comic strip introduced into an article or presentation can make a topic more appealing & livelier (assuming you have permission to use if it's not your own). Finding the image of a strip on the web that you remember reading in a Sunday newspaper may not be easy. Don't you wish there was a comics search engine that could get you cartoons for a keyword you submit?

Here are a few that I found -
  • Calvin and Hobbes Search Engine by Michael "Bing" Yingling

  • Dilbert Strip Finder by BF Martin

  • XKCD - use this search filter on Google: [keyword -site:*.xkcd.com site:xkcd.com]. The first filter is to exclude searches within subdomains of xkcd.com. The content is indexed by Google because each strip has hidden text. 

Related:
Read More

DuckDuckGo shows why Google may not be good for you


To show that DuckDuckGo, a search engine site winning rave reviews, doesn't "filter bubble" or track you, they have illustrated guides to demonstrate how Google may not be as saintly or good as it may appear. The facts they present are something to ponder on.

On a different note, DuckDuckGo provides a great API alongwith other goodies like the easily configurable Karma Widget that displays your online karma (e.g. twitter follower count, facebook fans, etc.), for your blog, profiles or other Web sites.

Here's how a sample Karma Widget looks -

Related:
Say Goodbye to Privacy
Read More

Print stylesheet - Best Practices


Using a Print stylesheet is a more convenient way to generate a printer-friendly page than creating such a page through server-side coding. Tim Connell has a nice CSS tip in his article on things to note while coding a stylesheet meant for printer output.

At some point, you have probably found yourself reading a printed article when you get to an engrossing section that includes a link for more information. A link that sits there teasing you with its blue underline. Without a mouse or Apple’s latest interfacing doo-​​hicky you have no chance of finding out where that link goes unless you return to the original article on screen.
The solution to unclickable links is an easy one to deploy. Use some CSS to print out the location of the link that would otherwise be hidden:

#content a:link:after,
content a:visited:after {
content: ” (“ attr(href) ”) “;
font-​​size: 80%;
text-​​decoration: none;
}

As a result of using the above CSS content property setting in the stylesheet meant for the printer, the actual link will appear next to a hyperlink in a printed page.

So content like this -

will show up like this in a printed page -


Read More
Mobile Web Trends - 2011

Mobile Web Trends - 2011


Interesting points from BuiltWith.com's Mobile Web Technology Report 2011 -

  • The growth of the mobile web is staggering, with approximately 726 million people having access to a 3G mobile subscription

  • The viewport meta tag was originally designed by Apple to resize the layout viewport of a website, a requirement for the mobile device to understand how the website designer has defined how the content should be displayed to the end user. Android, Windows Phone, BlackBerry and iPhone all support the viewport meta tag

  • Close to 3% of the top 10,000 sites use the viewport meta tag 

  • Of the top 100 sites most visited on the internet, 71 of them have content specifically designed for mobile devices. The remaining 29 either do not support mobile devices or, depending on the device, prompt the user about a device specific application.

  • jQTouch is currently the most used mobile JavaScript library (38%) in the top million sites, shortly followed by JQuery Mobile (32%), both of which are extensions of JQuery, the most popular JavaScript library used on the web.


Read More

Summaries of Google Webmaster Central YouTube videos

There are currently close to 400 videos on Google Webmaster Central YouTube channel featuring Matt Cutts who answers questions posted to the Webmaster Help Forum or to the Twitter handle @googlewmc. Occasionally, some Google secrets slip out in these videos. You can also pick up some tips & tricks on SEO by watching these typically 2-minute videos.

If you are SEO inclined, the videos have some interesting titles that draw you to find out the answers. I track updates through their YouTube channel RSS feed. I sometimes wish the answer was part of the intro that comes with the feed so that I can find the answer immediately. For future reference, I plan to jot down summaries of these videos while I watch a few of them every week. Here goes the list -

Do spelling and grammar matter when evaluating content and site quality? (Aug 17, 2011)
No.
Reputable sites tend to spell better and the sites that are lower page rank tend not to spell as well, so "that's the sort of content analysis that would be pretty interesting to explore as a potential quality signal"

Why do Amazon.com pages tend to rank well for product queries? (May 25, 2011)
If there's an official homepage for a product, it will rank very well & sometimes number one. Not every book or product has an home page. Amazon has a relatively good user experience in general and lots of links to it due to which it tops the result list.

How does Google handle pages with content that changes on each page load? (asked on Apr 22, 2011)
If you really want Googlebot to see & follow, make sure that the important links are always on your root page.

Can I tell Google about links to my site? (Apr 19, 2011)
Better let Google find the links. You can upload a sitemap which is a list of all URLs on your site but Google doesn't guarantee that uploading a sitemap will get all of your pages indexed.

Can coding errors affect how a page is indexed? (asked on Apr 19, 2011)
Check the web page in a text browser or the popular browsers, if you can see the text. "If all that text is visible, then it should, for the most part, be able to be indexed by Google."

How can I make sure that Google knows my content is original? Apr 4, 2011
Google tries hard but is not perfect at identifying who is the original author of an article. To let Google index your original article faster before a deceptive site like a scraper, claims it is its own (by showing a manipulated timestamp), let the world know about it by, for example, tweeting about it or hook up thinks like Pub Subhubhub which will ping various places to asynchronously say that there's a new article or blog post.
Alternatively, you can do a DMCA (Digital Millenium Copyright Act) notice or a spam report

Is serving Googlebot a transcript in place of a video considered to be cloaking? (asked on May 5, 2011)
Yes, that would be considered cloaking and is not recommended. Show the video & transcript as well.

How do you rate links from sites like Twitter and Facebook? (asked on Jan 14, 2010)
Google treats links the same. It looks at how reputable the links are. It doesn't matter whether they come from a .gov or .edu or Twitter or Facebook...they don't automatically carry weight.

How much weight does the number of years a domain is registered for have on your ranking? (asked on May 7, 2009)
Don't "worry about that very much"

How can new pages get indexed quickly (besides using Google Webmaster Tools)? (May 27, 2009)
Get more links. Google can index a page within seconds.

Does the position of keywords in the URL affect ranking? (Mar 5, 2009) Is example.com/keyword/London is better than example.com/London/keyword?
Not a lot. Having four or five keywords maybe good

All videos have a transcript (hidden by default) but they may not work every time (the trouble could be with the JavaScript to show-hide the panel). To view transcript, click on the button to the right of the flag below the video (if you hover over it it, it will say "Interactive Transcript") and it will open up the transcript.

Read More
Cross-Browser Testing Tools

Cross-Browser Testing Tools


I've used cross-browser testing tools like Adobe BrowserLab, Browsershots & Expression Web SuperPreview but didn't know there were a dozen more.

Smashing Magazine has done an exhaustive review of all available cross-browser testing tools with a nice tabular summary at the end for easy comparison. It covers the following list of tools -

Free:
  • Adobe BrowserLab

  • Browsershots

  • Expression Web SuperPreview (free and commercial)

  • Lunascape 6

  • IETester

  • IE NetRenderer

  • Spoon

  • Sauce Labs (free and commercial) - 200 free minutes/month

  • Browsera (free and commercial)

  • Browserling (free and commercial)

Commercial:
  • Mogotest

  • Cloud Testing

  • BrowserCam

  • Multi-Browser Viewer

  • CrossBrowserTesting


Read More