Author Archive

Database Driven Sites Using Dreamweaver, PHP And MySQL

Wednesday, May 4th, 2011

Hardly any people would argue that Adobe Dreamweaver is one of the most widely used web development packages around. It has gained its popularity by appealing to users with a broad variety of profiles. Its user-friendly interface appeals to inexperienced users with a small amount know-how of the technologies that underpin web pages. At the same time, it allows skilled web developers to interact with code in a variety of practical ways.

Adobe Dreamweaver enables developers to create dynamic web sites whose content is derived from a data source. Such sites feature server-side pages, written in a scripting language such as PHP, ASP or ASP.Net, which need to be executed on the server. It is therefore crucial to stipulate a testing server as part of the site setup while defining such sites within Dreamweaver. A Microsoft invention, Active Server Pages (ASP) is one of the easiest such languages to configure. Now referred to as classic ASP to distinguish it from ASP.Net, the current incarnation of Active Server Pages, ASP was initially released in the late nineties and revolutionised the way in which web sites were developed.

ASP is designed to run on Windows 2000 server and on Windows XP Professional. It is part of Internet Information Services (IIS), an optional Windows component. Once installed, IIS converts your PC into a web server running a default website located in a folder called “wwwroot” which can be accessed with the web address “localhost/”. Once ASP is up and running, Dreamweaver CS4 is geared up to start creating dynamic web sites.

The features on hand in Dreamweaver for generating the necessary server-side content are to be found in three panels: Databases, Bindings and Server Behaviors. The Databases panel is used to create connections to data sources. In the case of ASP, the most frequent solutions are Microsoft Access and the more powerful Microsoft SQL Server. As soon as a connection to the database is in place, the Bindings panel is used to retrieve data into a recordset.

The dialogue box which Dreamweaver CS4 uses for creating recordsets automatically generates fragments of SQL as the user interacts with the appropriate data objects. However, some familiarity with SQL (structured query language) is required to be able to retrieve exactly the data necessary for a given recordset. The Server Behaviours panel is where a large amount of the action takes place: It contains a wide variety of pre-built scripts which can be used to add dynamic content to web pages. For example, the Insert Record server behaviour can be used to create a form which adds new records to a database table via a web page or it can be used to create an enquiries sheet which adds every enquiry to an enquires table and subsequently takes the visitor to a thank you page.

To learn more about Dreamweaver training courses, visit Macresource Computer Training, an independent computer training company offering Dreamweaver training courses in London and throughout the UK.

Understanding User Defined And Constants Types In Excel VBA

Friday, August 20th, 2010

From time to time, within your Excel VBA code, you will want to lock down the value of a variable but make it a variable nevertheless. For example, if your application makes reference to a tax rate, having the rate in a variable will offer you a mechanism for changing the rate wherever you have used it in your application. Thus, instead of entering code like “TaxAmount = SubTototal * 0.15″, you would use statements like “TaxAmount = SubTototal * TaxRate”, where tax rate would be a constant.

In VBA, constants must be declared and initialised in one statement: for example “Const TaxRate as Currency = 0.15″. This is the only time that a value can be placed in the constant and herein lies one of its key benefits; the value it contains cannot later be accidentally overwritten because the programmer confuses this variable with another. The other key benefit is the ease with which constants allow us to update our applications. Thus, in the tax rate example, when the tax rate changes, we only need to modify one line of code and that change will update our entire application.

There is another useful variable technique which allows us to “tighten up” the values which may be entered into a variable is to use User Defined Types (UDTs) which, essentially, allow you to define your own variable types. You can then declare as many variables of this given type as you need. Type definitions must be placed at the top of a module; they cannot be placed inside sub routines or functions. The definition consists of a code block inside which the various elements of the type are detailed as well as the data type associated with it. Here is an example of a type definition.

Type Employee

Name As String

Department As String

JobTitle As String

DateOfBirth As Date

StartDate As Date

Salary As Long

End Type

To use create and initialise variables of this type in our code, we use statements like the following:

Dim empNew As Employee

With empNew

.Name = “Gillian Spencer”

.Department = “Information Technology”

.JobTitle = “Web Developer”

.DateOfBirth = 12/05/1982

.StartDate = 25/03/2010

.Salary = 27500

End With

UDTs can be very useful; they offer us a very useful way of storing related variables in one place. In this regard, they resemble arrays; but, unlike arrays, the elements they contain are named rather than simply referred to by a numerical index.

If you would like to learn more about Excel VBA training courses, visit Macresource Computer Training, an independent computer training company offering Excel VBA training courses at their central London training centre.

You Don’t Have To Be A Designer To Learn InDesign

Sunday, May 30th, 2010

InDesign is a key part of the arsenal of every graphic designer. It seems to have won out as the designers preferred page layout tool. However, increasingly, InDesign is also being used by general computer users within corporations keen to save money by producing some of their corporate literature in-house. So how do you train your admin staff to use a precision design tool like InDesign?

When attending a training course on InDesign, general users need more than an explanation of how to use the various tools and functions of the software. They need to learn about the page layout arena and how it differs from familiar programs like Microsoft Word. They need an overview of the typographical controls offered by InDesign, an explanation of how to specify colour for print and how to work with images.

InDesign is closely linked with postscript, an extremely accurate page description language used by numerous output devices. As such, it offers a great deal of accuracy in positioning and dimensioning elements on the page. Delegates should be made aware of the tools which make this accuracy possible. They should learn how to used guides and grids, including the baseline grid. They should at least come away knowing how to establish alignment and symmetry between the elements on the page.

The terminology used in InDesign often harks back to the pre-electronic typographic age and is often confusing to the general user. It’s important to clarify these terms, perhaps by offering users a bit of background information and, wherever possible, by making comparisons with similar features in familiar software. For example, we might compare leading in InDesign with line spacing in Microsoft Word.

Because InDesign offers so much flexibility in transforming imported images, your average user often gets carried away and ends up scaling images up or down by huge factors. It needs to be explained that scaling up or down by more than 10% or so is undesirable since this can cause artefacts to appear in the printed image.

Colour terminology can also confuse the general InDesign user. The key facts that people will need to be taught here are, firstly, the difference between the RGB and CMYK colour spaces; secondly, how the colour print job gets separated into the four different plates and, thirdly, the difference between process and spot colours.

InDesign is meant to be used to create high quality output. Regardless of their background, new users must have it drummed into them how important it is to pre-flight documents, resolve errors and then package the job ready to be sent off to a printing company. They also need to learn how to produce a high- resolution PDF file.

You can find out more about InDesign training courses, visit Macresource Computer Training, a UK IT training company offering InDesign Classes in London and throughout the UK.