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

Building Rich Text Editor. Part VI

Introduction

This is a Part VI of the series on building online Rich Text Editor.

In previous articles (Part I to Part V) we have developed various application features from editing and formatting to saving the results to the hard drive and forwarding to an email recipient as a message or an attachment.

This iteration was intended as the last one, but the topic (Opening and Saving files from the server) turned out to be so extensive that I decided to dedicate almost the entire article to building the Server File Browser which will be used for entering file name when saving as well as selecting files when opening from the server.

In the next iteration we will complete developing the Open and Save functionality while covering the actual procedure of reading and writing files to/from the server.

Read More

Creating a Data Tier in ASP.NET

Every application starts with an idea, a thought or a need of some kind and the software of course becomes the solution. Once requirements have been gathered and the project vision is established the architects usually begin designing a logical framework for the application based on several factors.

It’s usually recommended no matter what the size or projected complexity of the application that there is some form of separation between interface logic, business rules and database logic. Creating this separation not only maintains a clean easier to read application but it also creates physically separate components which can then be reused in other areas or even deployed separately on other dedicated servers and invoked remotely.

A middle of the road approach is what most mid-sized applications will implement. Where most of the business logic will remain tied into the front end code and the database logic separated into another component and invoked as needed from the front end. This is still a 2-tier approach but it is definitely more favourable than having the database logic and SQL code embedded into the front end.

In this tutorial will we look at a fairly basic example of how to implement a database connection layer into an ASP.NET project which can then be invoked from your aspx pages in the code-behind. This style of approach bypasses all GUI wizards and connection/adapter controls which would normally be configured on the code-behind file. Instead we will push this logic into a separate component.

Note: Part 1 requires Visual Studio .NET running ASP.NET ver 1.1 and access to any version of SQL server. Both VB.NET and C# code samples will be provided

Important Note! This tutorial will ‘not’ demonstrate how to actually execute the database requests or link to a sample database. This tutorial provides the class required to create a proper database layer which you can then implement into your own applications on any SQL database of your choice. Reading samples tables or executing stored procedures for example are not demonstrated in this tutorial.

Read More

Building Components with ActionScript 2.0 – part 2

Welcome to the second article in this series on building custom components. In part 1, I showed you the steps required to create a custom component. In this tutorial, we’ll create our first simple component from scratch. The component will generate a simple shape – circle, oval, square, rectangle or triangle – and allow us to set the colour. You’ll also be able to size the component from the Properties panel. We’ll call this the Shape component.

In this tutorial, we’ll cover:

  • Planning the component
  • Creating the movie clip for the component
  • Creating the class file for the component
  • Associating the class file with the movie clip
  • Generating the component
  • Using the component in another Flash file

I’ve assumed that you understand the general process of creating a component. If not, you might want to go back and look at the first article in this series. I have also assumed that you know how to write AS2.0 class files.

Before you can complete the tutorial, you’ll need to have a good understanding of creating class files in ActionScript 2.0. I’ve used Flash 8 for the sample files so you’ll need this version if you want to explore to completed example. You can also recreate the example in Flash MX 2004.

You can download the files referred to in this 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.

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

Web to Print: LCD Monitor Calibration part 2

In this second of two articles, Linda explains the first and most basic process in colour management – calibration for LCD monitors through the use of Adobe Gamma software (a basic Photoshop program). Even if you don’t use this program to calibrate your LCD monitor, you can follow along to learn how to use the Adobe Gamma calibration settings to describe how your monitor reproduces colour in collaboration with any other hardware and/or software. You will also learn about problems inherent with critical image editing on certain LCD displays throughout this short series.

Read More

Display SubTotals in ASP.NET DataGrid

The DataGrid is of course a natural fit for display tabular sets of data in a web application and it does its job quite nicely with support for paging, sorting and even editing in place. As you develop your applications however you will inevitably come across a requirement which is not covered by the built in functionality.

For the sake of having a set of data to work with we’ll connect to the sample Northwind database provided with all installations of SQL server, and the sample application will be built using ASP.NET version 1.1

Note: A version of SQL server with the sample Northwind database is required for this tutorial. Both VB.NET and C# code samples will be provided.

Read More

Web to Print: LCD Monitor Calibration Part 1

Whether you want to expand into print or become more professional with your photography, what do you need to know about how colour translates from your computer screen to a printed page? In this first of two articles, Linda explains the first and most basic process – calibration for LCD monitors through the use of Adobe Gamma software (a basic Photoshop program). Even if you don’t use this program, you can follow along to learn how to use the Adobe Gamma calibration settings to describe how your monitor reproduces colour with any other software. You will also learn about problems inherent with critical image editing on certain LCD displays throughout this short series.

Read More

Using Stored Procedures in ASP.NET

The architecture and implementation of an application’s data tier is always a strong primary focus for any developer. Without a data tier and connection to a backend your application would of course do nothing and all functionality in your application of course has to flow through the backend data store. Whether it be pulling data out or pushing it in the design of the data tier can make or break a good user experience from the front end.

While this principle is all well and good there are of course many developers who are not database designers or data tier architects and don’t have the expertise or skills to design proper n-tier componentized objects to support their data store.

Fortunately for these developers working on smaller scale applications there is a solution provided in Visual Studio .NET to allow more of a WYSIWYG database design interface that still allows you to leverage some of the more powerful aspects of database interaction without having to write code for it.

