Explore the Premium Content

Building a Logging Framework in ASP.NET 1.x – Part 1

One of the most enjoyable aspects of system architecture is designing new frameworks for new applications. This is the point in time of the design process where you can be the most creative and bring new design patterns and new knowledge to the table to continually build most robust, scalable and stable applications.

There are of course a few key staple infrastructures that need to be in place in nearly every application. Sometimes it’s fun to change it up and design these pieces in different ways to keep things fresh. There’s only so many ways you can create a login form for example.

One of the key foundation pieces to nearly any application is logging. Logging can be implemented in a myriad of different ways, depending on the scope of the application. Certain pieces are not always needed and sometimes using the built in .NET tracing is sufficient. Personally I always want full control over my logging needs so I always create my own logging framework from scratch.

The main purpose of most logging frameworks is to capture exceptions. Handling exceptions is paramount is application maintenance: If you cannot track down your bugs efficiently your application and end-user performance will suffer greatly. You therefore need a descent exception logging mechanism which will allow you to pinpoint errors in your application hastily.

Secondary logging purposes include tracing or debug statements. This can help expedite the development process by creating custom messages around complex algorithms which can help remove a lot of trial-and-error debugging and testing.

The purpose of this tutorial is to design a basic yet useful logging framework which is Object Oriented and expandable to larger scale needs should your application require it. Part 1 of this tutorial will focus on implement most of the foundation of the logging framework and the basics of how to use it. The second and final part of this tutorial will put the logging framework into a basic ASP.NET application structure and show you how to use the logging framework in a more real-world structure.

Note: Visual Studio .NET 2002/2003 running ASP.NET 1.x is required to implement this tutorial. Both C# and VB.NET code samples will be provided

Read More

Introduction to Ajax

Introduction to Ajax

Ajax is a common approach to building Web 2.0 applications. Ajax is not a technology in itself, rather it’s a combination of existing technologies – XHTML, CSS, DOM, XML, XSLT, the XMLHttpRequest object and JavaScript. Most of these technologies have been around for quite a while. It’s the way they’re used together that creates the Ajax approach to developing Web applications.

In this article, I want to introduce you to Ajax. I want to cover:

  • An explanation of the term
  • The key technologies involved
  • The processes used in Ajax-style applications.

It’s worth remembering that Ajax is a client-side technology so it can’t carry out server-side tasks such as accessing databases or sending emails because of security constraints. You can use Ajax on the client-side and couple it with a server-side language such as PHP, VB .NET or C# if you need to carry out these types of tasks.

Read More

Photoshop CS2: Build a Fantasy Landscape, Part II of II

Photoshop CS2: Finalizing the Fantasy Landscape

In the previous Photoshop CS2 article, Linda began to demonstrate how to build a fantasy landscape from several seemingly disparate objects. In this article, she wraps up that landscape with demonstrations in how to use several filters and blending modes to achieve the final result, a layout based upon the Rule of Thirds. Some of the other tools that you’ll use in this tutorial include the “Highlight/Shadow” adjustment and healing tools, Colour Channels, and the Lens Correction Filter.

Read More

Photoshop CS2: Build a Fantasy Landscape, Part I of II

In the previous Photoshop CS2 articles, Linda illustrated how to use a variety of selection tools to select portions of images to remove them, to move them, or to alter them with filters. In this first of a two-part series, Linda begins to build a fantasy landscape with images extracted from several photographs. She then alters the resultant layers with filters and blending modes. Not only will you learn about some Photoshop CS2 tricks, but you’ll use some composition guidelines to build this fantasy land. The photographs with the images already extracted are included at the end of this article so that you can play along.

Read More

Building a bar chart in Flash part 2

In the second part of this tutorial, we’ll complete the bar chart class that we started in part 1. This bar chart uses the drawing API to create a chart from a set of values and labels. In part 1, we worked with default values and labels but in this part, we’ll modify the code so that you can add your own values, labels, title and bar colour.

At the end of the last tutorial, we’d created the axes for the chart and calculated the scaling for the y axis. We’d also added the chart title. In this tutorial, we’ll add the bars to the chart. First we’ll graph the default values but we’ll then modify the code so that the class accepts user input. You need to have completed the first part of the tutorial before starting this one.

This tutorial assumes that you have at least Flash MX 2004 and that you’re familiar with writing ActionScript. You won’t be able to complete the tutorial with an earlier version of Flash. If you’ve had some exposure to classes that would help, but it isn’t absolutely necessary.

You can download the 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 that includes the starter and completed files.

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

Understanding Web.Config in ASP.NET 1.x

Understanding Web.Config in ASP.NET 1.x

With every ASP.NET application there is a root Web.Config file which resides in the website root directory and controls many complex aspects of your application. One of the troubles with this configuration file is that it covers many areas and has many options and parameters which are difficult to remember and sometimes confusing to understand the impact they will have on your application.

Part of the reason for lack of understanding is the fact that a default Web.config file is provided with a newly created ASP.NET application. Most of the time you can simply leave it alone and your application will run just fine. However it’s still important to understand what each entry in the default Web.config file means and even more important to know how to customize it to suit your needs.

The purpose of this tutorial is to serve as a quick reference for the options available in the Web.config file, and also to inspect some of the more commonly used configuration elements, thus creating a greater understanding of the flexibility available.

