NHibernate vs Entity Framework: a performance test

I just found an interesting comparison in performance of two common ORM frameworks: Microsoft Entity Framework and NHibernate. Here’s a quick summary of the performance comparison:

Operation / Number of operations NHiberante – 4K Entity Framework – 4K NHiberante – 40K Entity Framework- 40K Winner
Store 37.37 9.19 1500 98 Entity Framework
Read over relations 1.01 0.54 10.13 4.18 Entity Framework
Read by ID 3.06 25.22 246 230 NHibernate with smaller amount of objects
Update 6.61 7.34 77 72 Both
Delete 3.35 16.76 58 1824 NHibernate

If you’re interested in the details of the performance measurements, please go to GregDoesIt.com.

Multi-Monitor Support in Visual Studio 2010

In Visual Studio 2008,  all documents/files/designers are hosted within a single top-level window – which unfortunately means that you can’t partition the IDE across multiple monitors.

VS 2010 addresses this by now allowing editors, designers and tool-windows to be moved outside the top-level window and positioned anywhere you want, and on any monitor on your system.  This allows you to significantly improve your use of screen area, and optimize your overall development workflow.

If you work on a system that has multiple monitors connected to it, you will find the new multi-monitor support feature within VS2010 a big productivity boost. But if you don’t already have multiple monitors connected to your computer, this might be a good excuse to get some…

For more information, please see the original post at:

http://weblogs.asp.net/scottgu/archive/2009/08/31/multi-monitor-support-vs-2010-and-net-4-series.aspx

30 Useful jQuery Techniques

jQuery is one of the most popular JavaScript frameworks, with powerful tools that can significantly improve the user’s interaction with Web applications. It has an additional advantage in that it allows developers to select elements on a page using CSS-like syntax which make it very easy to understand.

