10th Jan2010

From HTML Website to CMS with the same design powered by WordPress

by admin

Last week i had a task that i was really waiting to get one of these days. We had a client who has a basic informative website about a service they offer. The website was created a couple of years ago and they were very happy with design, but they wanted it to be a CMS. So that if they want to add another page they don’t have to manually create the page and add a link to it from the navigation menu on all other pages.

An obvious choice was WordPress since all they need is a 10 page website plus Blog, Drupal would be to big of an overkill for this scenario. Now, even though i already made more then 30 WordPress installs, i usually used either a free them and just made some small changes or even sometimes the client liked the theme so i didn’t even had to touch it.

I was looking for a blank WordPress theme that while having all the necessary elements would let me do the design. And while i am sure there are dozens of those here is one i used and was pretty happy with, its called WP Framework their own description says it in the best way possible:

A blank WordPress Theme Framework that’s everything you need, and nothing you don’t

And thats exactly what it was. All i had to do is break the existing HTML into parts as following:

  • header.php will hold parts of the HTML that never change from page to page on the top of the page
  • footer.php holds parts of the HTML that never change from page to page on the bottom of the page
  • sidebar.php has to have the HTML that will container that will be able to stretch based on the widgets activated in the back-end menu
  • and of course index.php thats where you include the header, footer and sidebar plus the container for the main part of the page your posts and pages.

Then i imported the CSS and 99% of the site was done. Feels great -I just created my first WordPress theme. Having done it i see first hand why there are so many nice and free WordPress themes, since you don’t have to be a coder to make one.

03rd Jan2010

Should you use WordPress or Drupal?

by admin

I spend most of my working days working with Drupal so it’s no surprise that my first blog post on my site was about Drupal. You probably noticed though, that my blog runs on WordPress. I knew someone will point it out to me and ask me why, and i got this question today from a friend of mine. So i decided to write a blog post about the general difference between WordPress and Drupal, and when you should choose one or another.

WordPress:

lets start with an excerpt from the WordPress.org site:

WordPress started as just a blogging systems, but has evolved to be used as full content management system and so much more through the thousands of plug-ins, widgets, and themes, WordPress is limited only by your imagination. (And tech chops.)

Now my thought based on experience and observation:

WordPress is an excellent system to use when creating a website that lets you quickly get your thoughts out on the web, but while it is often used as a blog, it can be configured to work in many other interesting ways as well. I have used it several times with clients that are brand new to the Internet and having a website, yet they can pick this system up and use it quicker than the other two (Drupal or Joomla). Since WP is already developed to work as a blog, though, it can be setup to do so without any hesitation. Comments are already built into the system, as well as pinging services, multiple blogger profiles, track-backs and more. Most of the time nothing needs to be done to those systems either, because they already work the way that the user would want them to.
WordPress, however, is not to be used for everything.

While i know there are e-commerce sites powered by WordPress, people have had little success (its there, just not much) using WordPress as a shopping cart. The reason that WordPress was created, was to put the keys of starting your own websites in everyones hand, take for instance their famed five minutes install. But by doing it they stripped it to the bare minimum, which in turn now stops people keep people from wanting to customize it to do things that are much more advanced. It is supposed to be used as built, out of the box, because any modification that you give to it may very well cause it to break. You will find many users of WP complaining that it is not developer friendly and rightfully so, because there will be countless times in your journey to that great website that an upgrade released by the WP developers causes your entire site to simply disappear, or for those modifications that you made previously to no longer even exist.

WordPress Pros:

  • Simple to use – No need for modifications
  • Excellent for blogging or sharing thoughts in a sequential manner
  • Even the most elderly of users can get the hang of it quickly

WordPress Cons

  • Not very developer friendly
  • The community seems to like to complain much more that the Drupal community for example
  • Upgrades, while they are extremely easy to do, sometimes bring more bugs than fixes, and the more plugins you have the bigger the chance of it happening

Drupal

If you are the type of person who would rather hand-code the content of your pages than use a WYSIWYG Editor, or if you enjoy tweaking the code that makes up the framework of a website, then Drupal is probably for you. This advanced content management system, sometimes more closely resembles a developer platform than a traditional CMS. Its not to say that only developers can use the system though, but to say that they will feel more at home here than in the other two. Interestingly, being more developer friendly does not automatically make it more user friendly in fact the developer has to work hard to make it that way if they need the end-product to do so.

There are dozens of more functions that can be used to develop in Drupal than in WordPress. Every single node has its own set of commands and tags that can be placed elsewhere to manipulate the function of the site, and this makes for a very intense experience (whether or not you know what you are doing). For those that are not so developer-minded, this can be the trial of their lives, but for people who live in code well, they can literally get lost developing some very cool websites.

Now, Drupal websites can act and function in some pretty cool ways, but Drupal has the problem that it just doesn’t look that great (at least not withoput long hours of work…). I have seen very few websites built in Drupal that look and feel as good as they function. Not that they don’t exist they are just few compared to the other ones. And the problem is not that its not themable, take for example a site we made (in conjunction with U2R1media) for Amaravati a gorgeous site but we spent probably almost twice the time on the theming as on functionality. So the problem is just the opposite its very themable and customizable, but out of the box it looks like a site back from nineties, and theming has extremely steep learning curve. You can especially see this in the theme directory on the Drupal.org website, where there are dozens of these themes built to prove the exact point I just made. It’s a shame really, because with all of the development advancements the software has, it would almost be perfect with a stronger usability and design interface. It has made huge improvements with the core 6.x but more is needed and according to what i have read and saw about Drupal core 7.x they are putting a lot of effort into this area, but we will have to wait until it’s first stable release is out and then  some time until all the important modules have their stable releases out the door.

