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

Creating a line chart component – part 1

Creating a line chart component – part 1

Welcome to the last topic in our series of tutorials about creating components. In this tutorial, we’ll create a more complicated component compared with the previous examples. We’ll make a simple line chart component that allows the user to add titles, change the line colour and plot values and labels. We’ll draw the line and chart axes dynamically using the Flash drawing API.

Specifically, I’ll show you how to:

  • Plan the component so we determine what parameters the user will be able to set
  • Create the line chart movie clip
  • Create the line chart class file including the drawing methods
  • Generate and use the component
You can download the completed files for part 1from 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
FREE

Free - Dynamic Data Grouping using MS Reporting Services

Image: 1.0

Introduction

We hear this all the time, “Two birds with one stone.”  What if I say, “Four birds with one stone”?  I am sure four sound much better then two.  So, what are my four birds and one stone?

My four birds are four distinct different outputs generated using source NorthWind->Orders (SQL Server 2000) and my stone is single physical Ms Reporting Services .rdlc file, which I am using as template to produce different outputs.  This particular figure of speech is perfectly applicable to the technique, which I am going to share with you.

The application of this technique is not something new; we all have done same or similar while dealing with reporting of data.  What is new here is the approach, which I can call to reuse of report (as we commonly reuse the code).

Let us discuss a practical scenario here. If I ask you, what kind of output you see in (image 1.0); you would probably say a simple report listing orders information.  Well, you guessed it right.  What will you do if the end-users want same report using data grouped by CustomerID(image 1.1)?  In most cases, you might end up writing a new report.  In this article, I will demonstrate how to reuse the report to produce the demanded output without the need of writing a new report.

I assume the reader of this article is comfortable using Visual Studio 2005, C#, Sql Server 2000 and Windows Forms.  Basic understanding of how report designer works is helpful to work with attached code.

Read More

Navigation – DOM Style, Part 1

As the final part of my series on Navigation, we’re going to take a different approach and use the Document Object Model (DOM) to tap into properties and methods already inherent in our document.  This is a navigational approach not often used, but one worthy of discussing.  First, we’ll talk about the theory behind this approach and, in the second half of the article, we’ll create page navigation based on what we’ve learned.  Let’s get to it.

Read More

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
FREE

Free, Creating a static site in Dreamweaver

Introduction

Prevent problems with extensions or lost files and folders. Create your site in Dreamweaver the right way. This video shows you how to do it in less then two minutes!

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
Newer articles Older articles