rulururu

post Firefox and its market share

July 1st, 2009

Filed under: Internet — Kai @ 4:12 pm

Until Wednesday noon over 3.8 million users worldwide downloaded the new version of Firefox from the Internet. Firefox 3.5 is more than twice as fast working as the previous version, and above all more stable running. The software now uses better the performance, the modern computer with multi-core processors available. According to the developers over 5000 new freatures are in the sources, of course most only will be recognized at second glance.

Nevertheless it’s amazing (or maybe it should make me blue) that the market share of Firefox is still just about 22 percent. In comparison to that the market share of the Internet Explorer is about 65 percent.

It seems to me that besides a lot of companies whose hands are tied using another browser caused by a partnership or a similar contract with Microsoft there must be a great number of normal pc users that seem to like IE…

post LINQ to Amazon

July 1st, 2009

Filed under: .NET — Kai @ 3:55 pm

As you know you can query with LINQ lots of different sourcse. It’s possible to query, project and filter data in arrays, enumerable classes, XML (XLINQ), relational database, and third party data sources. Last year I among others wrote something about LINQ & XML.

After doing some query we get results of a as a collection of in-memory objects that can be enumerated using a standard iterator function such as C#’s foreach.

I found a funny Provider called Linq to Amazon which allows querying Amazon for books using Linq! It uses Linq’s extensibility to allow for language-integrated queries against a book catalog. The Linq query gets converted to REST URLs supported by Amazon’s web services. These services return XML. The results are converted from XML to .NET objects using Linq to XML.

For the moment, let’s look at the client code:

var query =
  from book in new Amazon.BookSearch()
  where
    book.Title.Contains("darkness and light") &&
    (book.Publisher == "Hitchcock") &&
    (book.Price <= 25) &&
    (book.Condition == BookCondition.New)
  select book;

I think this code speaks for itself! This is Linq to Amazon code. It expresses a query against Amazon, but does not execute it… The query will be executed when we start enumerating the results.

The following piece of code converts from Linq to Amazon to Linq to Objects:

var sequence = query.ToSequence();

The var might remind you to the times of Flash, VB or JavaScript. But those times were baaad, very bad. Nowadays we’re strongly typed or even better generic:

A good alternative is:

IEnumerable<SomeOtherClass> results = ...

The returned catalogue can now be grouped, filtered more detailed or just thrown away. Do whatever you like todo ;-)

There are many more, more or less usefull ones:

  • LINQ to SharePoint
  • LINQ to Amazon
  • LINQ to Active Directory (LDAP)
  • LINQ to NHibernate
  • LINQ to MySQL / Oracle / SQLite
  • LINQ to Flickr

Have fun ;)

ruldrurd
Powered by WordPress, Content and Design by Kai Bellmann
Entries (RSS) and Comments (RSS)