Review: Mac App development book


Mac Development BookAs some of you may know I have been working on some new development projects recently, mainly with iOS but I am looking to expand into the Mac development realm.

I was contacted by the guys over at PacktPub.com a while ago to see if I wanted to take a look at their new Mac development book titled “Mac Application Development by Example: Beginner’s Guide”, and sure enough I said yes and that it was perfect timing. I have taken the time to read through the book and try out some of the examples to make sure that I think they are easy to understan and use.

I’m not sure of the same thing is true for the print version of this book but when I went to my account to download this book to put on my iPad, I found that they had the examples bundled up in a .zip file that I could download, why can’t more books do this?! I often find that you end up copying out of the book and it either doesn’t work or that you have not properly digested how it works. The advantage of having these demos ready to download is that you can straight away get working code which you can tear apart, change, modify and really get your hands on. I often find this the best learning approach, but it is not for everyone. The book does not cater either way (in a good way) if you want to learn step-by-step then you can, the book guides you though exactly how to do things and more importantly it explains to you what you are writing, why you need it and what it does for the application.

Now I was testing out the ePub format on my iPad and did find a few formatting errors with the way the text and tables flow from page to page but it did not effect how the book read at all.

I am fairly unfamiliar with the Xcode interface and I only know the basic locations of the popular buttons, I think the interface can be a little bit daunting to some. This book starts right at the beginning and does not expect you to know anything about the interface beforehand, it walks you through all of the things that you need to know and some of the others you will pickup along the way.

One thing I did find really useful about the book is the fact that it is laid out in almost three simple steps for each part, it first walks through a little bit about what you are about to do and what it will do for the application, it then has a ‘Time for action’ step which guides you through the actual process, and then the part that I like the most is the ‘What just happened?’ part. That last part is something that I have found lacking in some of the other books I have read (not all though) is that they don’t take the time to step back and pause for a second and explain exactly what you just did.

Another thing I wish some of these books did do is to explain the code in such a way that you can then come away and use that code in other real life examples, this is not a criticism of the book and is probably just the way I take things in more than anything.

Packt Publishing have a history of producing some quality books and we actually have one or two about Xcode itself lying around and the quality does not stop with this book, as I read through it I may have found one or two parts that I did not understand right away but after reading on it quickly explained what it was doing and why I was writing it. Often with programming books you will find yourself developing the usual ‘Hello World!’ app and the simple calculator, this does not stop with this book, the first thing you make is a simple calculator app and then a basic currency converter app. Running through these examples actually teaches you a lot about the UI elements along with using the interactions and the maths side of the programming.

I think this book is a great buy for anyone looking to develop any kind of Mac application. I find it does help if you have some basic programming knowledge beforehand but you have to start somewhere and this will make sense to you.

Mac Application Development by Example is currently on sale at £27.99 (down from £44.99) and this includes the print edition and the ebook formats as well (PDF, Amazon and ePub). You can alternatively just get the ebook format which will cost you £14.44 (down from £16.99) and this includes a format for almost every device.

If you are looking for a book on almost any kind of tech venture then PacktPub.com is filled with them. I was looking for a new book on jQuery mobile and they have loads so I am sure they will have what you need.

CSS3 Columns


With the previous version of SyndiFeed I have used the li tag and then used used display:inline-block; to order them in a grid, I then used a plugin called Masonry to order them in a list much like Pinterest does.

With the new version of SyndiFeed (v2.2.2) I have implemented the use of CSS3 columns with the degradation to the old method for IE. As of writing this IE does not support CSS3 columns so you have to use the display:inline-block; method for now when using IE.

Here’s how I have used it, this is a html example page:

<div id="container">
    <li>This is a test</li>
    <li>This is a test</li>
    <li>This is a test</li>
    <li>This is a test</li>
</div>

Then the CSS for the container div:

#container {
    padding: 30px 3% 0 3%;
    -webkit-column-count: 2;
    -webkit-column-gap: 10px;
    -webkit-column-fill: auto;
    -moz-column-count: 2;
    -moz-column-gap: 10px;
    -moz-column-fill: auto;
    column-count: 2;
    column-gap: 15px;
    column-fill: auto;
}

The CSS for the li elements:

#container li {
    position: relative;
    display: inline-block;
    -webkit-column-break-inside: avoid;
    -moz-column-break-inside: avoid;
    column-break-inside: avoid;
    padding: 15px;
    padding-bottom: 5px;
    width: 100%; /*Firefox fix */
}

You can change things like the padding to whatever you need, they are just the values that I used. In the list elements I have found that setting the width to 100% seems to fix an issue that I had when viewing these columns in Firefox.

This is the fix that I include in my IE.css file that is only called when IE is detected:

