bc-part1In this new series of blog posts, I thought I should start off with something that seems as far away from Joomla! as possible, and discuss how the past affects the future. A funny apocryphal story relates the reason why the size of the Space Shuttle’s rocket boosters depended on the width of a horse’s arse (the boosters were limited by the size of the railway tunnels they travelled through from the factory to the launch site, the tunnels were limited by the size of the railway gauge, the railway gauge was chosen by British railway pioneers based on the size of ancient Roman roads, which were based on the size of Roman chariots, which were based on the size of the rear ends of the two warhorses that pulled them).

While the truth is somewhat more complex than the story makes it out to be (go ahead and read it at the link above), it does neatly encapsulate the software engineering principle which we call ‘backward compatibility’. There are many arguments for why this is an important part of software engineering, and equally, there are similar arguments for why backward compatibility should be jettisoned whenever and wherever possible. Joomla, for what it’s worth, is guaranteed to be backward-compatible with all minor (point) releases within a single major release.

Backward compatibility in practice

A good working definition of software that is backward-compatible is if you can perform an in-place upgrade of a previous version, and the software will continue to work (perfectly) with the existing scripts, add-ins, macros, files and settings already in use by the earlier version. On a larger scale, it can be said that backward compatibility is what Service Oriented Architecture (SOA) is intended to achieve, in that any modular component in an SOA system can be changed without impacting any other component. In a more narrow sense, software can be said to be backward compatible if it’s compliant with (and fully implements) the older version’s Application Programming Interface (API). It is in this latter sense that Joomla can be said to be backward compatible within any major release – it will not break API compatibility.

Nor is software the only part of IT that manifests backward compatibility. Hardware components are often backward compatible as well. Many Blu-Ray players will also play DVDs and CDs. By design, USB3 slots will happily accept USB2 and USB1.1 devices and work with them, while USB3 devices will happily plug into – and work in – USB2 and USB1.1 slots, also by design. The latest Intel Core i7 6-core 64-bit microprocessor still starts up in Real Mode (and therefore will run MS-DOS 5.0 or even PC-DOS 1.1 quite happily, albeit with some things to bear in mind). Given that the original 8086 microprocessor was released 36 years ago, that is quite a lot of backward compatibility.

But what are the advantages and/or disadvantages (if any) of backward compatibility, and are there any ‘gotcha’s to supporting backward compatibility? That question is the focus of the next two posts in this series. The fourth post will then focus on how Joomla handles the issue of backward compatibility.

dpcalendar-apiIn a previous blog post, we discussed the increasing relevance of Application Programming Interfaces (APIs) in Web programming, and the reliance of many applications (both traditional as well as Web) on various APIs. We also pointed out that our flagship extension, DPCalendar, allows for the use (and integration) of many different calendars through Joomla extensions. This blog post breaks down the details of how you can integrate your own calendaring system(s) into DPCalendar.

Specifically, DPCalendar supports the integration of various calendar APIs by implementing an API to which Joomla plugins (a subset of Joomla extensions) can be written. In Joomla, a plugin is an extension that is executed when a particular action (event) is taken (triggered). In the case of DPCalendar, loading the calendar view, for example, will signal an event (or possibly a series of events), which will cause plugins to execute. The act of creating, deleting, viewing or saving individual calendar items also signal events, which your external calendar plugins should respond to appropriately.

The DPCalendar API

The list of events which DPCalendar recognises, the parameters they take, and the input they expect (the return values from your plugin) form the basis of the DPCalendar API. In addition, as part of the installation process, we also include the DPCalendarPlugin class, which is a collection of functions that allow you to work with DPCalendar more easily – it, too, can be considered part of the API. And of course, the plugin also has to work with the Joomla API, as well as the API of whichever calendar system being supported by the plugin.

As with all APIs, neither DPCalendar, nor the external calendar plugin with which it is communicating, has to know how data is manipulated internally or how calendaring functions are implemented by the other side; merely that both sides are following the API standards. DPCalendar happens to use the industry-standard iCalendar format to import and export calendar data, so that’s what your plugin should support when working with DPCalendar.

Write Your Own Plugin!

Digital Peak has written a number of plugins for popular calendaring systems, such as Microsoft’s Outlook/Exchange, Google Calendar, Apple’s Calendar, Facebook, CalDAV, and so on. There’s nothing stopping you from writing your own plugin (for instance, to support the Cozi family calendar system). But first, you have to complete the following checklist:

  1. Understand how Joomla extensions (especially plugins) work, and how to create them. The Joomla Documentation website has a section on how to create a plugin for Joomla.

  2. Understand the DPCalendar API. The documentation section of our website has a page dedicated to DPCalendar developers, which explains in detail the various Events that your plugin should respond to, as well as an example plugin to give you an idea of how to write your own (also available on GitHub).

  3. Understand your external calendaring system’s API (if any). Knowing how the external APIs work is key to making your plugin – if you can’t interface with the external calendar, obviously your plugin will be useless.