To help you improve your skills, We’ve collected 30 useful jQuery techniques and tutorials that have been created recently and that could make the development of your next website an easier and more interesting experience than the last.

  1. Current Field Highlighting
    As a matter of usability and aesthetics, it is a good thing to add some kind of visual feedback on web forms to indicate the currently active (or “focused“) field. In this tutorial, we’ll improve our current field highlighting, using jQuery.
  2. Accessible Charts & Graphs from Table Elements using HTML 5 Canvas and jQuery
    This technique provides a simple method for generating bar, line, area, and pie charts from an HTML table, and allows you to configure them in a variety of ways.
  3. Moving Boxes Carousel with jQuery
    Many of the concepts presented in classic carousel tutorials are the same, so this tutorial will not throw a lot of source code at you. The big difference here is that there are buttons to change panels and the panels zoom in and out.
  4. Sliding Boxes and Captions with jQuery
    All of these sliding box animations work on the same basic idea. There is a div tag that essentially acts as a window where two other items of your choosing “peek” through.
  5. Make a Mega Drop-Down Menu with jQuery
    So how would we go about implementing Mega drop down menus? While it’d be great to do all of this in pure HTML and CSS, it’s impossible at the moment to get those nice half-second delays — and of course there’s a pesky problem with Internet Explorer 6, which only supports :hover on anchor elements. Instead, we’ve found whipped up a solution using jQuery and a very nifty plugin called hoverIntent.
  6. A fancy Apple.com-style search suggestion
    “This example makes use of several techniques: MySQL (for the database), HTML/CSS for styling, PHP for retrieving the data and jQuery for the AJAX request. How about that for some nice way of combining powerful techniques to create something nice like this. You do need some basic knowledge about these techniques to fully understand this tutorial.”
  7. Creating a Dynamic Poll with jQuery and PHP
    “When you combine some neat functionality courtesy of PHP with the cleverness of jQuery you can produce some pretty cool results. In this tutorial we’ll create a poll using PHP and XHTML, then make use of some jQuery Ajax effects to eliminate the need for a page refresh, and to give it a nice little bit of animation.”
  8. jQuery Infinite Carousel
    This screen cast explains how you can create a simple and nice scrolling carousel and how you can also make it automatically loop round by itself. For the latter see also Automatic Infinite Carousel.
  9. Creating a Filterable Portfolio with jQuery
    If you have worked in your field for a while, there is a pretty good chance that you have a rather extensive portfolio. To make it a little easier to navigate, you will probably be tempted to break them into different categories. In this tutorial, I will show you how to make “filtering by category” a little more interesting with just a little bit of jQuery.
  10. De-Constructing Accordion and Hover Effects with jQuery
    This video tutorial explains how the hover and accordeon effects on Tim Van Damme’s site can be achieved using jQuery.
  11. Better form submission feedback with jQuery
    Browsers fail to give users effective feedback when the user submits a form. Users respond by clicking the submit button over and over. The problem compounds when users find out they’ve been charged 5 times or when you receive 5 contact submissions. The solution is to replace the submit button with a friendly message letting the user know the form is working.
  12. How to Make a Threadless Style T-Shirt Gallery
    There’s a thumbnail which is a full sized image in a container div, which is smaller than the full sized image. The image is centered within it, but doesn’t show entirely because overflow:hidden is turned on. When the mouse hovers over the thumbnail, overflow:hidden gets turned off, and the entire image is displayed.
  13. Create a gallery by using z-index and jQuery
    In this tutorial you will learn to combine the CSS property ‘z-index’ and the power of jQuery to create a unique gallery which have a appearance of a pile of pictures. Also check out Enhancing the z-index Gallery with a Preloader.
  14. Add a favicon near external links with jQuery
    External links should always be marked distinctly in order to make it easy for readers to see them easily. You cann add a CSS class to all outgoing links using the pseudo-class a[href^=http]. A more dynamic solution is using the favicon.ico of the external site, if it is available of course.
  15. Automatically generate table of contents using jQuery
    “Some time ago, I was debating with my friends on the topic: is there any use of generating table of contents automatically. The conclusion was that it can be useful in cases when the reading material is long enough and table of contents (TOC) has a fixed position on the screen. This tutorial will show you how to create such TOC in just a few lines of code.”
  16. Reddit-style Voting With PHP, MySQL And jQuery
    If you are a regular at Reddit, you must have noticed the way people vote there. You can either vote up or vote down. This tutorial will show you how to create such a voting system with jQuery, PHP and MySQL.
  17. Making a Content Slider with jQuery UI
    In this tutorial we’re going to be using the jQuery UI slider widget to create an attractive and functional content slider. We’ll have a container, which has a series of elements each containing different blocks of content. There will be too many of these elements to display at once, so we can use the slider to move the different content blocks in and out of view.
  18. Scrollable Timelines
    Making use of the overflow and scrollLeft DOM property to scroll elements is a much more effective use of the CPU, over animating using CSS top/left. This tutorial demonstrates the same effect used in two completely different ways.
  19. BBC Radio 1 Zoom Tabs
    This tutorial explains how to achieve the effect on the latest BBC Radio 1 website, where the mouse rolls over the image block, tabs slide up and the image zooms a little to reveal more of the picture.
  20. Creating A Slick Ajaxed Add-To-Basket With jQuery And PHP
    This is a detailed tutorial which shows creating an unobtrusive Ajaxed shopping cart using jQuery & PHP and can guide you to Ajaxify any e-commerce software you may already be using or coding.
  21. Create a Digg-style post sharing tool with jQuery
    We are going to make a digg-style post sharing toolbox. It’s all pretty straight forward and need a little bit of planning. The way it works is different with digg’s. If you view the html source code of Digg’s, it has the sharebox html code in every single post. But, in this tutorial we have only one sharebox, and all the links are sharing the same template.
  22. Using jQuery to play Media Files (MP3,WMA,etc,etc)
    I’m going to show you the most productive way (I guess you could say that) of playing a MP3 ( You can also use WMA, and you file of choice) on your website.
  23. Easy Retweet Button
    The script itself is completely standalone (no dependencies) and can be included in any page relatively painlessly. Additionally, since it’s just HTML, CSS, and JavaScript, it’s completely themeable and customizable to the style of your site.
  24. Create an amazing music player using mouse gestures & hotkeys in jQuery
    We will create an amazing music player coded in xHTML & jQuery that made use of mouse gestures and hotkeys. You can Click & Drag with mouse to interact with interface’s music player or use directional keys & spacebar instead of mouse.
  25. Creating a Virtual jQuery Keyboard
    This tutorial will explain how we can implement a simple virtual keyboard with some (well, okay, lots of!) help from jQuery.
  26. Quick Tip: Resizing Images Based On Browser Window Size
    In fluid layouts it is easy to format the text to adjust nicely when the window is resized, but the images are not as fluid-friendly. This Quick Tip shows you how to swap between two image sizes based on the current size of the browser, div, or whatever you decide to make the deciding factor. For those looking for a real life example, Last.fm uses this technique on their artist pages.
  27. Using Form Labels as Input Values with jQuery and CSS
    A nice little additive to web forms is to put the input labels inside of the inputs box as the starting value. By using jQuery to bring the label in as the value we can archive the desired effect without impacting accessibility, since the label elements are still there. Then we can take it a step further by dynamically adding a class to the input and use CSS to style the form only if JavaScript is enabled. The search box at the top of this page is an example of this technique.
  28. A jQuery inline form validation, because validation is a mess Të Position Absolute
    When it comes to form validation, it’s hard to have a versatile solution that works with every form. Figuring out how to display errors is not a simple task.  When an error needs to be displayed, the script creates a div and positions it in the top right corner of the input. This way you don’t have to worry about your HTML form structure. The rounded corner and shadow are done with CSS3 and degrade well in non compliant browsers. There is no images needed.
  29. jQuery File Tree
    jQuery File Tree is a configurable, AJAX file browser plugin for jQuery. You can create a customized, fully-interactive file tree with as little as one line of JavaScript code.
  30. Using jQuery To Manipulate and Filter Data
    When a webpage is designed to display large tables of data, a great amount of consideration should be dedicated to allowing the user to sort through the data in a structured manner. In this article, it will go over four techniques: hover effects, zebra rows, filtering, and sorting.