#container li {
    list-style: none;
    display: -moz-inline-stack;
    display: inline-block;
    vertical-align: top;
    zoom: 1;
    *display: inline;
    width: 48%; /*Used for my grid system*/ 
    height: auto;
    position: relative;
}

Setting the width to this percentage is used because I have a grid system that will change the width of the parent div to #container, If I was to set this to a fixed width it would not change size to work on different devices.

If you are going to implement this, definitely check that it works in all browsers including IE.

My favourite web development apps for Mac


After toiling away for many hours in different web development and design applications I thought it was about time I wrote a post about my favourite. Some of these you may have heard of before and some of them you may not have, one or two I found and they have become a vital part of development for me.

Coda has been around for some time but it’s successor Coda 2 is pretty new on the scene. I never really used Coda before Coda 2 so I cannot not comment on how it compares to the original. Coda 2 is feature packed, it offers all of the standard features you expect to see from any code editing application but also adds a handy few more on top. Some of the CSS auto complete tools are nice such as the colour picker which I sue often, one feature that I do like a lot is if your site in Coda 2 hooked up to the remote server, when you make changes to the files and save it, it gives you a list of files that need to be uploaded to the remote server. That brings me onto another feature, the ability to have multiple sites as projects. Most other applications allow you to create and house different projects but to me they way Coda 2 does it is much better, you can specify both the local and remote server for quicker development. Last but not least is the books built into Coda 2. It has reference libraries for a lot of the major languages such as HTML, CSS, PHP, JQuery, MySQL etc built-in to the application.

Espresso was my main code editor for years and even after the release of Espresso 2 which saw the combination of both CSSEdit and Espresso. Espresso offers a lot of similar functions as Coda 2 does, including the ability to sync and publish your files to your remote server. Espresso offers a large language support including all of the major ones. As CSSEdit is now built-in to Espresso you get some really powerful and yet simple CSS editing tools built right in at your disposal.

If you work with any kind of MySQL database then I think this is a must. Sequel pro allows you to easily manage all of your MySQL databases whether they are on your local machine or on your remote web server. You can easily create and edit tables and all of the information within. Sequel Pro also gives you the ability to run MySQL queries straight from within the app. I personally use this all the time as I work with MySQL databases a lot. The best bit? It’s free! 

For me Mamp is the backbone of all of my local development. Mamp gives you the ability to run an Apache and MySQL server locally, meaning you can run things like PHP and the likes. Most of the time I will develop the site locally on Mamp and then push the files to the remote server when needed, it saves a lot of time by not having to upload the files every time you want to try something.

Ever wondered what colour something was on a web page or on a document? CCM (Classic Color Meter) allows you to see it. The Mac always used to have a good colour meter built-in but in a recent version of OS X it saw away with it. I found CCM on the app store for I think 69p and it is the perfect replacement. I use it mostly for finding out the 8 bit hex values of colours. It is a great addition to the application line up.

Free Ruler is a great tool for doing on-screen measurements. It allows you to easily measure the height and/or width of things in pixels, centimetres and inches. It’s a ruler and it’s free, what else can you say? This tool has come in useful on many occasions.

What are your favourites for Mac, Windows or Linux?

The iPad Mini Rumours


As the time to Apple’s next predicted launch date is ever closing the rumours for both the new iPhone and the possible iPad Mini are ramping up. Parts for the next possible iPhone are being leaked left, right and centre.

The next iPhone is a given, but what about the rumoured iPad Mini. Is iPad Mini a reality or just something everyone wishes was real? Does Apple really need to make a smaller iPad? These are the questions everyone is asking and Apple being Apple, they are not budging anytime soon. To give my take on the question of does Apple need to make a smaller iPad? If I had to make a prediction it would be a yes, not because of choice but more because of lack of. With the storming sales of both the Google Nexus 7 and the Amazon Kindle Fire Apple may be left with no choice but to create a 7″ version of the iPad. Will it be iPad 3 (sorry, the new iPad)? I doubt it, the iPad 3 already costs them enough to make so it is unlikely that it will contain iPad 3 hardware because of the price factor. It is more likely I would say to be iPad 2 hardware in a smaller body with a smaller screen and battery etc.

A clear separation is starting to appear in the tablet market between the smaller tablets and the larger tables. Apple is currently dominating the larger tablet space but some would argue whilst Google may not be winning the tablet war over all, they are definitely a dominant player in the smaller tablet market with their 7″ Nexus 7. I am yet to play with a Nexus 7 so I can’t give any definite reviews but from what I have seen, heard and read it is a very good tablet, for that price point you get a lot.

To round-up I think the iPad Mini will become a reality and is likely to appear sooner than the long-awaited Apple TV, the TV Apple are supposedly working on. I avoid calling it the iTV as everyone else does as there is a channel over here in the United Kingdom called just that. Correct me if I am wrong but I am sure I have read somewhere that the current Apple TV was called the iTV when it was in development?