Another example is our popular attachment extensions which allows with three lines of code to integrate drag and drop/copy paste attachment support for your own extension. To do that you have to write a Joomla plugin as well:

<?php
/**
 * @package    DPAttachments
 * @author     Digital Peak http://www.digital-peak.com
 * @copyright  Copyright (C) 2012 - 2014 Digital Peak. All rights reserved.
 * @license    http://www.gnu.org/licenses/gpl.html GNU/GPL
 */
defined('_JEXEC') or die();

JLoader::import('components.com_dpattachments.libraries.dpattachments.core', JPATH_ADMINISTRATOR);

// If the component is not installed we fail here and no error is thrown
if (! class_exists('DPAttachmentsCore'))
{
	return;
}

class PlgContentDpattachments extends JPlugin
{

	public function onContentAfterDisplay ($context, $item, $params)
	{
		if (! isset($item->id))
		{
			return '';
		}

		$catIds = $this->params->get('cat-ids');
		if (isset($item->catid) && ! empty($catIds) && ! in_array($item->catid, $catIds))
		{
			return '';
		}

		$options = new JRegistry();
		$options->set('render.columns', $this->params->get('column_count', 2));
		return DPAttachmentsCore::render($context, (int) $item->id, $options);
	}

	public function onContentAfterDelete ($context, $item)
	{
		return DPAttachmentsCore::delete($context, (int) $item->id);
	}
}

 

pro-templateThe major decision you have to make before launching a Joomla website is how the design of the web site should be. Joomla's template framework allows you to have one neat design across the whole site. Creating such a template is not so easy, especially if you don't have PHP skills. That's why it sounds reasonable to use professional Joomla Templates from trusted template companies like TemplateMonster. This company has been offering Joomla templates since 2007.

Now, let's try to understand why more and more people show interest in using professional Joomla templates instead of making their own or downloading free ones.

What are the Advantages of Using Joomla Templates?

Price

You may like it or not, but a Joomla Template is definitely cheaper than ordering a custom one. And even if you will have to hire a web designer to edit the template for you, it's still not as expensive as if you would have to pay for a custom one.

Multiple Design Options

There are thousands of Joomla templates on the net, both free and premium ones, so you can always find the design to your liking. But please do not only pay attention to the layout of the template, but also its options to adapt to your site. Especially how it handles visitors which browse your site from a tablet or smartphone.

Saving Time and Efforts

With a Joomla template you save a lot of time because you don't need to actually design a website. You should simply replace the default texts and images with your own ones and you're ready to go.

By the way, this feature makes Joomla templates quite popular with web designers who specialize in building Joomla websites. After all, it's much faster to edit a template and turn it into an original website than build a template from scratch.

Free Customer Support

The most trusted template companies provide free support for their customers. For example, TemplateMonster can be reached in a number of ways: by phone, live chat or you can submit a ticket by selecting the appropriate department. This ensures that all your questions will be answered promptly.

Additional Bonuses

It's quite often that Joomla templates come with extra bonuses. For example you also get stock photos included into the template. They provide also a complete Joomla installer to set up their demo site on your own Joomla server.

Works with 3rd party extension

If you use a professional Joomla template than you can be sure that they fit with the big extension companies like Digital Peak. For us it is important that our extensions do work smoothly together with templates from the major template companies like Templatemonster. For example DPCalendar fits perfectly into the design of Templatemonster latest template "Ecofriendly Industrial Services Joomla Template".

 

Of course, it's your choice how to build your Joomla website, but we hope today's article will give you a quick introduction to help you make the right decision.

And if you want to get a professional Joomla Template and you want to get it at a special price, please go to TemplateMonster.com and save 30% with code 'Digital-Peak'.

Please note: the discount code will be only valid for a week, and will expire on Thursday, September 4.

dp api

A few years ago, a lot of interest was generated around the idea of Service Oriented Architecture (SOA), when it came to IT infrastructure within organisations. The underlying premise behind SOA was that individual components or subsystems within an IT infrastructure could essentially be black boxes; exposing only the services necessary for the components to do their functions, while the details of implementation of those services are hidden from other components, and in fact, do not need to be known. SOA promised that it would simplify the deployment of IT systems, because they would not be so interdependent on each other (i.e. as long as the service ‘contract’ was honored, it didn’t matter what the implementation details were).

The concept of a service oriented architecture (SOA)

The concepts behind SOA are not new. Procedural and object-oriented programmers would be instantly familiar with the notion of separating the interface (declaration) of a procedure or function from its implementation (code). In particular, software platforms (software on which other software is designed for and run on, e.g. operating systems) – including the Joomla! CMS – provide a series of services and system calls for the programs that run on top of them. Taken together, these services and calls are collectively called an Application Programming Interface (API).

The role of an API

