Sunday, June 1, 2008

Intro to Dependency Injection and Inversion of Control

From: Desert Code Camp 2008
Speaker: Donn Felker (from Statera)

Notes:

90% of injection is done in the constructor of the class by passing in instances as interfaces. The other 10% is done primarily through a setter property and in rare cases as a param to a method.

IoC = Dependency Inversion Principal. A service locater returns the concrete instances of classes requested. The service locater is a container.

Microsoft.Practices.Unity is a popular Microsoft container and Windsor Castle is the most popular open source container.

Links to containers:

Windsor Castle
Microsoft Unity
Structure Map
Spring

Search Engine Optimization

From: Desert Code Camp 2008
Speaker: Kay Frenzer (from Teralever)

Notes:
4 factors when optimizing a web site:
Technical - i.e. do your pages show up / does the site work.
Content - The content on each page
Inbound Links - Links from sites with similar topics to your site.
Trust - Your site is a trusted site.
There's a robots meta tag that you can put on any page that will override what your robots.txt file states about the page: <meta name="robots" content="noindex, nofollow, noarchive, nosnippet, noodp, none>
The <title> tag on the page is the most important part of the page when optimizing for keywords. Don't put your company name in the title (unless the name is part of the keyword(s) that you're optimizing for) but if you feel that you have to put the keywords first and the company name last. Don't use stop words in the title. Stops words are words such as: the, of, that, is, and, to, www, web, web page, homepage, home page. The maximum length for a title is 120 characters. Google displays 65 characters in its search.
Commercial tools for keyword optimization are nichebot.com and wordze.com
LSI is Latent Semantic Indexing. The search/indexing bot looks at the words around the keywords to see if they are related. If not it will mark that section of text as spam and that page as a spam page.
Apparently your site can be penalized for being linked to from (1) link farms (2) porn sites (3) gambling sites (4) other non desirable or illegal sites. Personally I find this hard to believe as this would allow your competitors to displace you from good rankings by linking to you using these methods.
If you want to get a link count for your web site you should use Yahoo instead of Google because Google gives a deliberately misleading value. To get a link count of sites and pages that link to your site you should enter the following text into the Yahoo search box: link:http://guyellisrocks.com -site:http://guyellisrocks.com
Replace the guyellisrocks with your web site name.
When creating links on your site to other pages on your site use full URL's with the domain name as well and not relative paths.
Kay's presentation from today will be at seodiva.net/seo-presentation.ppt
Comment:
I would have liked to have seen the presenter walk through a real world case study and demonstrate a new site or page that she took on for a client and what she did at each step of the way and how she optimized each page and the final results over a period of (say) 6 to 12 months.

What's different about Ruby

From: Desert Code Camp 2008
Speaker: Logan Barrett

Notes:

Ruby is a dynamic language.

IRB is a psuedo acronym that stands for Interactive Ruby.

Ruby has strong typing - you can't cast a string to an int.

Testing is emphasized in Ruby and built in.

Duck typing in Ruby replaces what an interface in C# would be used for.

Everything in Ruby is an object.

The method-missing method is a method that will catch any call to a method on an object that is missing. i.e. if a method hasn't been declared for an object then the method-missing method will be called.

A lambda function in Ruby is called a code block or just a block.

A block is typically used to iterate over a collection like a for or foreach loop in C#.

collection.each do |element| # iterates over all elements in the collection collection.
collection.map do |number|
collection.each_with_index do |element,index|

Test Driven Development

From: Desert Code Camp 2008
Speaker: Saul Mora (from Go Daddy)

Notes:

Read Pragmatic Unit Testing in C# with NUnit by Andy Hunt and David Thomas.

5 objectives in Test Driven Development:

Test what hasn't been tested.
Boundary Conditions
Inverse Relationships (objects that refer to each other)
Error conditions
Performance

Tools: For SQL Server - tsqlunit

