Posted in July 2008

Design Patterns

On July 20th, 2008 Tyrone wrote on the subject of Programming.

Design Patterns are an essential tool for any object orientated programmer who wants to take his/her skills to the next level. Understanding the specifics of Design Pattern practices and methodologies will help developers uncover reoccurring patterns in software development and give them the tools to apply the correct solution.

For every difficulty encontered during application development, chances are this problem was encountered before (and solved). Design Patterns represent key programming practices that have been proven to get the job done in the most efficient, reusability and extensibility. This greatly increases efficiency of code and helps to break an application down into loosely compelled manageable chucks.

As a .Net developer you may have used some of these patterns without even knowing. A design patterns name captures the basic concepts that govern its use and a common practice is to include the pattern name in the name of the object that implements it.

You may have come across the following names while working with the .Net framework:

  • Proxy
  • Adapter
  • Command
  • Factory

The deeper your understanding of Design Patterns the more you’ll be to understand the .Net framework and how it can leverage you applications.

Main Design Patterns Concepts

  • Use interface inheritance over concrete base class inheritance
  • Create loosely coupled objects to promote code reuse by keeping object small and specialised
  • Defer / Delegate responsibility to specialised objects using composition

Choosing the correct pattern
The best way to decide which pattern is fit for the jobs it to break down your development specification into each requirement. If these requirement exhibit certain characteristics that relate to a design pattern then apply it. E.g. If you application is responsible for monitoring a file system and reporting changes back to a number of objects you are most-likely to implement the Observer pattern.

Summary
Once you have gained an understanding of object orientated concepts you should be ready to tackle Design Patterns. You will be surprised how many patterns that are already familiar to you and how much the put things into perspective. You’ll also find that the more you learn, the more you’ll see application development from a different perspective (almost like seeing the Matrix!!). To truly understand the benefits of Design Patterns you have to apply them to your application development. This will improve your object reuse and make future program changes less painful!

List of Design Patterns LINK:

  • Adapter Pattern
  • Command Pattern
  • Composite Pattern
  • Decorator Pattern
  • Factory Pattern
  • Flyweight Pattern
  • Intepreter
  • Model-View-Controller
  • Null Pattern
  • Observer-Observable
  • Singleton
  • State Pattern
  • Strategy Pattern
  • Template Pattern
  • Union Pattern
  • Visitor Pattern

The benefits of RSS Feeds

On July 20th, 2008 Tyrone wrote on the subject of Internet,Social Media,Web Technology.

RSS (Really Simple Syndication) can become an invaluable tool if used correctly. Although the use of RSS is usually reserved for techies, it is only a matter of time before this technology is embraced by regular web users.

RSS feeds are designed to aggregate multiple feed of information by grouping and storing topics of interest into one location. Users can browse these feeds at their own leisure safe in the knowledge that they can access the latest information relating to their chosen interest. If you are interested in a particular subject, (i.e. football) you could visit a site that exposes its content via RSS and subscribe to it. Now, at your own leisure you can check your RSS feed and browse the latest feeds (or newly posted information) in a uniformed and sortable format.

Each item within a feed contains a title, date, summary and sometimes videos and images. If the topic is of particular interest, you can click the feed link and jump off to the source of the feed (web site) to read more. This is a much cleaner and efficient way of keeping up to date with topics you are interested in rather than trawling the internet and storing lots of bookmarks. This way the information comes to you without having to lift a finger. Users are completely in control of the information they receive as unsubscribing is just as easy, if not easier that subscribing. You remain totally control of the flow of information. RSS feeds are a huge time saver and can boost you productivity .

Types of RSS feeds:

  • Blog posts – Receive updates every time a new blog is posted
  • Article Feeds – Get summaries or articles written about a particular subject
  • Forum Posts – Receive updates each time user reply to a particular forum post you are interested in
  • Retail Feeds – Many ecommerce sites are publishing whole product lines as RSS feeds. Each time a new product is added you’ll be notified
  • News Feeds – Receive breaking news from sites like Google
  • Industry Specific – Keep up to date with industry related articles, news and reviews that maybe related to your industry

Subscribing for RSS Feeds
The best way to do this is by registering with a Feed Reader site like Google Reader, which allows you to store all of you feeds in one central location online. This is a simple process especially if you already have a Google account. Once you have done this you are ready to start subscribing to RSS feeds. The next time you see an RSS link or image simply click it, choose the feed reader you have registered with from the dropdown menu and click subscribe. You’ll instantly have access to the entire feed displayed in chorological order.