As with SOA, the value of an API – of all APIs – is that it provides a standardized way of communicating between application and platform that, in theory at least, does not change between successive versions of the platform. Joomla’s APIs, for example, stay the same within the same major version release (version 3.1 APIs would be the same as that of 3.5). One of the most famous APIs, the Win32 API, has been around since 1993. Applications that were correctly written for the Win32 API back in 1993 would still run properly on Windows 8.1 in 2014, more than 21 years after it had been introduced. In those 21 years, the underlying platform (Windows) has changed almost beyond all recognition – but because the API was still fully honoured and supported, the application does not need to care about how the platform implemented the Win32 API, only that it did so correctly.

In the days of Web 2.0, which is all about software-as-a-service, and cloud architectures, APIs play an even more dominant role. All Web services (e.g. Twitter, Dropbox, Google Maps) that allow third-party software to have access to them do so through public APIs, which both traditional and Web programmers can then use in their own applications to work with these cloud services. The Android OS exposes an API for programmers’ convenience, as does iOS. CMSes like Joomla also expose APIs so that extension developers (including Digital Peak) can extend the functionality of the CMSes in a fully-compatible way with all other extensions. In the case of our extensions, we even work with multiple APIs (Joomla’s and Google’s, mostly).

The point of APIs is that as long as the interface/‘contract’ is honored, how it’s implemented is not an issue. This is both a strength and a weakness; while an API is supported by the Web service which created it, programmers don’t have to worry about whether their application will work or not. If you instead relied on some undocumented idiosyncrasy of the Web service to make your application work faster or ‘better’, then if the Web service changed the way it worked, your application may fail miserably. Unfortunately, the weakness of an API is that if the API itself is updated, changed or dropped, then existing applications that rely on the API will no longer work, and new versions written to support the new API. This is why, when Google kills support for v1 of its Google Calendar API, our now-deprecated and soon-to-be obsolete GCalendar will also stop working.

API at Digital Peak

So how do Digital Peak’s extensions work with APIs? Well, our extensions communicate with the rest of Joomla through Joomla’s APIs. This way, we can request and present data in exactly the same way as every other extension (basically we use the MVC layer of Joomla). We are able to request and present data from web services like Google, Facebook, MS Exchange by using their public APIs. In fact, given that (for example) DPCalendar allows so many other plugins to be used, we’re working with a vast number of APIs. All of this work happens on the Joomla server behind the scenes, as our extensions initiate sessions with the various other Web services involved. None of it is actually taking place on the website visitor’s browser, which only displays the information Joomla delivers to it after all the hard work is done. That's why all of our plugins support a caching mechanism to temporary store the data of the external services on your Joomla site to speed up your page load.

joomla-life-cycleA software development lifecycle (SDLC) was once conceptually very simple. You bought a licence for a particular software version, which usually entitled you to support and some bug fixes, and when the next major version came out, you bought another licence for that one. It was very simple for the software makers as well; once a major version was released, work could ramp up full speed for the next one. Ongoing support for any version was likely to be discontinued one or two version releases later.

Today, such is no longer the case. The Internet has made users accustomed to the idea of free updates to software available via download. Support for any particular version of software has become impossibly long (Windows XP takes the crown for the longest continually-supported software at 14 years). As a result of these and other factors, various different SDLC models have arisen; some of which are traditional, others more suited to agile paradigms, and yet others that work well in the “free software” world. All the above now provides you sufficient background to explain why Joomla! is switching from its current SDLC model to a new one.

Because Joomla is an FOSS project, it is impossible for its support to be as comprehensive as that of Microsoft’s, for instance (at one stage, Microsoft was supporting 4 different OS releases). Hence, it is important that the SDLC chosen matches the needs of the Joomla project. It is equally important that everyone in the ecosystem is aware of the major ramifications of this new release strategy (using the [major].[minor].[patch] version numbering system):

  1. No more specific Long Term Support (LTS) versions
    Previously, Joomla’s X.5 (i.e. 1.5, 2.5) releases were classified as LTS releases, which meant that they would be supported longer than any other minor releases (e.g. 3.1, 3.2, 3.4), and will continue to be supported even after newer minor versions have been released. There is no longer any such guarantee; the last point version will be the LTS version. All major releases (v1, v2, v3 etc.) will have 2 years in the active development phase, and a minimum of 2 years in the support phase after that. If a new minor version is released during the support phase, it resets the 2-year support phase clock. Only the latest minor release within each major version will be supported

  1. Faster and more regular minor releases
    Adding features to Joomla could be time-consuming, depending on whether you got it in before the feature freeze cut-off. With less time passing between each minor release, this means developers no longer need to be as frantic as before, giving more time to regression test their features before inclusion in a minor release.

  1. Major releases will break compatibility with previous releases
    While it isn’t guaranteed to happen all the time, major releases are the only releases where backward compatibility is intentionally discarded. This means that each time you upgrade Joomla (e.g. from version 3.x to version 4.x), be prepared for things to break.

For regular users of Joomla, what does this all mean? Generally speaking, it means that in order to ensure that you have a smooth updating and upgrading experience, you should always update to the latest minor release of your major version, and that you should upgrade Joomla to the next major version every 2 years or so.

Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok Decline