Archive for the 'Open Source' Category

What’s in a Theme?

Written on November 3rd, 2006 by James

Guess what I’ve been doing lately.

That’s right, it’s the new theme!

I think the title says it all really. I’ve completed the first phase of the new look for theTechnophile, I say the first phase because when is a website ever really finished. It is now very loosely based on the Wordpress default, hence some of the element names remain the same, but I’ve changed the whole structure to what I believe is known as a liquid layout.

The basic idea was to be able to maintain the look and feel of the site whilst using all of the available screen real estate. This is accomplished through the use of positioning in the Cascading Style Sheets (CSS). My two main element blocks, the header and mainbody, are positioned relative to each other. The column elements, sidebar and content, within the mainbody block maintain an absolute position from their respective sides. It took a bit of getting my head round since my CSS turned out to be quite rusty and I found HTML Dog to be a useful reference.

Another key feature of liquid layout is that it copes much more smoothly with changes in the default browser font size, thus improving accessibility. Finally, it allows you to put the important content elements much nearer the top of the HyperText Markup Language (HTML) documents than in conventional designs. This way the content appears at the top of your screen if CSS are turned off or not supported.

Why does Internet Explorer have to be different?

I’d forgotten just what a pain Internet Explorer (IE) can be. You see I use Mozilla Firefox, Safari and occasionally Opera browsers and even when I kept all of these happy IE had to object. I found this fantastic new graphics application called Inkscape and used it to generate the logo for the site as a semi-transparent Portable Network Graphics (PNG) file. Seriously, if you like playing with graphics you should give Inkscape a go, especially since it’s open source. The other browsers are fine with this, but IE was not interested. The positioning worked fine on the others, but IE? The text size rendering looked great, but on IE… yes, you guessed it! Still I think I managed to find a solution that keeps all these browsers relatively content with a little help from Position is Everything, identifying a number of interesting bugs.

Still I did have to concede that the lack of transparent PNG support on IE was a solid boundary. So, a little PHP script to introduce extra CSS code allowed me to take advantage of their cascading nature. The result? A more IE friendly, if not so pretty, presentation without transparent graphics. If your using IE to read this, I’m really sorry but it looks genuinely better in other browsers, try it.

What’s next?

First I need to let the new look settle in for a while. Then I would like to introduce a bit of script to allow the user to choose which side they want the menu sidebar. This shouldn’t be too difficult due to the layout technique being used, but then again it could be a case of famous last words.

I may try writing an article to spell out what I did in much more detail. I’d like to be sure I understand it before that though! I have another website which needs a lot more work doing on it and which could be the appropriate place for the above article once completed. This is going to task my Java skills… gulp!

Programming Language Overload.

Written on October 25th, 2006 by James

I’ve recently finished an Open University course entitled “Object-Oriented Programming with Java”. It culminated in an exam, my first for about twelve years, and now it’s over I want to actually use some of this knowledge in all that spare time.

Browsing the Internet it is apparent that there are a lot of programming languages out there from which to choose! Each has its strengths and weaknesses, so here are a few that I either use or want to waste some time on.

PHP.

I know… this is not the best OOP language. I’ve heard it said and having taken the OU course understand why, but it is also the language used by two of my favourite web applications, Wordpress and Drupal.

As you can plainly see this blog is powered by Wordpress running on my web server. Wordpress is as easy to install as it claims and the theme templating system is relatively straight forward. Oh yes, I know you wouldn’t know it to look at this standard looking blog, but I intend to do something about that with the extra time I mentioned earlier. Maybe more about this in a later post.

It is most definitely not OOP, sticking firmly to the procedural approach to which PHP is probably best suited. A fact that is also true of Drupal.

In my opinion Drupal is one of the best CMS applications for relative beginners anticipating something more than a weblog. I’ve found the installation relatively simple and the coding is reasonably clear… for a procedural application. What appeals the most is that it’s a very compact and tidy installation. The file structure is well thought out and things easy to find. But despite a good templating system it doesn’t really satisfy my craving for true separation between content and presentation.

Java.

Java is object-oriented and the basis for my course. I intend to take the follow-on courses too, so may be I should stick to what I know, but where’s the fun in that?

Well the “fun” starts with developing another web application based on Apache Cocoon or Lenya. Both of these applications are developed in Java and I suspect are capable of providing much more flexible and powerful web services than basic CMS.

I hope to couple Cocoon with XML to provide content in a range of presentation formats and for exchange with other web applications. It’s the closest you can get to handling content and presentation independently. Don’t know how well it will work, but it should be interesting.

Ruby on Rails.

Ruby is definitely an OOP language. In fact it couldn’t get much more object-oriented, there are two other things to think about here. First Ruby is an interpreted scripting language on its own and second, putting it on Rails provides a new web development framework. Add all this together and despite not knowing what I want to do with it I still have to try it out for myself.

Open Source Software

Written on August 31st, 2006 by James

After my last post it occurred to me that the idea of open source software (OSS) might be worth trying to explain. My understanding is that the emphasis is on freedom rather than free of cost. The commonly cited phrase is that true OSS is ‘free as in speech, not as in beer’. The idea is that by compelling software programmers to make their source code freely available it allows others to use that code for any purpose they wish. In turn, if these ‘other’ programmers choose to distribute their new code, based on the original OSS, they are compelled to make it freely available too. This is meant to result in an environment in which there is freedom to innovate.

