• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Matt Doyle | Elated Communications

Web and WordPress Development

  • About Me
  • Blog
    • Design & Multimedia
      • Photoshop
      • Paint Shop Pro
      • Video & Audio
    • Online Marketing
      • E-Commerce
      • Social Media
    • Running a Website
      • WordPress
      • Apache
      • UNIX and Linux
      • Using FTP
    • Web Development
      • HTML
      • CSS
      • JavaScript
      • PHP
      • Perl and CGI Scripting
  • Portfolio
  • Contact Me
  • Hire Me
Home / Blog / Articles tagged: programming

programming

Ruby Tutorial for Absolute Beginners

11 June 2013 / Leave a Comment

Ruby Tutorial for Absolute Beginners

The Ruby programming language is becoming increasingly popular, thanks to its clean syntax, its object-oriented features, and its range of high-quality libraries and frameworks.

In this tutorial, you get a gentle introduction to programming in Ruby. You learn:

  • How Ruby works, and what it’s used for
  • How to install Ruby on your Mac, Windows PC, or Linux PC
  • How to create — and run — your first Ruby script
  • Some of Ruby’s object-oriented programming features
  • How to create and use classes and objects, and
  • How to use Interactive Ruby to explore the Ruby language.

At the end of the tutorial, you also explore some resources for taking your Ruby skills further.

Let’s start with a brief introduction to Ruby, and take a look at the language’s features and benefits.

[Read more…] about Ruby Tutorial for Absolute Beginners

jQuery Mobile Masterclass: Build a Simple, Attractive Twitter App for iPhone

31 October 2011 / 4 Comments

jQuery Mobile Masterclass: Build a Simple, Attractive Twitter App for iPhone

View Demo »

Download Code

(Open on your iPhone or iPad!)

jQuery Mobile is a great framework for building mobile web apps, and as the 1.0 release gets nearer it’s really starting to mature into a stable platform.

In my previous jQuery Mobile article, I gave a quick overview of jQuery Mobile’s headline features. In this tutorial you’ll delve deeper into jQuery Mobile. You’ll build a simple, nice-looking, easy-to-use iPhone Twitter app called “CloseFriends” that displays your closest Twitter friends’ latest tweets.

You’ll explore the following topics as you work through the tutorial:

  • How to build a web app using just HTML, CSS and JavaScript (no server-side code).
  • Making an app that can be installed and launched from the iPhone home screen.
  • Creating rich mobile interfaces using jQuery Mobile, including page transitions, list views, buttons and dialogs.
  • Using Scott Jehl’s excellent pagination plugin to create a sequence of draggable “latest tweet” pages, much like the native iOS Weather app.
  • Tweaking the pagination plugin to create a nicer swipe experience.
  • Working with the Twitter API using JavaScript.
  • How to use HTML5 local storage to store data persistently in the browser.
  • Creating your own jQuery Mobile swatches to theme your app.
  • Working with jQuery Mobile events.
  • Adapting to different device screen sizes and orientations.
  • …and lots more!

You can try out the finished app on your iOS device by tapping the View Demo button above, and download the complete code and image files by clicking the Download Code button.

To get the most from this tutorial, it helps to have some familiarity with JavaScript, jQuery and jQuery Mobile. A great way to get up to speed quickly with jQuery Mobile is to read my comprehensive eBook, Master Mobile Web Apps with jQuery Mobile.

Ready to build the CloseFriends app? Let’s go!

[Read more…] about jQuery Mobile Masterclass: Build a Simple, Attractive Twitter App for iPhone

Object-Oriented PHP: Autoloading, Serializing, and Querying Objects

29 June 2011 / 9 Comments

Object-Oriented PHP: Autoloading, Serializing, and Querying Objects

Welcome to my fourth object-oriented PHP tutorial! If you missed the first three then you may want to take a look at those first, to give yourself a thorough grounding in PHP classes and objects:

  • Object-Oriented PHP for Absolute Beginners
  • Delving Deeper into Properties and Methods
  • Working with Inheritance

If you’ve read all the articles up to this point then you’re already familiar with the most important concepts of object-oriented programming in PHP: classes, objects, properties, methods, and inheritance. In this final (for now, at least!) tutorial in the series, I’m going to tie up some loose ends and look at some other useful OOP-related features of PHP:

  • How to automatically load classes on demand
  • Converting objects to and from strings for easy storage and transmission, and
  • Useful ways to find out more about a given class or object.

Ready? Let’s go!

[Read more…] about Object-Oriented PHP: Autoloading, Serializing, and Querying Objects

How to Make a Slick Ajax Contact Form with jQuery and PHP

1 April 2011 / 299 Comments

How to Make a Slick Ajax Contact Form with jQuery and PHP

View Demo »

Download Code

