Developer Daily


Offline Drupal Handbook and API documentation

Posted in Drupal Sweden by Carl McDade on March 10, 2010
Tags: ,

In the next couple of days I will again be doing iterative releases of an offline version of the Drupal Handbook. A long time ago I was creating them for Drupal 4.xx and 5.xx. Suddenly there was fierce competition from those close to Drupal.org. So I thought that eventually offline versions would be the norm. Unfortunately two things happened. First Drupal.org started a project where they traded print HTML pages of the handbook for OPML. They never quite got to the point of automating the process of converting OPML to XML and then to a format that supports the easy creation of compressed HTML files. Printer-friendly pages are the basis for creating good windows help files. Later on down the road all the sites that suddenly were producing offline documentation faded into the ether. Drupal.org never adopted any server routines for creation of any type of offline docs either.

So here we are in 2010. I am again going to take some of my free time to produce and consistently updated CHM version of the Drupal Handbook which will include the API documentation. This time I am going to do things a bit differently. The files will be available to members of the Drupal.se Group at Linkedin.com. They will get immediate access to the latest password protected version of the files. Later on if there is enough interest in funding or sponsoring the effort then I will make the offline version available for open download.

Drupal Sweden Mission Statement

Posted in Drupal Sweden by Carl McDade on March 3, 2010
Tags: , ,

The mission of Drupal Sweden will be on the corporate and professional aspects of Drupal in Sweden. The Group is a tie in point for using the Linkeded API to bubble out Drupal activities in Linkedin to Drupal.se. This is part of my idea of leveling the playing field and giving all those involved in the Swedish Drupal community be they company, consultant or programmer a chance to use the Drupal.se domain as a connection point. Linkedin is also the perfect platform for bringing in more IT professionals located in Sweden to the Drupal community without depending on the discovery of the domain name. I have spent the last two months investigating this idea and explored other mashup venues like Facebook or developing a community site using Drupal. I decided that the present state of the Drupal user base in Sweden and the need to maintain a high degree of professionalism makes Linkedin the best provider.

Drupal Sverige tends to focus on the language agnostic points of Drupal. This does not promote the international focus of Drupal. There are many companies that are headquartered in other lands but have serious business connections to Sweden. It is my intention to allow them access to more information regarding the use of Drupal in Sweden without the barrier of language.

Sponsored ads

Profits generated from sponsored ads (minus hosting costs and other obvious costs incurred for maintaining Drupal.se) will be used to pay fees or salary to any person or persons while working on promoting Drupal as the open source cms platform of choice in Sweden. General use of advertising revenue be webmastering Drupal.se, development of new modules and themes or costs incurred by traveling to promote Drupal in varying regions of Sweden or internationally. Profits exceeding these previously mentioned items and the normal cost of running Drupal.se will be donated to the Drupal Association.

Drupal.se is a community site for Drupal, an open source content management platform.

Equipped with a powerful blend of features, Drupal supports a variety of websites ranging from personal weblogs to large community-driven websites.

Carl McDade – Webmaster

How to show Drupal nodes using jQuery for AJAX and JSON

Posted in Computer Science, Drupal, PHP by Carl McDade on February 28, 2010
Tags: , , ,

The other day some one asked about my familiarity with JSON and its use as a format for delivering information across the wire. I also saw that many ask about how to show Drupal nodes using AJAX. So here’s a demo module that does both. I did not break up the code but chose instead to make careful comments. This way you only have to copy and paste to get going. Enjoy!

(more…)

Adding Jquery and some other frameworks to Movico

Posted in Drupal by Carl McDade on February 26, 2010
Tags: , , ,

Drupal uses Jquery but there are some pre-requisites and hoops to jump through. You can also use other frameworks like Extjs, Zend, Codeigniter. The problem is that there is no standard way of implementing these frameworks. The result is a jumble of code and some unseen after effects caused by the mixing of backend templating and the frontend code on the same page and within the same module code. There is not enough clean separation of the files involved and their location in the core system, module system or templates. Sometimes the development tracks of the different frameworks do not coincide with that of Drupal. This means that security and feature sets are not available unless some very time consuming labor is done in patching and testing the latest version systems. Or you may have to just wait.

(more…)

Movico: OOP module for Drupal now with Singletons

Posted in Drupal by Carl McDade on February 25, 2010
Tags: , , ,

I was finding dozens of articles on using OOP, design patterns and MVC in PHP around the web. But what I didn’t find are exciting uses of these tools. In the case of the Singleton design pattern I found myself growing tired of seeing the same old database connection examples. To me most blogs on this were showing a lack of imagination. So I am setting out to use these patterns where they fit and where they make things easier and simpler in everyday web development especially where it concerns Movico.

Drupal uses PHP globals by setting them using the keyword *globals $var;”. Well I don’t like this so I immediately set out to do this another way when I found myself placing them into Movico.  After deciding to use a Singleton design pattern to set up some commonly shared code for the MVC controllers.  I saw that it was a perfect opportunity to use the same Singleton to create variables. I decided that placing the applications configuration in would make for an even simpler code base. It would also remove the need to use Drupals database oriented solution and provide better performance.

So here’s some of the code. You can get it all from the Github repository which is commited to frequently.

(more…)

Movico: MVC and OOP module for Drupal updated 2010/02/22

Posted in Drupal by Carl McDade on February 22, 2010
Tags: , , , ,

The trains ride today was crazy. Late trains, people jumping in front of the trains that were running led to me spending nine and a half hours on a trip that normally take less than four hours. Luckily I had a laptop with me so I took the opportunity to work on Movico. Here’s some of the latest code. You can get the entire package from github movico
(more…)

Build a Drupal style hook system using PHP reflection

Posted in Drupal by Carl McDade on February 20, 2010
Tags: , , ,

The Movico module is a scaffold for building Drupal modules in OOP and MVC. One requirement of the project is a hooking system, similar to Drupals, that uses OOP. The following is how I plan to build such a system using the PHP 5 reflection API.

This code shows how using Reflection makes it easy to create a system that hooks into several Class methods to build a linked menu. This moves two systems that are heavy resource users and overly cached from Drupal and places them into the Movico domain. (more…)

Building modules for Drupal using MVC and OOP

Posted in Design Patterns, Drupal, PHP by Carl McDade on January 4, 2009
Tags: , , ,

I just spent the last day or so working on a scaffolding module that lets developers build a Model-View-Controller application as a module in Drupal 6. The code and ideas are still in beta stages but working beautifully. This is the fleshing out of ideas that came about under development of Drupal websites.

Take me straight to the code (more…)