Drupal Pros

  • Extremely developer friendly.
  • Strong community to help discern the dozens (hundreds) of functions, modules and patches available.
  • Can be used to create some really awesome websites that can outperform a majority of other sites out there.
  • Scales as no other system would

Drupal Cons

  • Not very designer and user-friendly. It’s hard for someone with little code knowledge to make the leaps required to do the very cool things that Drupal is becoming known for.
  • Themes for Drupal has been a huge case of fail (until recently). Probably because it has been developers, not designers, that are making the themes.
  • Getting a Drupal website published could cost you more time, and thus more money, than WordPress.
  • While WordPress could be hosted on a very cheap hosting, Drupal needs an access to a lot of RAM.

How Secure is it to use open source CMS

Drupal was all over the news a couple of month ago when WhiteHouse.gov remade their website in Drupal, it was definitely a vote of confidence in  in Drupal’s security by a site thats one of the most targeted by hackers in the world. Now while WordPress was not chosen by the White House, it’s known that BlackBerry is considered a brand of secure communications, so much so that even the President of United States Barack Obama was permitted by his security team to have one, and when they recently remade their Inside BlackBerry blog they used WordPress. So as far as Security is concerned, i would say it should not be on top of your list if you create in either one of the systems.

What do you consider to be the pros and cons of each system? Do you disagree with any of the remarks i made about them? please feel free to leave a comment.

29th Dec2009

Couple of things I learned while creating sites in Drupal

by admin

DrupalI am now creating my 5-th site in Drupal, three of them being pretty big and totally custom. So using a free or even premium theme was not an option. Each section of the site looked so much different that if i would cover logo and name of the site, you would probably think twice before saying thats its the same site. Obviously i made a lot of mistakes, but as they say “The best way to learn is from your mistakes”. So let me share with you some of my mistakes and what i learned from them, plus some of the modules that i found really useful.

Starter Theme

Start with free blueprint theme this will give you a starting point so that you will have all the elements on the page but without actually having any design, so that when you start putting in your design you don’t have to fight with legacy code from the theme.

Admin

Next very important step is going to be to install Admin Menu. This module is so important that it was included in core of Drupal 7.

Javascript

As i mentioned earlier the sites i was working on were very custom they were using:  jQuery, Cufon,  Accordion, Ajax, Thickbox, In-Field Labels… The version of jQuery that comes prepackaged with Drupal is old. So what i did is just put the latest version in the theme… I got it to work but not without having multiple versions of jQuery being included on every page, which in turn forced me to use “jQuery no conflict mode”. Even though we got it to work eventually, every time you add any module that uses jQuery i have to go through the javascript and substitute “$” sign with “jQuery”. So obviously there must be a better way. An indeed there is, what i could, and should, have done is install jQuery Update module, which would update the version in a “Drupal” way. Also there is a jQuery UI Module which contains:

  • Accordion
  • Datepicker
  • Dialog
  • Progressbar
  • Slider
  • Tabs

There is also a Cufon Module, Thickbox Module etc. So whatever you trying to do try to find a Drupal way of doing it.

Theming the site

There are few must have tools (Modules) in this area. You will need Devel Module to see whats going on under the hood of your drupal site what templates and what functions are used and which names you could use to override those. Another module that i find myself using a lot is Views. I use it for two entirely different purposes, one to create a custom block or a page. Another use is not so “Drupal”, sometimes you have no other choice but to stick in a SQL query into your theme, but the problem you will encounter is Drupal is so flexible and generic that sometimes to get one entry from the database you will need to connect and join three, four or even five tables, so to write the SQL query by hand will take you a while, here is where my second use of Views comes into play, there is an option to show you the SQL query the view runs while generating content you requested, so you could just copy it and stick it into your theme.

Other Modules i use:

  • Token – Used mostly by other modules
  • imageapi – Used by other modules
  • Disqus – substitutes the default comment system with the one from Disqus  which lets your readers comment by login in with their Twitter, Facebook login or others, plus it lets you have the conversation all across the web, i find it truly amazing.
  • CCK – Lets you add custom fields aside from title and body
    • filefield – File type of CCK Field
    • imagefield – Image type of CCK Field
  • imagecache – Lets you show the same image in variety of sizes, based on presets
  • Poormanscron – runs the cron jobs for you (will be included in core of Drupal 7)
  • pathauto – automatically generates aliases
  • globalredirect – makes sure that node/10 takes you to node10alias, so that there is only one URL to unique content
  • webform – If you are planning to have any forms on your site
    • webformblock – If you want to show the form in a block, versus a whole page

As i continue to make more mistakes (read learn) i will continue to share more lessons i learned. If there is anything you would like to share or ask, feel free to do so in the comments.

If you liked this post you might want to read the part 2.

Reblog this post [with Zemanta]
Pages:«123