Tutorials
joomla development 101 module view

July 24, 2014
Joomla Development 101: Tutorial 15 – View

We begin to close out our lecture series Joomla Development 101 with a focus on the view file of a module file. This is the final lesson dealing with unique portions of the Joomla module. We will move quickly through creating a view for your module and what should be included.

The view file is a standard required file / folder for a Joomla module contains all the code related to the visual display and output from a module. This should be the only location where code is written which will display things to the user.

Lesson 15: View Helper

Joomla Development 101: Lesson 15 from dbhurley on Vimeo.

Associated Slides for JD101 Module View

Previous Posts in Series

joomla development tutorial jd101

July 9, 2014
Joomla Development 101: Tutorial 13 – Module Base

In this Joomla development tutorial we write the base file of a Joomla module. Joomla module development is an excellent place to begin your Joomla development if you’re not comfortable with the intricacies of either plugin development or larger component development. You’ll learn the basics of the Joomla module base file in this lesson.

The base file is a PHP file located at the base of the Joomla module directory and is used as the entry point for the CMS when it includes the module. This file is simple to setup and contains relatively few lines of code. In this tutorial we will return to our sample module code and continue development.

Lesson 13: Module Base

Joomla Development 101: Lesson 13 from dbhurley on Vimeo.

Associated Slides for JD101 Module Base

Previous Posts in Series

joomla development tutorial module XML

July 1, 2014
Joomla Development 101: Tutorial 12 – Module XML

Joomla Development tutorials continue to expand on the development of our first Joomla module. In this development tutorial we explore the Joomla module XML file and compare it to the plugin XML file we discussed in an earlier tutorial.

Joomla modules provide convenient ways to extend the functionality and purpose of our website by allowing additional content displays to compliment and extend the main content purpose of a page. This short tutorial focuses on the module XML file and the functions and usages for the structure used.

Lesson 11: Module XML

Joomla Development 101: Lesson 12 from dbhurley on Vimeo.

Associated Slides for JD101 Module XML

Previous Posts in Series

joomla development 101 modules

June 23, 2014
Joomla Development 101: Tutorial 11 – Module Structure

Our Joomla development tutorial series continues with a brief look at modules. In this tutorial we will begin exploring the basic usage and functions controlled by a Joomla module.


Joomla modules provide convenient ways to extend the functionality and purpose of our website by allowing additional content displays to compliment and extend the main content purpose of a page. These modules are common to most CMS systems and Joomla provides a robust structure for these modules to be displayed and implemented. This lesson focuses on basic module usage and some of the functions typically handled within a module.

Lesson 11: Module Structure and Functions

Joomla Development 101: Lesson 11 from dbhurley on Vimeo.

Associated Slides for JD101 Module Structure & Functions

Previous Posts in Series

joomla development tutorial plugin triggers

June 17, 2014
Joomla Development 101: Tutorial 10 – Plugin Triggers

This short Joomla development tutorial focuses on the various triggers and other implementations for your newly created Joomla plugin. We will also briefly discuss language files and some other clean-up items.

We end our Joomla plugin development with a look at triggers and how they function within Joomla. We also create the language strings for the installer and administrator pages. I hope these lessons have been helpful in learning more about the Joomla development process in particular creating a plugin. The next set of lessons will be focused on creating a module.

Lesson 10: Plugin Triggers and Implementations

Joomla Development 101: Lesson 10 from dbhurley on Vimeo.

Associated Slides for JD101 Plugin Triggers

Previous Posts in Series

joomla development tutorial plugin

June 11, 2014
Joomla Development 101: Tutorial 9 – Helper PHP

We begin to wrap up our Joomla plugin development portion of our Joomla development tutorial series and start focusing on modules next. In this plugin development post we’ll look at the helper file which can optionally be included with a plugin package.

Please keep in mind that this file is an optional file and can be left out if you wish. I would recommend still including it for ease of use and increasing your codes readability however you are not required to use a helper file.

Lesson 9: Helper PHP

Joomla Development 101: Lesson 9 from dbhurley on Vimeo.

Associated Slides for JD101 Helper PHP

Previous Posts in Series

importance of indexing database directory

June 4, 2014
The Importance of Indexing

I wanted to write a short article on the importance of indexing your database tables when creating an application. This may sound like a small thing but the time savings you’ll see as a result are much larger.

More Than Code