Unfortunately, as in all things there are practicalities to consider. Good quality software needs to be developed in a controlled manner and supported to offer any widespread appeal. Proprietary software has lived with this fact since its inception, with ranging degrees of success. Can OSS provide any competition?

  • Quality: Small OSS project might suffer from a lack of professionalism, but many of the mainstream projects are developed by the same group of people who working in the industry by day. They use commercial quality development tools for controlling every aspect of the project including revision/version control, bug reporting and workflow. Coincidentally, a number of these are Open Source too!
  • Security: Since the code is free for everyone to see, those naughty crackers (the term hacker is often misused!) will exploit this to render the OSS unsafe. There is a flip-side to this argument due to the fact that the crackers are not the only people free to view these vulnerabilities. The resulting rapid deployment of security patches frequency leads the commercial sector. Stick to downloading your software from reputable sources, and checking the security information provided, and you shouldn’t have any problems. However, it can’t be denied that up to this point the commercial vendors have been a much more attractive target for attack. This is in part due to their perceived market domination, but as the use of OSS grows it will probably have to face greater exposure.
  • Support: My experience has been that the documentation accompanying major OSS projects is at least as good as that of any commercial package I’ve bought. Couple this with the fact that these projects have a number of highly active user forums and you are not going to find many problems someone hasn’t already solved. In my opinion OSS often leads the commercial sector in support.
  • Rapid development: For the developer the main beauty of OSS is that the source code is available and you are free to manipulate it as you will. This means that if the code already exists to provide functionality you need in your application, use it! The increase in development speed attendant with not continually reinventing the wheel is extremely valuable. Sure your resulting source code will have to be made freely available, but you can still make money by selling your product and support. The likes of Redhat and MySQL do it all the time.

As you can probably tell I’m a fan of the OSS idea, in part due to the fact the I’m into freedom in most facets of life (there are limits though in case you were wondering). I have used both excellent open source and commercial software products and would always advocate using the best tool for the job. I suspect that the two approaches will continue to coexist, slowly merging into one another. Many of the large software companies, such as Microsoft and Apple for example, are showing more interest in the open source concept and you can bet it’s not because of a yearning for a freer world. They too can see where openness can usefully fit into their business models, can you?

If your interested you might want to look at these references, they were useful to me.

  1. Brock, Simon and Wrigley, Ian (July 2005) ‘Open source defined’, PC Pro, Issue 129, pp. 226-228.
  2. Open Source Initiative (2005), The Open Source Definition Version 1.9 [online], Available form: http://www.opensource.org/docs/definition.php (accessed 31 Aug 2006).

My Favourite Open Source Tools

Written on August 31st, 2006 by James

I was thinking about how much I’ve come to depend on open source tools since I first discovered the movement’s existence. This activity obviously resulted in a list of the projects I use regularly and those I intend to try in the future. Well this is a selection of a few of my favourites.

Mozilla Firefox.

This is my browser of choice for Windows and Linux, though I must admit that I quite like Safari on the Mac.

Mozilla Thunderbird.

For reasons of compatibility I use Thunderbird as my email client on all my machines.

Freemind.

This is an excellent tool I use to think ideas through, plan documents like this one and even organise my revision notes before dreaded exams.

Fedora Core (FC) Linux and all the goodies that come with it!

I’ve tried a few flavours of Linux over the years, but have come to settle on this one. It’s the Operating System (OS) that runs all my servers and I have recently started playing with it on the desktop. In my experience it is stable and well supported.

Apache HTTP Server with PHP installed.

Running on FC servers this is my primary web platform as it’s well supported by a large community, quick and easy to use. I am thinking of trying Apache Tomcat with Java soon, but will certainly continue to use this platform.

Wordpress.

This is new to me, as is this site built around it. A little early to tell how good it is yet… time will tell!

MySQL.

Where would my web applications be without MySQL providing the backend storage? Probably using another open source database, there are plenty to choose from! However, this is an old favourite and one of the industry standards.

OpenSSH.

I wouldn’t try and access remote systems any other way. I’ve used proprietary SSH applications, but this is easily as good given that it has to avoid proprietary cryptography algorithms.

Eclipse.

For simple XHTML/CSS work a text editor will do, but for more complex programming work I tend to use the Eclipse platform with a selection of suitable components, of which there are many.

Subversion.

Installed on my development server this version control software is powerful and, in my experience, reliable. It is well supported and has a range of tools for client access from any of the platforms I use.

Thanks to everyone involved in these projects. If I’d had to buy licenses for all this I probably wouldn’t have been able to do a fraction of the things I have over the last couple of years. I’ve learned a lot as a result of your efforts and it is greatly appreciated. I hope to be able to contribute myself in the very near future, but that is a story for another day.

My Comments

I joined Technorati when I created this blog. If you like to try a new blog every day, then this is the place for you.

Technorati

... and if you want to find me at Technorati just click on my picture.

Me at Technorati

flickr is a great web application. This is the site for people that love images and photography. Even if you don't take them I recommend you just imagine your in the biggest gallery in the world!

Firefox is an open-source web browser with a well established pedigree. I consider it to be a far better browser than Microsoft Internet Explorer and have used it for several years. I suggest you download the latest version and try it for yourself.

Download Firefox 2

theTechnophile is proudly powered by WordPress and conforms to the following standards.

Valid XHTML 1.0 Strict

Valid CSS!