One of these more powerful database features is stored procedures. Stored procedures are normally supported by any large scale database server and provide a number of performance and design benefits. The #1 benefit is that your SQL code is encapsulated outside of your application. Meaning you can manage database changes and fixes without having to recompile and redeploy your application which is a great advantage.

While smaller scale database applications such as Microsoft Access support queries which are similar in principle to stored procedures, they usually require a separate data tier component and will not be covered in this tutorial.

This tutorial will focus on implementing stored procedures within SQL Server. Trial versions of SQL server can be freely downloaded and Visual Studio .NET also comes with a smaller scale MSDE for localized database installation and development testing on your local PC.

We’ll create a sample ASP.NET application which uses stored procedures to pull data out of the sample Northwind database that comes with SQL server, and we’ll also implement an update stored procedure and use parameters to push data back into the database, all of which is accomplished through a minimal amount of code and minimal database programming knowledge.

Note: This tutorial requires Visual Studio .NET running ASP.NET 1.1 as well as a version of SQL server or access to an SQL server on your network which contains the Northwind sample database. You may also link to another SQL sample database of your choice but you will need to modify the code and SQL syntax where applicable to suit your alternative database. Both VB.NET and C# code samples are provided

Read More

Web-to-Print, Part II of II

Is Web-to-Print Profitable?

Part II of II

In the previous article, Linda explained Web-to-Print as a template-based prepress process that often uses POD, or Print On Demand, and digital presses. She provided some examples on how a Web designer or developer could add a sideline business as graphic designer or print broker in that article. But, what if you’re serious about adding a print business to your already thriving Web business? In this article, Linda explores more Web-to-Print solutions in-depth to illustrate what to look for and, alternately, what to avoid when you seek a profitable solution to a Web-to-Print business expansion.

Read More

Building Components with ActionScript 2.0 – part 1

Building Components with ActionScript 2.0 – part 1

This is the first in a series of tutorials about building components with ActionScript 2.0. In the first article, I’ll introduce you to the theory behind creating components and demonstrate a very simple example. Instead of building something from the ground up, we’ll learn about what you need in order to create a component. In the next article, we’ll create a component from scratch and I’ll walk you through the process in a little more detail so you have a chance to get your hands dirty.

In this tutorial, I’ll explain:

  • What makes up a component
  • How to create parameters for your component
  • Structuring your component’s movie clip
  • Creating an SWC file
  • Creating an extension from your component

Before you can complete the tutorial, you’ll need to have a good understanding of creating class files in ActionScript 2.0. I’ve used Flash 8 for the sample files so you’ll need this version if you want to explore to completed example.

You can download the files referred to in this 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.

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

ASP.NET “Mini” Master/Detail Pattern

ASP.NET “Mini” Master/Detail Pattern

In ASP.NET 2.0 the master/detail pattern has undergone massive improvements, however when working with ASP.NET 1.1 and Visual Studio .NET 2003/2002 it is a much more manual process. There are hundreds of articles regarding this subject however the most common usage is with large amounts of data; meaning long lists, with subsets of data that can fill large forms.

Sometimes the amount of data is smaller and you need to develop a much more compact version of this pattern, providing your users with a quick and easy lookup for extra information regarding your entity, whatever it may be.

In this tutorial we’ll look at a compact or “mini” version of the master/detail pattern which uses a very small list of data presented in a DataGrid component, and selecting a row in the DataGrid will display a minimal amount of extra information on another details form contained in the same page.

In addition to the master/detail pattern we’ll also implement a few tips & tricks with the DataGrid component to give us a more usable control. Below is a list of other aspects covered in this tutorial:

  • Bound column concatenation: Binding more than one column in the data source to a
    single column on the DataGrid component without using code-behind
  • Primary Key lookup: Binding the primary key to a hidden field on the DataGrid for easy seeking of rows on selection
  • Select anywhere feature: Allowing the user to click on any cell on the DataGrid to invoke the SelectedIndexChanged event
  • Manual DataSet object construction: How to create a DataSet through code including a primary key column
  • Enable smart navigation to minimize page refresh visually

Although this tutorial is designed to be used in a more compact fashion the pattern itself can easily be migrated to larger implementations with larger volumes of data. This tutorial is not based on the new ASP.NET 2.0 implementation wizards for building master/detail pages; it is designed for ASP.NET 1.1.

Note: Visual Studio .NET running ASP.NET 1.1 is required for this tutorial. Both VB.NET and C# code samples will be provided

Read More

Web-to-Print, Part I of II

Is Web-to-Print Profitable?

Part I of II

Within the past six years the Web-to-Print business has blossomed, and Web designers or developers might look to these services to supplement income. But since the business has expanded so rapidly, how does the designer choose and use any given online Web-to-Print service? The process varies, depending on if you want to expand your business to include printing presses, or if you want to become a print broker (a liaison between a customer and a full-service print house), a desktop publisher, or a designer for Web-to-Print services. In this first part of a two-part article, Linda explains the processes behind Web-to-Print and examines several options that can expand your business.

Read More

Building a Rich Text Editor. Part V

Introduction

This article is Part V of the series on building online Rich Text Editor.

In Part I, Part II, Part III and Part IV we have built most of the application features. In this iteration we will cover file manipulation functionality: creating, printing, saving files locally (to the user’s hard drive) as well as sending the document as an email message or an attachment. 

Read More
Newer articles Older articles