Yii Framework For PHP Developers.

0 Comments | This entry was posted on Apr 06 2011

I had been trying many different PHP frameworks looking for one that just made sense and met my most basic requirements of MVC, PHP5 only, form pre-population and validation, ORM/Active Record and scaffolding. I eventually found Yii and have used in it several personal projects. However I had not learnt enough to be comfortable using it in some agencies I work in because of the pace the work is done. If I find that Yii doesn’t do something important then I’d be in a little trouble.

Then late last year the first Yii publication was released, titled ‘Agile Web Application Development with Yii 1.1 and PHP5’ by Jeffrey Winesett. The book is incredibly easy to follow and a pleasure to read. Each chapter made me appreciate Yii more and more for its simplicity and the rapid development that can be achieved.

After using frameworks that use scaffolding I find it a pain to use others that don’t. Nothing is more satisfying than designing your database and then using scaffolding to automatically build the model, views and controller for each database table. As of Yii version 1.1.2, scaffolding is best done using the browser based Gii interface. Gii allows you to build the model, views and controller  with a few quick steps and then you are immediately able to create, read, update and delete records from the table. It’s that easy.

Yii is very modular in every area. It provides all the functionality that you expect, but if you don’t like the way Yii does something, simply create a module to replace it to do it you own way. The book describes methods of doing that for logging, authentication and caching.

What this book also taught me was something that I have neglected up until now, Test Driven Development (TDD). Yii has tightly integrated unit testing (PHPUnit) into the framework and the book clearly states step by step instructions on how to include TDD in your project.

The book contained very few errors. I found in the last two chapters that there were misprints that were easily noticeable, probably due to not proof reading through the end of the book.

I can’t recommend this framework and the book enough. Give it a try and you won’t be disappointed.

Android Development

0 Comments | This entry was posted on Jan 12 2011

After putting myself through a crash course in Java it was time to tackle Android development. I’ve wanted to learn how to modify software on mobile phones ever since I had my first one many years ago. However, being an open source nut it wasn’t until the Android platform became available that I finally took the plunge.

After some research I decided the best way to teach myself Android was to purchase Professional Android 2 Application Development by Reto Meier. As it states in the book, Reto works as an Android Developer Advocate at Google and has been involved with Android since 2007.

Learning Android was a lot harder than I anticipated. It is very different from web development as some might expect but the learning curve was greater than expected. I laughed when a colleague at one job told me he would rather get hit by a tram than learn how to develop with Android a second time. I’ve found many people have found it tough but maybe that’s because most of my tech friends are web developers.

The book starts of introducing you to the development environment (Eclipse) and creating your first Hello World application before going through each of the different facets of what makes up and Android application.This includes the activities  (views/display elements), adding menus, listening to events and creating events, file and database functionality and integrating with other applications like maps.

I don’t think it’s the publication that makes Android difficult to learn but the concepts themselves. Looking back it doesn’t seem to difficult. You just need to get your head around the way things are done the Android way. Now just to find some time to build something.

Learning Java

0 Comments | This entry was posted on Sep 10 2010

Recently I took the task to learn Java. I do not intend to explicitly get a job in Java development or work with it as a hobby. I decided to learn Java because I am very interested in Android development and the Android framework is built with Java. I have a tendency when learning new things to learn them from the foundation. Therefore when taking on Android, I had to start by learning at least a moderate amount of Java first.

I believe the best way to teach yourself a new technology is to buy a book on the topic. This is because it will walk you through all the steps from concept, through fundamentals to coding and implementation of the topic. The alternative is to learn fro the web but generally you’ll end up reading tutorials here and there and not grasping the technology as a whole. Situations will arise that you don’t understand because you don’t have the full understanding.

Anyway, I found a book by Herbert Schildt called Java – A Beginners Book – Fourth Edition. Quite annoying after all these years to have to read a beginners book but I knew Java was not going to be the easiest thing to learn so I must start from there.

With some experience in C and being a long term OOP PHP developer, I found that the book was quite easy to follow. The OOP implementation was very much the same as PHP with a few subtle differences.

The book is quite thorough at 670 pages and took me a lot longer than I hoped to get through. I have to say that I am satisfied that I have a great understanding of Java and am comfortable moving forward to Android development. Wish me luck.