Friday, February 6, 2009

User Experience Design Patterns

User Experience has a lot of impact in the overall usage and eventually the success of any software but practically it is one of the most ignored components in any software development activity. The software engineers out there tend to engineer very sophisticated but complex interfaces without keeping in view the overall usage of it. They tend to come up with a geeky look which the end users don’t really understand.

So considering this importance and need, there have been quite a few efforts to establish Design Patterns related with user experience, but the latest one initiated by Infragistics folks outstands all. Infragistics has launched a User Experience Explorer in the name of Quince. It’s a Silverlight based web application (you need Silverlight plug-in for your web browser and its around 4.5 MB installation package). It provides a very interactive environment to explore the different design patterns related to user experience. You can browse them via tags, user actions, free text search etc. Each of these design patterns is elaborated with text and pictorial examples and that too in an interactive way.

Moreover, you can contribute to all this by sharing more examples for an existing pattern or you can even propose a new design pattern that hasn’t already been listed there.

It’s a must see web app; have a look at it in your free time to get some inspirations and food for thought!



Sunday, November 9, 2008

Engineering Enterprise Level Applications using Microsoft .NET Framework

If you have been into engineering medium sized business applications using Microsoft .NET Framework (or even any other framework/language), you must be familiar with ‘n-tier application’ and ‘service oriented architecture’ but the terms ‘dynamic clustering’, ‘horizontal scaling’, ‘fail over clusters’ and ‘interoperability’ might sound a bit fishy. These are the technologies and techniques involved in the engineering of fairly sophisticated, enterprise level, high performance, fault tolerant and horizontally scalable applications.

Tech geeks at Microsoft .NET Framework Developer Center have come up with a great end-to-end sample application in the name of ‘.NET StockTrader’ in order to demonstrate how to engineer enterprise level applications using Microsoft .NET Framework. Some of the distinguishing features of this sample application include
  • Load Balancing and Failover clustering
  • Centralized configuration management of clustered service nodes 
  • Horizontally scalable via dynamic clustering 
  • Interoperability with Java and PHP services 
  • Service host failure detection and automatic restarts 
  • Full interoperability with J2EE and IBM WebSphere's Trade 6.1 
The ‘.NET StockTrader’ sample application has two parts; the core ‘.NET StockTrader’ application and the ‘Configuration Service’ implemented by the ‘.NET StockTrader’ components (web app; business services, and order processing service). The ‘Configuration Service’ is engineered to provide dynamic clustering of service nodes, fail over and load balancing, replication of updates in configuration to allow adding new service nodes on the fly as well as providing the centralized management of configuration data through a single web based interface for the core ‘.NET Stock Trader’ application.

You can download the complete sample application with source code and technical documentation from the official website of ‘.NET Stock Trader’ Sample Application. Although it’s a fairly complex application and does need quite some time to completely absorb and understand it but it’s a great learning experience. I would highly recommend you to start experimenting with it and read and learn more and more about it in order to broaden your tech vision and have insight into engineering sophisticated applications using .NET Framework.

Thursday, October 23, 2008

HTTP Compression?

Almost every reader of this blog must be familiar with the term ‘Compression’, but the term ‘HTTP Compression’, might sound a bit strange for quite a few of you.

Today, with the ever increasing tendency of companies providing more and more services over the web; the page load time and the overall responsiveness of the web application, are becoming more and more critical in the adaptability of that web application.

All the web engineers out there must have wondered that despite of their strive to improve the response time of their web application, using techniques like data caching, output caching, minimizing number of web requests, moving JavaScript and CSS in external files, placing JavaScript at bottom and CSS at top and what not; but still there is some thing missing and that’s hindering the overall load time of their web application and affecting the end user’s experience.

Why your web application’s load time is not comparable to the load time of Yahoo and MSN home pages, even though their home pages are showing a lot of dynamic contents? It’s true that their solution is exploiting the full capabilities of hardware too, along with the software but still, there is some thing which even you can configure at the software level to improve the overall page load time of your application in order to improve not only the performance of your web application but to have an improved end user’s experience as well. That software level tweak is called the ‘HTTP Compression’; something similar to zip or rar, but for HTTP responses.

‘HTTP Compression’ is a web standard in which GZip (GNU Zip) or Deflate encoding is applied to the overall payload of the HTTP response by the web server, and at the client end i.e. web browser, the HTTP response is decompressed and rendered to the end user. This result in a significant decrease in the overall network traffic and improves the over all load time of your web application to a very significant extent, with an additional advantage of saving the costs associated with the network bandwidth consumption.