Contact forms can be useful way for visitors to contact the owner of a site. They’re easy to use, and since they don’t expose the site owner’s email address in the page, they cut down on spam too.

However, contact forms can also be cumbersome, especially as they’re usually on a separate page. The visitor has to visit the contact form page, fill in the details, view yet another response page, and then try to make their way back to the page they were originally reading.

Fortunately, Ajax gives us a way round this problem. By embedding the form in the page, and submitting the form data via Ajax, the user never has to leave the current page. It also provides a smoother experience for the user.

In this tutorial we’ll build a nice-looking, embedded Ajax contact form that the user can summon up by clicking a link in the page. Along the way, we’ll explore various topics, including:

  • HTML5 form fields
  • How to use fallback techniques to make the form function even if the browser has JavaScript turned off
  • Using CSS techniques to create attractive forms
  • Writing a secure form mailer using PHP
  • Animating page elements with jQuery, and, of course…
  • Using jQuery to make Ajax requests

Before you begin, check out the finished product by clicking the View Demo button above. This opens a new page with some dummy content, and a couple of “Send us an email” links. Click one of these links to display the form.

The demo doesn’t actually send an email anywhere, but the finished code in the download is fully functional. To get the code, click the Download Code button above.

Ready? Let’s get started!

[Read more…] about How to Make a Slick Ajax Contact Form with jQuery and PHP

PHP Recursive Functions: How to Write Them, and Why They’re Useful

4 February 2011 / 9 Comments

PHP Recursive Functions: How to Write Them, and Why They're Useful

Like most programming languages that support functions, PHP lets you write recursive functions. In this tutorial, we’ll explore the concept of recursion in PHP, and discover how to create recursive functions for various tasks.

Recursion is one of those topics that can seem confusing at first, but once you start writing recursive functions you’ll see how elegant recursion can be!

[Read more…] about PHP Recursive Functions: How to Write Them, and Why They’re Useful

Working with Strings

15 November 2005 / Leave a Comment

In this reference article we’ll explain what strings are, why they’re important, and how they work in JavaScript. We’ll cover all the properties and methods of strings, along with some simple examples.

[Read more…] about Working with Strings

Preventing Multiple Form Submits

4 April 2005 / 4 Comments

Forms on websites are a handy way to get information from your visitors. However it’s easy for a visitor to accidentally send more than one copy of a form by clicking on the form’s “submit” button more than once. The end result can be that identical emails get sent to the Webmaster, or identical records get added to a database.

This handy little tutorial shows how you can use JavaScript in your Web pages to avoid forms being submitted more than once by a visitor.

[Read more…] about Preventing Multiple Form Submits

Fun with Random Numbers

18 December 2004 / Leave a Comment

We can use JavaScript to generate random numbers, that is, numbers that are different each time the script is run. This allows us to do all sorts of fun stuff, such as:

  • Show a random image or piece of text on the page
  • Make a link that links to a random page
  • Create games that people can play in their browser

First, let’s look at how we can create a random number in JavaScript.
[Read more…] about Fun with Random Numbers

Introduction to Perl and the CGI

13 February 2003 / Leave a Comment

You’ve probably heard of CGI scripts. They’re what you often see after you’ve filled in a Web form (e.g. “Thank you for contacting us!”), or when you use a guestbook or a bulletin board.

[Read more…] about Introduction to Perl and the CGI

Working with Dates

19 November 2002 / 6 Comments

JavaScript’s Date object makes it easy to handle dates in JavaScript. You can use this object to store dates, convert between date formats, and retrieve the current date and time.

In this tutorial we’ll take a look at using the Date object, and end with a simple example script that displays the current date on the web page!

[Read more…] about Working with Dates

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Hire Matt!

Matt Doyle headshot

Need a little help with your website? I have over 20 years of web development experience under my belt. Let’s chat!

Matt Doyle - Codeable Expert Certificate

Hire Me Today

Call Me: +61 2 8006 0622

Stay in Touch!

Subscribe to get a quick email whenever I add new articles, free goodies, or special offers. I won’t spam you.

Subscribe

Recent Posts

  • Make a Rotatable 3D Product Boxshot with Three.js
  • Speed Up Your WordPress Website: 11 Simple Steps to a Faster Site
  • Reboot!
  • Wordfence Tutorial: How to Keep Your WordPress Site Safe from Hackers
  • How to Make Awesome-Looking Images for Your Website

Footer

Contact Matt

  • Email Me
  • Call Me: +61 2 8006 0622

Follow Matt

  • E-mail
  • Facebook
  • GitHub
  • LinkedIn
  • Twitter

Copyright © 1996-2023 Elated Communications. All rights reserved.
Affiliate Disclaimer | Privacy Policy | Terms of Use | Service T&C | Credits