15 posts tagged with development
Multi-Tenancy and Servers

July 22, 2014
The Importance of Multi-Tenancy

This may be a bit more of a technical post then most of my posts but I think it’s an interesting topic and falls in-line with the purpose of my blog. Sharing relevant information and especially focusing on those items which will either improve your business or showcase possible future improvements in the tech industry. I’d like to share some details and specifics in regards to the concept of multi-tenancy in software application development.

I suppose with a technical topic like this it might be helpful to define what exactly is meant with multi-tenancy. Here’s the wikipedia definition:

Multi-tenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple client-organizations (tenants).

Does that make perfect sense? If it’s still a bit unclear (or much much more than a little unclear) here’s a more detailed definition:

In a multitenancy environment, multiple customers share the same application, running on the same operating system, on the same hardware, with the same data-storage mechanism. The distinction between the customers is achieved during application design, thus customers do not share or see each other’s data.

Hopefully that definition helps to clarify more what the idea implies. So what does this mean in today’s technology scene and how does it affect the design patterns of your software application? Here are 3 ways multi-tenancy will be helpful to your application and 3 things you’ll need to do differently in development of your app. Let’s start with the 3 benefits.

Upgrades are Easier

When you create a multi-tenant application the upgrade process becomes significantly more simple. Instead of needing to update every instance of your software across a large number of servers you are able to update a single, central application or codebase and have the changes instantly available to all users. This obviously greatly simplifies the process of deploying new versions and the time involved in this process. Upgrades can also be considered to be the creation of new accounts as well. With a multi-tenant application the process for spinning up a new cloud and application is incredibly easy and can be done very quickly.

Customizations are Easier

The second benefit comes in the terms of customizations. In these types of applications you’ll obviously need to provide some level of customization for each user installation. Whether it be template changes, additional functionality, or merely a logo you will need to be able to deliver custom options. With multi-tenancy based applications you can provide an additional layer to allow for customizations while still maintaining an underlying codebase which remains constant for all users.

Ongoing Cost Savings

While there are many benefits to multi-tenancy applications I’ll provide only one more here. Rather than focusing on the benefits to cloud computing (there are many) I am going to instead mention that these apps provide significant cost savings over the alternatives. We talked about how multi-tenancy will speed up upgrades and save time (and also cost) but in addition the server / cloud requirements for a multi-tenancy application are much less. No dedicated set of resources must be configured and depending on your architecture can be a very minimal environment. The opportunity to save money takes many forms and becomes greater as the application scales up.



Ok, so that all sounds pretty good. In fact, it sounds insanely good. Too good to be true? Nope. But before you immediately drop everything you’re doing and begin to delivering multi-tenancy based applications here are a few things you need to consider when developing your apps. These are certainly not deal-breaking problems but rather some things you should plan for when beginning your development.

Infrastructure Complexities

There are of course infrastructure complexities which are inherent when developing a multi-tenant application. You must consider the way you wish to structure your application. Do you want to use a multi-database approach or a single database with a tenant ID field? Questions like these must be answered and often are unique to the environment of the specific application. There are of course positives and negatives to each approach thus it does depend on the situation. Other infrastructure ideas to consider involve the file system directly, the deployment methods, and the configuration options unique to each user.

Security Implications

Security is always of great importance when creating an application however when creating a multi-tenancy application this becomes a much greater priority. You are now creating an application which will be serving many users from a single codebase. This increased vulnerability as there comes a single failure point for many clients. Of course this can be mitigated through a variety of options but remains something to be considered. In addition, depending your database method chosen in the infrastructure planning you may have to plan for additional security methods to be employed to protect your database and eliminate cross-account failures.

Shared Codebases

The last of the three considerations I’d like to mention is the issue of a shared codebase. I list this as a benefit but it is also a consideration to be accounted for when creating your application. When you create your app are you going to share an entire application or will you give some level of unique filesystem to each cloud? Of course some of the main benefits of multi-tenancy is a single codebase, however, when doing this you have a number of options for how to create multi clients from a single codebase, symlinks or hard links or other methods (especially when considering unique elements such as configuration files, template or logo files etc…). You will need to plan for this when creating your multi-tenant applications.

As with the benefits section above the considerations section also holds many more little things to plan for beyond just the three I mention. But since I want to provide a bit higher level of information I’m limiting myself to only three of each. There may be better or more important ones you think of. If so, I’d love to hear about them.



As you can see there are a few development concerns to be taken into consideration when planning and building a multi-tenancy application however with a well documented plan and clear direction how you’ll handle a few key development decisions you can create a remarkable application capable of enormous benefits.

The concept of multi-tenancy has indeed been around for a while however with the growing focus on cloud computing and the ability to create cloud-based applications creating multi-tenant applications becomes far more important. I highly encourage you to do more research on this topic and consider using multi-tenancy for your next application. I believe if you wish to remain relevant in the coming technological advances we see in the space you will need to create multi-tenant applications.

joomla development module development

July 15, 2014
Joomla Development 101: Tutorial 14 – Module Helper

Joomla development continues in this Joomla development tutorial with a  focus on the helper file included with a Joomla module. This helper file is an optional file used to provide a bit of organization and clarity to a Joomla module.

The PHP helper file for a Joomla module acts very similar to the helper file we explored previously with the Joomla plugins. As we near the end of the module development tutorial of Joomla Development 101 we will begin to focus on the finishing touches which will make our Joomla module stand out from the crowd.

Lesson 14: Module Helper

Joomla Development 101: Lesson 14 from dbhurley on Vimeo.

Associated Slides for JD101 Module Helper

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.

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.


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

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

September 24, 2013
The Future of Joomla

This is the slide deck for a presentation given at JoomlaDay France 2013. The topic was the future release of the Joomla content management system.