No tools or software are required for this tutorial, however it is recommended you have access to Visual Studio .NET 2002/2003 in order to test out the various settings that will be reviewed.

Read More
FREE

Free - Creating an RSS feed with ASP and Dreamweaver 8

Ever wanted to have the latest news automatically displayed on your site? In this tutorial Richard Mariner shows how to create an ASP RSS feed in Dreamweaver 8. RSS is a format for syndicating news and the content of news-like sites.

 

Read More

Understanding Web 2.0 Interfaces

Understanding Web 2.0 interfaces

The term Web 2.0 has been adopted to cover a new breed of web applications that use innovative architectures and toolkits to build very responsive applications that are focused on users. Flash, Flex and Ajax applications are examples of this new approach.

Because of the rich interfaces used by this type of application, they are often referred to as Rich Internet Applications (RIAs). This term was originally coined by Macromedia in relation to Flash, but has since been adopted to refer to any rich Web 2.0 interface.

Many Web 2.0 developers are drawing their inspiration for Web applications from desktop applications. Desktop applications are generally more responsive and provide a wider range of controls and visual effects than traditional Web applications. One of the challenges for developers is to increase the responsiveness and enhance the interfaces of Web 2.applications. This implies a need for new components and interface elements.

In this article, I want to look at the key points to consider when working with Web 2.0 interfaces and examine how they differ from those in Web 1.0 applications.

Specifically, I’ll look at:

  • The difference between Web 1.0 and Web 2.0 interfaces
  • The concept of a single screen application
  • Web 2.0 interface elements
  • User interactions with Web 2.0 interfaces
  • Usability and accessibility

I’ll start by looking at what’s changed between Web 1.0 and Web 2.0 application interfaces.

Read More

Multi Page Forms on One Page

Don't you hate it when you fill in a long form, forget one field and then find the form has cleared down? If you code like that, you guarantee that users will stay away in droves.

But often you are faced with the prospect of a very long form. You could certainly break up the form into two, three or even four pages, but this means you have to deal with the data that was filled out on previous pages.

This tutorial uses JavaScript to make the form appear as if we were moving through a series of steps (to keep the form manageable for user) while never leaving the page. Then we can just submit once and be done. The user can go backwards and forwards and data is never lost, and a progress meter is also shown so that the user knows how far (s)he is through the process.

Read More

Ajax; The "Yellow Fade" Technique

Ajax; The “Yellow Fade” Technique

With the rise of Ajax applications on the internet, user interface designers suddenly found themselves wanting some kind of technique to let the user know that something had changed on a page. They needed this because users are used to pages reloading and then looking for their changes. However, since Ajax applications rarely reload pages (breaking the convention), some way to tip off the user that an element has changed was desired.

This technique was made widely popular by 37Signals’ use of it in their spiffy applications such as Basecamp. The way it works is when a user makes a change to an element on which the developer wants to cue them, the element is tagged with the function that essentially highlights it in a light yellow to call attention to it, and then slowly fades back to transparent. It’s a nice subtle effect that does the job nicely.

Of course like any effect like this, particularly an animation, care must be taken not to overuse and abuse. When every page has five yellow fading elements the effect loses its worth quite quickly.

The technique is surprisingly simple and easy to implement. So much so that this will be the shortest article I’ve written, but I think you will find the effect a worthwhile addition to your Ajax library. There’s really no way to show a screenshot of an animation, so go ahead and take a look at the html page and load it up in a browser. In the text field marked “Title of Project”, change the words in the text box and then tab out or click out of the text box, just as if you had made a change in an application.

You will see the box containing the text field change to yellow and slowly fade to white. And you thought your life lacked excitement!

Read More

Custom ASP.NET Web Menu Control – Part 2

Welcome to the second and final part of this 2 part tutorial regarding creating a custom menu using ASP.NET’s Web Control Library projects.  During Custom ASP.NET Web Menu Control Part 1 we implemented a sample ASP.NET application and created a new Web Control Library project and created our own custom control which was responsible for displaying clickable menu items.

The menu items were fully customizable and could be coded for in the code-behind files of WebForms added to our sample project. We also built the ability to perform basic UI operations such as bolding the menu items and rendering the menu items either horizontally or vertically.

In this second part of the tutorial we fill focus on one of the more complex topics of custom web controls, which is linkage to the Visual Studio designer. To really make a custom control flow like a regular web control it needs to have the capability of being visually manipulated at design time by setting properties through the properties window.

We will expand upon our example built in Custom ASP.NET Web Menu Control Part 1 and add in the following features:

  1. Add a Designer class to render design time presentation
  2. Change the control name
  3. Demonstrate how to render custom HTML for the Visual Studio designer
  4. Add a font size property

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

Read More

Web 2.0 application architecture

Web 2.0 application architecture

Web 2.0 introduces Web developers to a range of newer approaches in application development. These include new technologies, new architectures and new toolkits for creating Web applications. For example, Flash and Flex allow developers to create rich internet applications that use the Flash Player. The Ajax approach allows Web applications to load data in the background while the user carries out other tasks.

In this article, I want to cut through some of the hype and look at some of the key points about Web 2.0 application architectures. We’ll see how this architecture differs from Web 1.0 applications and look at some of the key points for developers to consider.


Read More
Newer articles Older articles