If there is enough interest I may create several articles on the subject of database improvements and ways to increase efficiency in your application due to following best practices in your database layer. I mentioned it a bit earlier that it’s sounds like a small thing, but many developers neglect this step when they are creating their applications. There never seems to be a shortage of interest in improving page load speeds, increasing efficiency in the code which runs the various functions and conditionals for retrieving the data. However, it seems increasingly rare to find good developers interested in improving their application from a properly architected database.

I find this diminishing focus disturbing as the database interactions, queries, searches, and general structure account for a good amount of the processing time required when a page is loaded or data is retrieved.

Database Indexes

In this article I want to look at the value of indexing your database columns, when you should use indexes, and what value they provide.

Let’s begin with a quick definition of the term. Indexing a database table means you are marking a particular column within a particular database table to be stored for use later. It may be helpful to think of the index as follows: When you insert a row into your table you are essentially adding that information to the end of every row and all the data currently existing within that table (that’s easy enough to understand). Now, consider the situation where you have a table consisting of a couple thousand rows (that’s not even a very large table). When you go to look up a particular piece of information you must perform a ‘table scan’ of every row and every value in every column of that table.

Example:
Let’s assume you have a database table to store all your contacts information. You collect 20 pieces of information on each person (first name, last name, company, address, city, state, facebook, twitter and so on). And you’re religious about entering information so you have now acquired 10,000 contacts. Congratulations you’ve done a fantastic job, but now you need to find that one person whose name you can’t quite remember but you know it has a wa in the last name somewhere. You perform a search on your contacts to find those contacts with the last name having a wa in it. Tick Tick Tick…that is an intensive search.

Now let’s look at that same situation only this time let’s imagine you have an index on the last name field. This means every time you insert a new record your index is updated and the new last name value added to the index. When you perform an index, this will typically be an alphabetical index with a list of corresponding row ID’s where that value is found. This is where it gets exciting.

The Math Behind The Scenes

Your index can be searched incredibly quickly by using a binary search. When performing a binary search you essentially can reduce your time by half (or more) with each row search.Rather than an “N” based search where N is the number of rows in your database table you can follow a much more efficient log(n) search instead. Math is so much fun! Here’s a wikipedia definition:

A binary search halves the number of items to check with each iteration, so locating an item (or determining its absence) takes logarithmic time.
Wikipedia

 

Here’s a simple comparison: You can compare this to how you look a name up in a phonebook. If you know you’re looking for a name that starts with Hu, and you flip open the book to Kr and on a second row you find Ed then you know the result you want is roughly halfway between the two. You continue “splitting” the pages like this until you find the page and the number you need. Your database works much the same way. Instead of requiring you to search each and every row completely to the end, you can instead search only the indexed column (which has been sorted) and search much more quickly for the exact row you need.

The Downside of Indexes

Nothing is perfect in life and just as with other software architect choices there is a tradeoff you will need to consider when implementing indexes in your code. The process of adding a new row to an index does increase the time involved when storing a row. This is because it must add the new value to the index and then re-sort it. It’s a minor expense but one you should consider as you implement indexes. Be somewhat selective on what fields (columns) would be most benefited by adding an index.

The More You Know

Database architecting is a vitally important part of the designing phase of any application. If you are a programmer and focus most of your time working on creating cutting edge code you should take the time to also learn how to best create your database structure. There are many other opportunities for improving your development skills and your applications by examining your database schema and your query building. In future articles we’ll explore more of these techniques and way they can increase your skills. The more you know the better you’ll be.

Remember, we’re all in this together!

 

joomla development tutorial plugin

June 3, 2014
Joomla Development 101: Tutorial 8 – Main PHP

Our Joomla development tutorial series continues with this development tutorial focusing on the main PHP file which handles the initial input processing and triggers from the CMS. We’ll look briefly at what this file is used for and how to effectively implement plugin triggers.

Joomla plugins function on specific triggers located throughout the CMS. These triggers then fire specific functions within the plugins and allow the plugins to manipulate the data. The list of triggers is long and can be found in the Joomla documentation. This lesson focuses on identifying which triggers to use, when to use them, and how to make those triggers perform specific functions within your plugin.

Lesson 8: Main PHP

Joomla Development 101: Lesson 8 from dbhurley on Vimeo.

Associated Slides for JD101 Main PHP

Previous Posts in Series

joomla development tutorial plugin xml

May 28, 2014
Joomla Development 101: Tutorial 7 – Plugin XML

In this Joomla development tutorial we are digging deeper into development of our first Joomla plugin. This tutorial focuses specifically on the XML file which must accompany every plugin.

