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
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.