Windows 7 Review: XP vs Vista vs 7 in 80+ Benchmarks

APPLICATION BENCHMARKS

  Windows XP (x86) Windows Vista (x64) Windows 7 (x64) Percentage Difference: XP to Win 7 Percentage Difference: Vista to Win 7
ProShow Producer (sec) 826 1166 848 -2.66% +27.27%
Mainconcept Reference (sec) 1649 1657 1653 -0.24% 0.24%
Premiere (sec) 831 739 840 -1.08% -13.67%
Photoshop (sec) 141 127 140 +0.71% -10.24%
PC Mark 2005          
CPU 9116 9076 8568 -6.01% -5.60%
Memory 6459 6371 6463 +0.06% +1.44%
HDD 8029 6782 7537 -6.13% +11.13%
PC Mark Vantage          
HDD WNR 4657 4728 N/A +1.52%

Best scores in bold. Tested on a Intel Core 2 Quad Q9770 Extreme CPU, 4GB DDR2 RAM, 1TB Seagate Barracuda 7200.12 HD, and an ATI 4890 videocard.

For a comprehensive comparisons between XP vs Vista vs Windows 7, please go to the link below:

http://www.maximumpc.com/article/reviews/windows_7_review

Firefox 3.6 a1: new CSS features, faster JavaScript

Mozilla announced the availability of the first Firefox 3.6 alpha release (codenamed Namoroka). It introduces several new features and brings a number of performance improvements to the popular open source Web browser.

Namoroka, is tentatively expected to arrive in 2010. Performance and customization improvements are a major part of the road-map for it. Mozilla is also exploring some new user interface concepts that could be used to augment the tabbed browsing model.

Namoroka also offers several new CSS features. Among these, is the support for CSS gradients, which allow Web developers to paint the background of an element with a color gradient with multiple color stops. It is based partly on the gradient features described in the HTML 5 Canvas specification.