Joomla extensions all require an XML file to be included in the zipped package. This XML defines basic details of the extension and tells the CMS what to install, where to install it and what parameters to include. The XML file is a critical part of the extension and there are many options to learn and understand. We will cover some of them but not every single configuration. I recommend reviewing the Joomla docs for specifics on any particular function.

Lesson 7: Plugin XML

Joomla Development 101: Lesson 7 from dbhurley on Vimeo.

Associated Slides for JD101 Plugin XML

Previous Posts in Series

joomla development tutorial plugin start

May 26, 2014
Joomla Development 101: Tutorial 6 – Starting Plugin

In this Joomla development tutorial we are moving beyond the basics and background information and starting to focus on actually starting code. We will begin with creating a Joomla plugin. This tutorial will begin the plugin development.

Joomla development can start in a number of places. For ease of understanding, and based on the previous lessons, we will begin our coding portion with a plugin. The Joomla plugin will allow us to get familiar with code style, functions, and database queries before digging deeper into modules and components.

Lesson 6: Starting a Plugin

Joomla Development 101: Lesson 6 from dbhurley on Vimeo.

Previous Posts in Series

basic joomla tutorial lesson

May 23, 2014
Joomla Development 101: Tutorial 5 – Basic Joomla

In this last introductory joomla development tutorial we look at the basics of Joomla from the perspective of how the website root directory and the database scheme are used. We’ll also briefly explore the differences between components, modules and plugins.

If you’re already familiar with Joomla and the basics of the CMS then you can ignore this tutorial and head on to the next one where we begin to actually develop our first plugin. This lesson will provide some basic foundation for others interested in becoming more aware of how Joomla is structured and setup.

Lesson 5: Basic Joomla

Joomla Development 101: Lesson 5 – Basic Joomla from dbhurley on Vimeo.

Previous Posts in Series

joomla development testing process lesson

May 17, 2014
Joomla Development 101: Lesson 4 – Testing

This lesson continues to build the foundation for your Joomla development environment. Here we will establish some background information on testing processes, types, uses, and reasons.

Testing code is a topic which every developer acknowledges the importance of, but in reality few actually perform. The time spent developing proper test coverage for your application is critical to your overall success. And although it may seem time-consuming and difficult (maybe even redundant) these tests could one day save you hundreds of hours of bug hunting and fixing.

Lesson 4: Testing Your Code

Joomla Development 101: Lesson 4 – Testing Methods from dbhurley on Vimeo.

Accompanying Slides for JD101: Lesson 4

Previous Posts in Series

joomla development 101 version and backup

May 14, 2014
Joomla Development 101: Lesson 3 – Versioning Tutorial

Our Joomla Developer series continues with setting up the ideal environment to create beautiful Joomla CMS code.

In this short video we’ll continue our setup process for organizing our work environment in order to create beautiful code. It should be noted that the best way to write good code and structure things properly involves establishing the right foundation.

Lesson 3: Code Versioning and Backups

Joomla Development 101: Lesson 3 from dbhurley on Vimeo.

Accompanying Slides for JD101: Lesson 3

Previous Posts in Series

joomla dev tutorial lesson 2

May 12, 2014
Joomla Development 101: Lesson 2 – Set Up Dev Tutorial

We focus on the development environment in this second lesson of Joomla Development 101. I will share tools I’ve found to be useful and currently use.

Please keep in mind these are tools which I have found to be good for my workflow. You may prefer others and that is perfectly acceptable. The important thing is to find those programs which work best for you

Lesson 2: Setting Up Your Development Environment

Joomla Development 101: Lesson 2 from dbhurley on Vimeo.

Accompanying Slides for JD101: Lesson 2

joomla development getting started

May 10, 2014
Joomla Development Tutorial Series

Introduction to Joomla Development. This Joomla development tutorial short video serves only to introduce the course and the material to be covered in future videos. We’ll start easy.

Below is the initial video for a series I’ve begun on Joomla CMS third party development. Depending on the interest I receive I’m going to continue demonstrating how to develop code for the Joomla CMS. I’ve decided to start with plugins, then modules, and finally a component.

I can’t stress enough, if you like these – I need to know. Otherwise I will assume everyone is already an expert and there’s no need to continue the series!

This video is very short and only serves as course introduction.

Joomla Development 101: Introduction

Joomla Development 101: Lesson 1 from dbhurley on Vimeo.

Associated Slides