‘HTTP Compression’ is supported by all the modern web browsers and web servers. You can not only compress the static contents (css, js …) but the dynamic contents (.aspx, .asp, .php …) as well. Here is a walkthrough on How to enable HTTP Compression on IIS 6.0 for ASP.NET based web applications. You can definitely Google for enabling this very feature on other web servers as well.

Here are links to the analysis reports, showing the percentage decrease in payload and the improvements in the overall load time for MSN, Yahoo, Facebook and trg tech @ blogspot. Do have a look at these in order to actually appreciate the overall performance gain achieved because of ‘HTTP Compression’ by these web giants.

Sunday, July 27, 2008

Interop Forms 2.0

Did you know that Microsoft released the Interop Forms Toolkit 2.0. This toolkit allows developers to create Activex controls that can be hosted in VB as well as forms that can be called from VB. But this toolkit is not limited to VB alone. It can easily be used to create Forms and controls for use in VFP

To download the kit, please visit: Microsoft Interop Forms Toolkit 2.0

For a walkthrough of using Interop 2.0 with VFP9, please visit: Using the Interop Forms Toolkit 2.0 in VFP9 - A Walkthrough



Submitted by Kashif Pervaiz

Thursday, July 24, 2008

Extension Methods in VS 2008 (C#)

Extension methods allow adding new methods to the public contract of an existing CLR type, without having to sub-class it or recompiling the original type. VB also supports extension methods.

A simple example would be to check for valid email address. We would probably create a static function and pass the input string

using System.Text.RegularExpressions;

namespace Master
{

public class GenericFunctions

{

public static boolean IsValidEmail(string strIn)

{

return Regex.IsMatch(strIn, "^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");

}
}
}

//Add the reference

using Master.GenericFunctions;

...


string strEmail = Request.QueryString[“email”];


if (!GenericFunctions.IsValidEmail(strEmail))

MessageBox.Show(“Invalid Email Address”)


Now with the help of extension methods, we can do this…

string strEmail = Request.QueryString[“email”];

if (strEmail.IsValidEmail())
MessageBox.Show(“Invalid Email Address”)


By make the following changes in the GenericFunctions class

using System.Text.RegularExpressions;

public static class GenericFunctions
{
public static boolean IsValidEmail(this string strIn)
{
return Regex.IsMatch(strIn, "^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
}
}


The static method has a "this" keyword before the first parameter argument of type string. This tells the compiler that this particular Extension Method should be added to objects of type "string". Within the IsValidEmail () method, we can access all of the public properties/methods/events of the actual string instance that the method is being called on, and return true/false depending on whether it is a valid email or not. Next time we would explore extension methods provided within the System.Linq namespace. Happy journey!


Submitted by Kashif Pervaiz

Tuesday, July 22, 2008

Meet Windows Presentation Foundation (WPF)

"A new and elegant look for the applications."

Formerly known as Avalon, Windows Presentation Foundation (WPF) is the new graphical subsystem in Windows Vista that provides a holistic means for combining user interface, 2D and 3D graphics, documents, and digital media. Built on the .NET Framework, WPF provides a managed environment for development with the Windows operating system. This takes advantage of the existing investment made by Microsoft in the .NET Framework, and allows developers familiar with .NET technologies to rapidly begin developing applications that leverage WPF.

WPF introduces a new XML-based language to represent UI and user interaction, known as XAML (eXtensible Application Markup Language—pronounced “zammel”). Similar to Macromedia’s MXML specification, within XAML elements from the UI are represented as XML tags. Thus, XAML allows applications to dynamically parse and manipulate UI elements at either compile-time or runtime, providing a flexible model for UI composition.

WPF applications can be deployed as standalone applications or as web-based applications hosted in Internet Explorer. As with smart client applications, web-based WPF applications operate in a partial trust sandbox, which protects the client computer against applications with malicious purpose.
Furthermore, WPF applications hosted in Internet Explorer can exploit the capabilities of local client hardware, providing a rich web experience with 3D, digital media, and more, which is the best argument for web-based applications available today.

Submitted by Mohammed Atif


Tuesday, July 8, 2008

Have you heard about 'NHibernate'?

NHibernate is an Object-relational mapping (ORM) solution for the Microsoft .NET platform: it provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.

NHibernate's primary feature is mapping from .NET classes to database tables (and from CLR data types to SQL data types). NHibernate also provides data query and retrieval facilities. NHibernate generates the SQL commands and relieves the developer from manual data set handling and object conversion, keeping the application portable to most SQL databases, with database portability delivered at very little performance overhead.


NHibernate provides transparent persistence for Plain Old CLR Objects (POCOs). The only strict requirement for a persistent class is a no-argument constructor, which does not have to be public. (Proper behavior in some applications also requires special attention to the Equals() and GetHashCode() methods.)

NHibernate is free as open source software that is distributed under the GNU Lesser General Public License.