The guys who created NUnit are apparently working on another project called Gallium (although I'm sure I've misspelled it because I can't find it in my searches) and they are also working for Microsoft. This note needs more info/editing.

Test Runners: TestDriven.net and Resharper UnitRun are both unit test runners.

Another book: Test Driven Development by Kent Beck

References: Agile Data

Project patterns is to have a DLL (in a project) with the tests with references to the unit test DLL(s), mock DLL(s) and the tested project and all tests live here.

The [Setup]/[Teardown] attribute on functions in the unit test get done one for all the tests in that class. Can just as easily use the class' constructor and destructor/dispose methods to achieve the same.

Silverlight Zero to Hero

From: Desert Code Camp 2008
Speaker: Simon Allardice (from Interface Technical Training)

This is the first time that I've seen Simon speak and it was very good and very entertaining. He's Scottish with a good sense of humor and reminded me a bit of Billy Connolly. Very good at delivering his content at keeping the audience captive.

He made references to Florence Nightingale and Henri Matisse at the beginning of his talk which he said he was going to talk about and I thought that was a joke (I'm sure everyone else did as well) however he brought them back in later on and used them as analogies.

Notes:

Silverlight 2.0 is almost chalk and cheese when compared to Silverlight 1.0.

Silverlight 2.0 is not just for media (video, audio, graphics) - although 1.0 was primarily that. Version 2.0 has C# and plenty of controls and is very powerful.

Use grids for tabular data (replaces <tables>) but if you can get your data over in another way (charts for example) use them.

Isolated storage can be expanded with the permission of the user so you're not stuck with the small initial limit if you need more local disk space.

Expression Blend is the tool of choice for designing and Visual Studio 2008 for programming.

Dan Wahlin has a blog based on Scott Guthrie's original posts about Silverlight.

Steve Krug's book Don't Make Me Think is a common sense approach to web usability.

 

ASP.NET AJAX Internals

From: Desert Code Camp 2008
Speaker: Rob Paveza (from Teralever)

Notes:

Script# - This is a C# to Javascript compiler. Instead of generating IL code like the C# compiler normally would it generates javascript. I believe that it's written by Nikhil Kothari.

WebService calls can be made from the UpdatePanel which has the advantage of reducing the viewstate. These calls can be made static.

If using the Telerik controls then watch out for a conflict between them and ASP.NET Ajax as there are some incompatibilities.

Mootools and Prototype are Ajax toolkits. (I get the impression that Mootools is commercial and Prototype is free open source.)

To use a WebService call in Ajax you need to decorate the call with the [ScriptService] and [ScriptMethod] attributes.

If you put the ScriptManager reference (required for all ASP.NET Ajax pages) on a master page then you need to use a ScriptManagerProxy reference in the control that you're building. There are a number of arguments (attributes) that can be given to ScriptManager that I haven't used before that need further investigating.

The EnablePageMethods=true is a ScriptManager attribute that makes the page act like a web service.

Desert Code Camp 2008

This is the second year that I've been to Desert Code Camp. Lorin Thwaits is the camp director and always does an excellent job of organizing it. Last year there was a lack of food but that was rectified this year and there was good grub on hand.

The day is divided into eight 1-hour time slots with a ten minute break between each session starting at 9am. There were up to 7 talks being given in each of the time slots. I managed to make 6 of them and missed the last 2 for the day. Last year I made a ton of notes and I have not looked back on them for the last year and probably won't. To try and make my notes more useful to myself (and perhaps others) I'm going to put them here so that I can easily find them again. I only made notes about the stuff that I learned and even though some of the speakers may have said something important that one would normally note if I already knew it and am unlikely to forget it then I probably didn't not it down.

ASP.NET AJAX Internals
Silverlight Zero to Hero
Test Driven Development
What's different about Ruby?
Search Engine Optimization
Intro to Dependency Injection and Inversion of Control

A couple of speakers used the word grok to which I've heard recently at other meetings. This word I have no double will become more and more popular in use. Wikipedia defines it as: Grok means to understand so thoroughly that the observer becomes a part of the observed. First coined in Robert A. Heinlein's 1961 novel Stranger in a Strange Land.