.NET 3.5: A LINQ to the Past

With the release of Visual Studio 2008 comes .NET 3.5, the newest iteration of the .NET framework. Unfortunately, .NET users are also greeted with a rise in popularity of the age-old question: Stored procedures or in-line SQL?

I won’t bore you with the details of LINQ (Language INtegrated Query) itself, as nothing can beat Scott Guthrie’s nice introduction on his blog. Something I’ve noticed about these new piece of technology, though, is that debate seems to rage up about how exactly to use it.

 LINQ has the nice ability to eliminate the need for many data layer projects and simplifies everything down significantly. To put it rather succinctly, you have the option to make a database object and call pre-made stored procedures like methods, or perform “in-line” LINQ to SQL commands.

The temptation to use in-line calls is tempting. That eliminates any database work besides initial creation and relationships. No more creating stored procedures and then calling them from code. Everything is contained in one place. You can even view your entity relations from inside of Visual Studio 2008.

However, many people point out that in-line SQL is not very efficient. The database optimizer doesn’t get a chance to be run on the query, not if it’s created dynamically. Therefore, traditionally stored procedures have been the “optimal” choice for database calls.

With LINQ, however, this may not be the case, or at least not as much as would be expected. Visual Studio magazine explains that LINQ can use eager or lazy loading to run its queries.

Eager loading loads up a ton of data at once, entire entities and relations. Lazy loading is a more “on-demand” type loading. What this means in more simplistic terms is that with lazy loading, there are many many roundtrips to the database, each one retrieving a smaller amount, whereas eager loading makes fewer trips for more data.

It seems that with LINQ, the hot topic is performance, and how to maximize it. Ultimately, you will probably take a slight performance hit from switching to LINQ. Is it worth it? That’s the question many many people around the world are asking themselves right now.

There are many methods of optimization, though, like pre-compiling in-line queries and just sucking it up and using stored procedures (which, as I mentioned earlier, can still be added to Visual Studio as methods of an entity object).

If anyone has some comments about LINQ I would be happy to hear them!

Advertisements

How to find and avoid SEO scams

A friend of mine brought this topic to my attention recently (thanks T!), so I thought I would riff on it a bit.

 Search engine optimization has become a pretty hot topic recently. Everyone wants a piece of the SEO pie (which is a topic I am saving for another day … oy vey), but where do you look for enlightenment on the subject? The market is chock full of people who know their stuff – even though many people disagree on certain finer points or how to specifically implement things, most people agree on a lot of ideas and topics.

Unfortunately there are a lot of people who simply do not know what they are doing who are making assloads of money off of it. How do you spot the good from the bad?

The best defense against people running an SEO scam is a little bit of knowledge. You can find tons of free advice on the internet. I mean, tons. There are forums, communities, portals built off of the idea of sharing thoughts on optimization. If you are truly clueless about SEO, I can tell you right now that it would be a waste of your money and time to attend a seminar headed up by a guy whose website looks like this: http://www.1seomichigan.com/ .

This guy’s site, Michigan SEO or whatever he wants to call himself, is an SEO disaster. This is his sales pitch to the world, and he failed. Miserably. And then, what’s more, he tricks you.

SEO basics

 First of all, the basics of SEO are not present. You may notice as well that the site looks hideous. How pretty your images are does not matter, fortunately. Anyway what does he do wrong?

Right off the bat, there is a large chunk of the top of the screen that is made up of images. That is not great, because keyword position on the page (also called prominance) can affect SEO. Next, the header there is large, and yet does not help his SEO as much because it is styled with CSS instead of using a CSS-styled <h1> tag. Header tags matter, yet they were ignored here.

What I’m trying to get at here, folks, is that this guy doesn’t use basic SEO techniques on his website. There are more, rest assured that it’s not very good from an SEO standpoint. Using a neat SEO keyword tool I found while cruising around one day, I did a keyword analysis of his page. Ideally you want a few keywords (I usually use 4 keywords, sometimes of multiple words) with between 4-7%. More than 7% is okay, but more than 10% is bad. This is “density” on the page so your keywords need to be used a lot. The more words, the more times the keywords need to be used to even be considered keywords.

Now look again at that guy’s site. He has a LOT of words. Lots. He has more than a homepage should ever have. So looking through his page for keywords, there are, literally, none. The highest density is around 2.86%. To really be considered a true keyword, you should have at least 4%. To be considered a minor keyword, you’re looking at between 3 and 4%.

According to my friend, this guy recommends you have 10 keywords of 4% each, and so your keywords should account for 40% of your page’s content. This is, obviously, terrible advice. And to put the icing on the cake, he doesn’t even follow his own advice. He recommends 10 keywords at 4%; he has 0 keywords above 3%.

Sales pitch

This guy’s sales pitch is his images. Clearly, they are there to attempt to show off his awesome SEO skills with which he uses to own Google. Let’s look closer at these claims, and I can tell you why they mean nothing.

Claim #1: 7 out of the top 10 sites!

Myth: This makes him a good SEO person

Fact: He is using obscure search terms in that image, to make himself look better.

Seriously, look closely. Sure he has 7 sites on that page. But look at his search term.  “bonacure michigan” is the term. Guess how many TOTAL sites use that term? 184. Guess how many people a month search for “bonacure michigan”? How useful is that 7/10 now?

Claim #2: These are our keywords, we beat out 160,000 sites, we occupy 3 spots

Myth: This proves that his SEO methods work

Fact: Not so. Again, he uses an obscure keyword. While it may or may not be impressive to you that he has three sites in the top 160,000 sites, remember that most likely very few people are actually trying to optimize for “ope michigan” or whatever that term is. With your website you will have competition, people who are actually TRYING to beat you will if you listen to this guy’s advice.

Keep this in mind: if this is proof of greatness, I am at least ten times as great as this guy at SEO. Do a search for my name plus SEO, “James martin SEO”. This blog is the first result, and I beat out over a million people for that spot. Again, though, how useful is that? Not many people search for that!

Rampant claims

This site, and keep in mind that this guy, for the sake of this article, represents all SEO scammers everywhere, makes grand claims about Flash here. Some of them I made myself, and was corrected by Adobe. He claims:

MYTH: Search Engines Cannot Read Flash

TRUTH: Search engines see Flash as a Black Box. It cannot see what is actually going on inside of it – so a lot of your text and words get read as artwork…. Which doesn’t do you a whole heck of a lot of good!THE REAL WORD PERSPECTIVE: As of this writing only
one search engine can read the keywords that you place inside
of your Flash movie….
This is somewhat wrong as well. There are ways you can take Flash and make it useful for SEO. I have talked about it before on this very blog. Ways like SWFObject can allow you to stick content where the Flash goes and the search engines can see it. Plus, Google can index Flash content. Not superbly awesome, and it (rightly) ranks it way lower than actual html content.

Scammers will use Flash as an example of something to avoid at all costs. This is not true. You should avoid using all Flash, for sure, but you can use Flash on your site without worrying if you have a competent SEO person behind the helm.

Conclusion

I could go on about what this guy is doing wrong. So how do you find someone who is doing things right? The best way would be to search for meaningful terms. The next would be to learn a little yourself about SEO and apply that knowledge to the SEO person’s site.

Of course, if you’re learning about SEO in general, what good is hiring someone? The benefit here would be to help you apply SEO to your specific site, instead of to teach you the basics.

You can also remember that if you plan on spending a lot of money learning SEO techniques, you could always contact me instead! I probably charge less.

Questions? Comments? Feel free to email me James Martin, or leave a comment below!