Although Namoroka is still at a very early stage of development, the 3.6 alpha includes very noticeable performance enhancements through the usage of just-in-time compilation and an optimization technique called tracing to deliver faster JavaScript execution.  JavaScript performance in 3.6 is roughly 15 percent faster than in 3.5.  It’s possible that we could see it gets even faster as the development cycle progresses.

Click here to download the FireFox 3.6 alpha1

Visual Studio Addon: NArrange

NArrange is a .NET code beautifier that automatically organizes code members and elements within .NET classes.

Why You Should Use NArrange?

There are several reasons you may want to consider using NArrange for your .NET software project:

  • Reduces the amount of time developers spend arranging members within code files. With NArrange, you don’t need to worry about where you place a new member definition in a class… just type away and run NArrange prior to compilation. After formatting, the new member will be automatically moved to the appropriate location in the source file.
  • Helps enforce coding style standards
  • When used as part of check-in procedures, NArrange can help reduce source code repository conflicts.
  • NArrange can automatically group similar code members into predefined region blocks, if supported by the language (C# and VB).
  • Reduces the amount of time spent searching for specific members in a code file. Through standard arrangement of source code files, every member of the team will know exactly where in a file to look for private fields, constructors, etc.
  • Flexibility – NArrange allows you to configure how members are organized (grouping, sorting, regions, etc.)
  • Sort Usings

For more information about this free product (open source), please go here.

Windows 7 Training Kit For Developers

The Windows 7 Training Kit for Developers includes presentations, hands-on labs, and demos. This content is based on Windows 7 RTM and it is designed to help you learn how to build applications that are compatible with and shine on Windows 7 by utilizing key Windows 7 features such as:

  • Taskbar
  • Libraries
  • Multi Touch
  • Sensors and Location
  • Ribbon
  • Trigger Start Services
  • Instrumentation and ETW
  • Application Compatability

And Application Compatibility topics such as:

  • Version Checking
  • UAC Data Redirection
  • Session 0 Isolation
  • Installer Detection
  • User Interface Privilege Isolation
  • High DPI

Click here to download it from Microsoft’s web site.

ASP.NET MVC V2 Preview 1 Released

The ASP.NET team just released the first public preview of ASP.NET MVC Version 2.  You can download it here.

ASP.NET MVC V2 will include a many new capabilities and features (some of these have already been called out on the ASP.NET MVC roadmap page).  “Preview 1” release contains a first look at some of the new features.  Many more features will show up in future preview builds.  The Preview 1 bits are still relatively early – the team is releasing today’s build to start receiving and incorporating feedback.

For more information about this preview, please visit Scott Gu’s blog.

US Cyber Challenge

Following President Obama’s announcement in May that the U.S. was “not as prepared” as it should be against mass Internet attacks, the Partnership for Public Service has released a study suggesting a need for stronger security on the .gov sites.

So on Monday, federal officials launched the “The US Cyber Challenge” which is looking for 10,000 young Americans with the skills to fill the ranks of cyber security practitioners, researchers, and warriors.  The program will nurture and develop their skills, give them access to advanced education and exercises, and where appropriate, enable them to be recognized by colleges and employers where their skills can be of the greatest value to the nation.

For more information, please go to this Url:

http://csis.org/uscc

Findings from the Survey for People Who Make Websites in 2008

A List Apart and people in the IT fields teamed up to shed light on precisely who creates websites. Where do they live? What kind of work do they do? What are their job titles? How well or how poorly are they paid? How satisfied are they, and where do they see themselves going?

Here’s the link to it:

“In 2008, 30,055 readers took part in the A List Apart Survey. Once more, data analysts Alan Brickman and Larry Yu crunched numbers this way and that. With a global recession in full swing as of December 2007, we were particularly interested to find out how financially and professionally secure web people felt, and whether there were discernible differences in the way people responded to questions about satisfaction and security in 2008, compared with 2007. This
year we also improved our fact-finding on freelance and part-time web personnel.”

http://aneventapart.com/alasurvey2008/