Metal Toad: What's in a framework, experiences from Rails and Drupal
I've now been working professionally in Drupal for a year and have learned a lot about it; I have some patches into contrib but I've not really done much with core other than some simpletests I was too shy to commit at Drupalcon and some comments trying to help people out on d.o. Prior to my stint as Drupal programmer I was a hardcore Ruby on Rails developer for about 4 years. Over the last two years in particular I've learned a lot about frameworks and I'd like to share an observation about which framework feels right to me for which situations and why.
Metal Toad: Semantic Views is Awesome
Like any Drupal themer, I've done my share of grumbling about the frequently ridiculous level of nested divs with dozens of classes. I'd heard some people mention a module called Semantic Views, but I never really understood what it was for until I found this video. If you don't understand what the big deal is either, take the four minutes to watch. It's a total "ah-ha!" moment. I'm happy to say that I just used Semantic Views for the first time on a client site, and it's just as awesome as everyone says. It saved me a ton of work and let me get exactly the markup I wanted, even while working around Chuck's nested views.
Drupal Blogs, Pictures, and more on WordPress: Backwards-compatible URLs in Drupal
Last week, I wrote a therapeutic post about our effort to provide backward-compatibility in the next version of a website, saying that I’d post again with notes on how we ended up solving the problem. This is that post.
To recap, we have almost 800 URLs on the current version of a site that are in the format of
http://www.example.org/foo.asp?foo=123
These URLs are all going to have to redirect (via 301 redirect if possible) to a URL like
http://www.example.org/node/839
In the end, we’ve used the Drupal module path_redirect, which offers the ability to provide everything we need. I wrote a simple script that looked up all 750+ records from the old CMS that powers the current/old website, and populated the path_redirect table in our Drupal database with those shortcuts, and the node/NID path for the new locations. The redirects are set up to respond with 301 Moved Permanently status codes.
Drupal Blogs, Pictures, and more on WordPress: Drupal - OpenPublish
OpenPublish is build on Drupal and is my first foray into the world of Drupal.
I have not started with the core Drupal product as I need to quickly evaluate a CMS for an intranet project. This appears ideal for the this so here goes.
OpenPublish requires GD installed and configured
apt-get install php5-gd
Restart Apache
/etc/init.d/apache2 restart
You also need a MySql database configured before you can start the install, Install PHPMyAdmin and follow the instruction on getting it to work.
When it is on your system open the web site http://x.x.x.x//phpMyAdmin
logon on with your normal credetials and then choose database
Create new database
The download of OpenPublish at the time of writing was here.
Download and unzip and un-tar
copy the result into the /var/www forlder.
cp -r openpublish /var/www/openpublish
Some of the directories need write privileges for setup these are as follows:
cd /var/www/openpublish/sites/default
chmod -R o+rw files
Vladimir Zlatanov: Entities, Bundles, Fields and Field instances
Drupal 7 introduces a number of new apis and with those comes new jargon. Untangling that could be daunting. I'll try to briefly sketch what is what and relate it to terminology outside of the Drupal world.
Note Revised paragraph order and wording, clarified wording of definitions
Lullabot: Drupal Voices 158: Emma Jane Hogbin on PHP for Designers
Emma Jane Hobgin (aka emmajane) gives an overview of her DrupalCon San Francisco presentation on PHP for Designers. She talks about the importance of pattern recognition and forensic coding, some helpful modules such as Devel Themer as well as some of the basics of Drupal theming with tpl.php files and preprocess functions within the template.php.
For more information, be sure to check out her PHP for Designers presentation.
John Albin Wilkins: Converting a Subversion repository to Git, (7 steps to migrate a complete mirror of svn in git)
When I first realized that I needed a version control system, the best system at the time was CVS. (No, really.) Subversion was nearing 1.0, so I waited for its release and then used it everywhere. Well, that was 2003. Time for a change.
This past year, it became obvious that there were many Git users within the Drupal community, so Drupal has decided to move to Git. Since then I've started learning and researching the best ways to convert all my development to a Git-based workflow. So far… it rocks.
Engineered Web: Performance Is Green
Are you writing and using environmentally friendly software? Have you ever thought of the impact on the environment for the software you've written? Working in front of a computer it can be easy to overlook the impact on the environment due to what were creating. It's not like drinking a beverage out of a styrofoam cup (they don't break down). But, there is an impact. As Internet usage grows in leaps and bounds we need to start taking a closer look at that impact and doing something about it.
Why Performance Is GreenWhy did Facebook start using Hip-Hop? According to their blog,
With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead.
When we have less servers we use less power, we need less space in buildings, less servers need to be built for our tasks and our overall footprint is smaller.
Think about it like this. We buy energy efficient appliances, we talk about turning lights off when we aren't using them, we look at energy efficient cars, and we think about being environmentally conscious. So, why not extend this to what powers our websites.
Gábor Hojtsy: How Drupal improves and evolves, the basics behind the community
It is that phase of my life! I'm just turning 30 in a month, working with Drupal for 7 years and just had my third Acquia anniversary a week ago. Time to look back and evaluate how things went, all the good and bad things; even better if the wisdom can be shared with others. This was part of my thinking when I submitted the session titled "Come for the software, stay for the community" for Drupalcon Copenhagen. I was interested to distill and share how Drupal came to be as unstoppable as it is, what core values lie behind it, so someone coming fresh can understand and integrate with these.
When Dries Buytaert started Drupal he made a few key decisions which launched the project and kept being governing principles ever since. First of all he decided to make it free and open source, and release it under the GPL. The choice of one single license helps you use all the Drupal components together without the requirement to consult lawyers. Also, the choice of GPL in particular ensures that derivative works are distributed in the open as well.
Matthew Saunders: Drupalcon CPH - Commerce Guys Talk Drupal Commerce
Ryan did a session on the new version of the D7 Commerce Module. He was the original writer of the Ubercart package - a main stay of ecommerce sites in Drupal 6. His self deprecating humour at the beginning of the session was charming as Ubercart was his first segue into many aspects of Drupal and it has become the defacto leader of the pack for Drupal ecommerce sites.
His new offering is looking very slick, making use of fields in core for example, and while Ryan tells us it isn't quite ready for primetime (he's still building out features) it looked pretty good.
Video from this session is below in seven sections. The original first video was only 4 seconds long.
Kristof De Jaeger: Benchmarks for the Display Suite module
I've been promising benchmarks for the Display Suite module after every presentation I gave so far. It took me a while to get a good setup but now it's here. I've used the demo site as a start, so there are a lot of modules enabled for this test. Views, panels, fivestar, heartbeat, comment, taxonomy, location, gmap, imagecache are the most important ones since they all integrate with the ecosphere of Display Suite modules.
I added a new content type called 'benchmark' and added 14 CCK fields to it: 4 textfields, 4 textareas, 2 images, 2 filefields, 1 node reference and 1 user reference. It also has a title, body, 2 taxonomy fields, a fivestar widget and a couple of comments.
Depending on the test, the complete set of modules integrating with Display suite are enabled or disabled. These include ds, ds_ui, cd, hds, nd, nd_cck, nd_search, nd_fivestar, nd_location, nd_switch_bm, ucd, ud and vd. You gotta love small project names right ?
<!--break-->
The first test was ran on my Fedora Core 13 desktop - Intel Core Quad, 2 GHz, 2MB RAM with php 5.2.13 and eAccelerator - ab sending 100 requests with 5 concurrent users on a single node and page caching disabled.
I Can Localize: How to Translate Interface Strings
Translating interface strings is always a painful process. Actually, it's difficult to achieve in many content management systems, not just in Drupal.
Unlike node contents, interface strings can come from many different places.
They can be part of Drupal core, from modules, themes or dynamically generated by the site's admin.
The hard part is locating these interface strings which appear to site visitors and translating them. To visitors, it doesn't really matter where the strings come from. All user-facing strings must be translated, for the entire page to appear in the right language.
Choosing Strings With The Localization Client Module
The localization client allows searching for untranslated strings easily. For site admins, the most important feature is the ability to spot strings as they are used on public pages.
Once installed and enabled, the Localization Client opens a panel at the bottom of public pages. These pages are viewable to admins only and not to site visitors.
Lullabot: Command Line Basics: More Editing with Vi/Vim
This video picks up where we left off in the Editing with Vi/Vim video. This time we take a look at some shortcuts for replacing text, how to copy/paste, and the cool visual mode feature you get with Vim.
Scott Hadfield: Drupalcon is dead. Long live Drupalcon?
With Drupalcon Copenhagen now behind us and Drupalcon Chicago approaching, I've found myself thinking about what Drupalcon is and how it's changing.
My first Drupalcon was in Barcelona, I was lucky enough to get to tag along with the guys from Bryght. I had an absolutely amazing time and met dozens of people, many of whom are now quite close friends. To top it off I also met my now fiancee and a future boss (no longer my boss, but still a good friend).
Since then, the twice yearly Drupalcons have consistently been highlights in my year. It's often the only time I get to see many of my friends in person.