Create your own feed
If you publish regular information on your site you can benefit from publishing this as an RSS feed. You have nothing to lose and everything to gain. By not having an RSS feed you are missing out on an opportunity to keep your customer / audience informed on what you business is up to. RSS feeds should be thought of as a free promotional tool. You’ll be able to relax safe in the knowledge that as soon as new information is add to your site users will be informed. This will bring in more site traffic a users may want to find out more or purchase products

Introduction to Developing .Net Mobile Applications

On July 20th, 2008 Tyrone wrote on the subject of Programming.

There are many tools on the market for creating application for mobile phones and portable devices. This blog post investigates the technologies necessary for creating Microsoft related ASP.Net mobile applications.

Window Mobile (OS)
Window mobile is a compact operating system for mobile devices. These devices include Pocket PCs, Smartphones, Portable Media Centres and on-board computers for cars. Windows Mobile has been designed to be similar aesthetic to Vista and is currently at version 6.1 with a new release scheduled for 2010.

.Net Compact Framework
The .Net compact framework is a scaled sown version of the .Net Framework and uses some of the same class libraries with a few additional libraries designed specifically for mobile devices. This can be integrated with Visuals Studio 2003, 2005 and 2008 to develop impressive mobile windows form based and web based applications.

ASP.Net Mobile Controls and the Microsoft Internet Toolkit
Developing applications for mobile devices can be a challenging as there are certain limitations, which include:

  • Different mark-up languages for PDAs, Cell phones or Japanese phones.
  • Devices have a varying number or display lines, horizontal/vertical orientation and screen colours.
  • Different network connectivity
  • Capabilities, display resolution and ability to make phone calls.

All these factors must be taken into consideration when developing applications for mobile devices.

This is where the Microsoft Internet toolkit comes in, as it addresses these issues so that developers can build one mobile web application that delivers the appropriate mark-up for a wide range of mobile devices.

The mobile toolkit contains:

  • Mobile web form controls which are similar to ASP.Net controls as the generate mark-up code
  • Mobile Internet Designer which integrates with Visual Studio .Net IDE to provide a web application design environment
  • Browser Capabilities which makes it possible to run ASP.Net functionality on mobile devices
  • Quick Start Tutorial with sample code
  • Developer Documentation
  • Device adapter code samples

Using a combination of the Windows Mobile operating system, .Net Compact Framework, and the Microsoft Internet Toolkit applications can be written to run on a wide range of mobile devices in a similar manor to that of regular browser base applications.

Summary
These are the three basic tools that are necessary to start building applications that target mobile devices.
Mobile devices are becoming increasingly popular as people continually want to stay connected when they are away from their desk. Microsoft has developed a cohesive little package of products that integrate well together and provide an infrastructure similar to their full blown application development environment. This will hopefully encourage developers to venture into the world of mobile application development.

SQL Server 2008

On July 20th, 2008 Tyrone wrote on the subject of Hosting.

