Premium Content


Premium Content articles are the very best articles from the world's leading internet technology, subject-matter experts. We have many categories of content below on a wide variety of subjects that have all been commissioned from big name authors.

Explore the Premium Content

Using the XMLHttpRequest object

The Ajax approach to building Web 2.0 applications relies heavily on the XMLHttpRequest object. The object is used to load information from an XML document or to query a database via a server-side page. JavaScript creates and manages the object as well as the callbacks that deal with loaded data.

The XMLHttpRequest object was first created by Microsoft in Internet Explorer 5 as an ActiveX object available through the MSXML WML parser. The latest release, IE7, includes it as a native object. Mozilla and Opera both include a native version of this object and Safari introduced the object in version 1.2.

As you’ll see shortly, the implementation is a little different across browsers so you need to be careful when writing code. In case you’re interested, the World Wide Web consortium (W3C) is implementing similar functionality in the Document Object Model (DOM) Level 3 Load and Save specification.

In this article, I’ll show you how to use JavaScript to work with the XMLHttpRequest object. We’ll explore the code that you need for a cross-browser approach and I’ll show you how to hook into the results with JavaScript. After I’ve shown you some of the theory, we’ll work through a simple example.

You can download the reference files for the tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file. The download includes the examples covered here.

Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.

We’ll start by looking at how the create the XMLHttpRequest object.

Read More

Photoshop CS2: Filters

The “Other” filter included at the bottom of Photoshop’s Filter list presents a mystery – just what is “Other,” and what does it do? In this tutorial, Linda demystifies the Other Filter through a series of steps that show how to brighten pixels in relation to surrounding values, how to sharpen images without noise, how to mask quickly, and how to relocate and shift a selection – all through the “Other” filter.

 

“Other” Filter Possibilities

The “Other” filter is an odd name for a filter, as it doesn’t describe the full capabilities hidden within this tool. You can create special effects, save time on tasks that might be accomplished through other Photoshop tools, and alter your images quickly with some surprising special effects. In other words, if you have an image that you think is dull or unsalvageable, put it through some of the Other Filter options to see what happens. You might develop an image that is suitable for any number of projects.

For the first part of this tutorial on the “Other” filter, I’ll use the rather boring image below, which is also included as a download with this article (“flowers.psd”):

 

 

 

 

 

 

 

 

 

NOTE: All the equations within this article were used on 300 ppi images. When you open the downloaded files, change the resolution from 72 ppi to 300 ppi to follow along (Image > Image Size > Change Resolution from 72 to 300 > click OK).

 

Read More

Building Your First ASP.NET 1.x Application – Part 1

When working with a complex application framework such as ASP.NET 1.x it’s tough to know where to begin sometimes. Which areas to design first, what pages to add, how to wire up your database, how to create a secure area and a login form, are some common obstacles you’ll come across when you dive into Visual Studio .NET and actually start development.

There really is no one-size-fits-all approach to starting a web application since there are simply too many factors to consider, and each application will have its own unique set of requirements. Typically you will take a simple 2-tier approach to your application unless you’re working with a large client with a very large amount of concurrent users.

In order to be cost effective in your development timeline a 2-tier approach will cut some of the advanced design principles in favour of delivering a product quickly to the customer. The definition of 2-tier means there are no middle tier or database tier components, your web forms will communicate directly with the database.

The reality is that 2-tier designs are very unscalable and difficult to maintain. However not every client can afford the extra effort required to make everything nice and object oriented and scalable to large amounts of users, servers and dedicated components.

So for the most part you’ll likely find yourself developing small applications which require a quick rollout to production and delivery to the customer. Using the 2-tier approach with the built in data wizards in .NET will help facilitate this process.

When you’re first starting out with ASP.NET you’ll likely not know where to start, even when using a simple 2-tier design framework. The purpose of this article is to take some very basic features which you’d find in almost any application and show you how to develop them step by step.

Note: Visual Studio .NET 02/03 running ASP.NET version 1.x is required to implement this tutorial. Additionally, access to an SQL Server with the built in Northwind database is highly recommended as it is the database used as the data source for this tutorial. If you are comfortable with database connectivity you may apply the techniques in this tutorial to another database of your choice.

Both C# and VB.NET code samples will be provided

Read More

Neat Form Tricks

Introduction

If you have ever used rich web applications like Microsoft CRM or QuickBase you have probably seen a neat trick or two you would like to be able to use in your own application, but just don’t know how.
Text fields with icons and active links, form fields changing their background color after the value has been changed, length restricted text area boxes – those are things which (if used properly!) will  impress your boss and make you application more slick, robust and user-friendly.
Neat web form tricks - this will be the topic of today’s article.

Read More

Photoshop CS2: The Filter Gallery as a Starting Point

Photoshop CS2: The Filter Gallery as a Starting Point

In this article, Linda creates a self-promotional postcard with the use of templates and Photoshop’s Filter Gallery, Colour Range options, and the Layers Style Palette. Throughout, she explains how you can push these Photoshop tools to the limit to achieve a wide number of effects – in one case, as a neon-like effect that turns a simple photograph into an abstract representation. Further, she explains what you might want to include on a self-promotional mailer to advertise your business.

Filters: From So-So Images to Artistic Print Projects

I’m an advocate for saving images even when those images are far from perfect in resolution or in subject matter. My reasoning behind this obsession is supported by Photoshop’s filters. Photoshop filters can help you alter images for specific projects, such as changing a low-resolution photograph into a successful silkscreen image (see below). Additionally, filters can enhance subject matter, a change that can help the viewer perceive your image in a more positive light. If you sell your images, this change could mean more revenue.

Read More

Ajax DOM Scripting Techniques

Ajax DOM Scripting Techniques

The Ajax approach to developing Web applications relies heavily on JavaScript. JavaScript is used to:

  • Make server requests with the XMLHttpRequest object
  • Process the server response
  • Manipulate and update the interface by scripting the DOM
  • Respond to user events in the browser

In this article, I want to look at the third of these areas – DOM scripting. The DOM (Document Object Model) provides a way for Web developers to traverse an XHTML document. The DOM specification was developed by the World Wide Web Consortium (W3C) and it creates a tree-like structure from XML documents.

I’ll cover some of the useful scripting techniques that you’ll need for working with Ajax-style applications including:

  • Finding elements by their tag name or id
  • Locating specific elements, text and attributes
  • Creating content
  • Dynamically styling elements

I’ll also show you the DOM Inspector in Firefox.

You can download the source files for the tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file. The download includes the examples referred to in this article.

Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.

Read More

Photoshop CS2: Levels and Curves

Photoshop CS2: Adjustment Layers, Levels, and Curves

In this tutorial, Linda explains why Photoshop CS2’s adjustment layers are important to use when altering images, and she begins to illustrate how these layers work with the use of the levels and curves. These two tools can help you to adjust tonal ranges and colour balances within your images manually so that you maintain more control over the outcome rather than using the “automatic” levels and curves adjustments.

Read More

Photoshop CS2: How to Recognize Deceptive Photographs

Photoshop CS2: The Bad and the Ugly

Photographers, graphic designers, and artists now have access to one of the most powerful tools that Adobe’s offered through their Photoshop CS2 software. Digital artists can alter landscapes, touch up faces, and create fantasy images that boggle the mind. Altered images, however, have pervaded the news media through deceptive photojournalism. In this article, Linda offers some infamous and not-so-famous photographic alterations that have been detected over the past century. Accordingly, she’ll lead you through the methods that were used to create these images.

Read More

Five Star rating system. Part II

Introduction

This is the second, final part of the series on creating Five Star rating system. You will need to complete the first part in order to follow this article.

Read More

A Search Engine Friendly Navigation Menu with CSS and JavaScript Part 2

Welcome to part two of this tutorial.  In the first article we created an HTML based navigation menu and a CSS file to control its appearance.  This article will look at creating the behaviour with some very simple JavaScript.  This behaviour will ultimately make the whole menu function as we want it to.  One of the benefits of this navigation menu is that the top level menu links will all still work if JavaScript is switched off on the client-side.  The second level elements won’t work of course, but this doesn’t have to mean that these pages are unreachable; you can just hard code some basic links to each of the sub-pages on the ‘index’ page for each of the directories.  But for those that have JavaScript switched on, we can do the whole drop-down thing.

Read More

An Introduction to ASP.NET & Visual Studio .NET 2003

Although this version of Visual Studio .NET is not the latest version, there are still many developers such as myself who use this product every single day. Some of the radical changes brought about in the newest version of Visual Studio .NET 2005 made it nearly impossible to simply upgrade existing VS.NET 2002/2003 projects into the new version. We’re therefore left continuing development in the older version on complex projects that are simply too large to warrant upgrading.

In addition to developers who have been working with this product for a few years now there are also many new developers jumping into the Microsoft .NET world and learning Visual Studio .NET for the first time. As with any enterprise level development platform there is normally a large learning curve right off the bat.

The Visual Studio .NET environment itself really isn’t all that complicated, but can be a little overwhelming when first trying to navigate around. The majority of learning will be done on the framework itself and the different project types available.

In this tutorial we will look at some of the basic features of the Visual Studio .NET environment to help beginners get up and running and save some research time so you can feel more comfortable with the product. We’ll also explore one of the project types, ASP.NET, and look at some of the basic principles and theories behind this web technology.

Note: Although this tutorial is based on Visual Studio .NET 2003, version 2002 is nearly identical and should be able to be used with this tutorial as well

Read More

Photoshop CS2: Beyond Colour – Black and White and Sepia

What if you need a Black and White image to enter into a contest? Or, what if you shot a historic photo and the newspaper only prints black and white? In this article, Linda shows how to successfully convert your colour images into monochromatic legends. The tools that you’ll use include adjustments, histograms, Colour channels, Channel Mixer, and Calculations. In addition, once you have that perfect black and white image, Linda shows two different methods to add a sepia tone to that image.

Some History

It wasn’t until 1861 when Scottish physicist James Clerk-Maxwell demonstrated a colour photography system involving three black and white (B&W) photographs, each taken through a red, green, or blue filter. His first photo of a tartan ribbon was turned into lantern slides and projected in registration with the same colour filters. This was the beginning of the photographic colour separation method.

In 1906, panchromatic black and white film and therefore high quality colour separation colour photography were made available; and, in 1907, the first commercial colour film, the Autochrome plates, were manufactured by the Lumiere brothers in France. But, colour photography really didn’t catch on with the general public until 1936, when the development of Kodachrome, the first colour multi-layered colour film and the development of Exakta, pioneering 35mm single-lens reflex (SLR) camera were made available.

In fact, colour photography evolved rapidly during my lifetime. I remember when C-41 colour negative process was introduced in 1973, replacing C-22 in the darkroom. My fellow art students and I were mesmerized with the new process, a feeling that you might equate today with the introduction of any new technological product that makes life just a little bit easier.

But, as beginning photography students, we often were steered away from colour in our studies. B&W images, instead, became the vehicle to study depth of field and tonal values, and it was – in the long run – less expensive to develop in the darkroom. In addition, most magazines used B&W photographs until just ten years before this new colour development. Yes, hand-colouring negatives and prints was part of our education at that time.

Read More
Newer articles Older articles