Like many of Microsoft’s recent software products (Visual Studio .Net, .Net Framework or C# 3.0) SQL Server 2008 has been enhanced based previous versions by fixing bugs and adding new functionality built based on existing features. This is a welcome strategy that helps ease the transition for developers and database administrators.

In this blog post I will briefly touch on some of the database administrator functions and focus on the developer functionality, additions and upgrades.

Administrators

Management
SQL Server 2008 policy management has been updated and is now called the ‘Declarative Management Framework’. It is now possible to configure multiple database servers so that a standard configuration can be applied and maintained on multiple servers and databases.

Multiple Server Integration makes it possible to execute queries against multiple servers by placing them within special groups. Result can be categorised into one result per server or merged together as one set of results.

Security (Transparent Data Encryption)
A cool new feature of SQL Server 2008 is the improved flexibility of data encryption. Data encryption is now a property of the database instead of application code. This makes the database administrator and developer’s life’s easier as now they don’t have to make changes to the database every time encryption functionality changes at the application level.

Resource Governor
Database administrators can now specify how much CPU/RAM each user is allowed to use. This will help to eliminate situations where a user’s mistake could potentially bring down a whole server. By imposing these limitations users are restricted to a predefined amount of CPU/RAM usage.

Developers
Developers have also been treated to some appealing updates in the latest version SQL Server. There are a number of new features that have been added to make a developer’s life easier and increase their productivity.

LINQ Vs SQL
Most developers are pretty familiar with writing T-SQL queries to retrieve data for application objects. Most are also aware of the distinct syntactical differences between VB/C# and T-SQL. SQL Server 2008 provides something called the LINQ to SQL provider, which makes it possible to write LINQ commands directly within SQL Server. This lets develops use one common object centric language in the application domain and the database domain. Developers will be able to use the LINQ programming syntax on database table and application collection, XML and datasets.

DATETIME Data Type
Datetime has now been separated into two separate data types so that each one can be defined independently. These new data types will help increase performance by eliminating the need to perform certain operations to extract the date or time portion of the Datetime data type.

GEOGRAPHY and GEOMETRY
These two additions have been added to better represent location specific data. This eliminates the need to break geography and geometry data down into formats that fit other standard data types.

Syntactic Sugar
The SQL language has had some small additions in the shape of Inline Variable Declarations:

Old
DECLARE @myVar int
SET @myVar = 5

New
DECLARE @myVar int = 5

C like math syntax
SET @i += 5

Icing on the cake
SQL Server 2008 had been blessed with Intellisense. All I can say is “about time too”. Gone are the days where you would have to do a Google search to remind yourself of certain T-SQL keywords, statements or syntax. Now SQL Server will give you’re a full list of statements and keywords available for a particular variable’s data type as well as column names for a particular table.

Conclusion
SQL Server offers some interesting new features that will keep developers and administrators happy. These new features integrate well with Visual Studio and the .Net framework 3.5 making SQL Server a nice finishing touch to a well rounded application development environment.

Web Usability

On July 20th, 2008 Tyrone wrote on the subject of Design,Development,Web Technology.

Web usability is about designing your web site so that users can achieve their desired goal quickly and easily. Taking time out during development to make sure your site meets usability standards can have a huge benefit to your business.
“A web usability redesign can increase the sales/conversion rate by 100%”
- Jakob Nielson

Designers and developers must make sure they spend adequate time planning the flow of information by firstly identifying the needs of their intended users, then creating a path for site visitors to follow, which firstly, addresses a users initial concerns, then gradually takes then towards achieving their goals. This is achieved by understanding the goal the goals of you target users and then identifying the information your site needs to provide.

There are millions of web sites all competing for the same space, so it is important that you get the right information across a quickly as possible. It has never been easier for users to find a competitors web site, which may do a better job than yours. It is important that you meet the immediate needs of your site visitors as this the fundamental principle behind good web design.

Web designer must realise that if a web site is hard to use or hard to read, users will leave the site. This is because most users simply do not want to spend a large amount of time trying to figure out how to use a site as there are plenty of other sites to choose from.

Definition of Usability

  • Easy to learn
  • Efficient to use
  • Easy to recover from errors
  • Easy to remember

 

Navigation (Breadcrumb Trail)
Site navigation is crucial as users must know where they are and where they are going at all times. The easiest way to achieve this is to follow certain site convention, layouts and phrases (i.e. company logo should be in the top left corner with a link back to the home page, ‘about us’ links should display organisational information, shopping cart or basket should refer to items a user wishes to purchase etc).

These conventions must not be adhered to whenever possible as users have become accustomed to them. Developers and designer must use this to their advantage because sticking to them can increase the usability of the site.

Download Speeds
How many times have you exited a web page because it has taken too long to download? As broadband speeds get faster users are becoming increasingly impatient when it comes to page download time. On average users are prepared to wait 8.6 seconds, so it is important that you pay attention to this. There is no use having a fancy web site with high resolution images if users aren’t prepared to wait long enough to see them.

Faster page download speeds can be achieved by using CSS instead of images, placing CSS code in a separate file and using Unobtrusive JavaScript.

Usability Testing
Many web designers fail to complete adequate usability testing due to time and budget constraints. They fail to realise that a usable web site or CMS will eliminate a lot of time spent providing technical support. It is crucial that designers and developers know that the adoption of usability testing will eventually pay for itself many times over.

The key is to start usability testing early and to involve your target demographic. If possible, use five people to complete these tests as this has been known to uncover as much as 85% of usability issues.

Conclusion
Usability is a hugely neglected area of web development and is an issue that needs to be addressed. We must always remember that users always come first and that if you make the user your priority then they will reward you with their loyalty.

It is not good enough using programmers and designers to do the testing either, as IT professionals do not think like the average web user. The best way to complete thorough testing is use candidate that are similar to your target audience.

Usability is an incredibly valuable tool that can save an organisation a lot of money, improve their competitive position and customer loyalty. It’s never too late, so start today.

« Older Posts