Feb 25 2010

been working on a Mac ……

……. for a few years  no so have gotten very used to the different keystrokes. Now i have two pieces of work which are no remote windows servers. One i connect through Logmein and the other with RDC but i am going barmy getting keystroke combinations screwed up on both the Mac and the Windows servers.

Feb 24 2010

if the command line on UNIX was a girl ……

…… i would marry her!

Feb 20 2010

Mobile device development frameworks.

With the increase in the use of more versatile mobile platforms especially the iPhone (plus the hype) there are as one would expect a number of developers creating “Frameworks” to speed up the development of applications for such devices.
Webkit. One thing to remember is that the iXxx devices and Android and Palm Pre all use webkit and or variant. So often and iXxx development will work across all mobile devises because of this.
As my main interest is in the iphone I am going to do a quick roundup here of some of the frameworks I have come across and or used.
php/aps/python/ruby – some of the frameworks that are html/css/javascript based can of course have the html substituted for any of the web scripting languages.
One of the nice things about developing on this platform is that as you are guaranteed to get Webkit based browsers then an increasing number of css3  tags become available and well as PHP5 elements.
First I have written a quick overview of each  of the frameworks, then there is a list with the frameworks own blurb and various links. I plan to revisit various packages as i use them and get more information.
QuickConnect – All singing all dancing. Will create for a range of mobile devices but because of that is more complex, i.e. more moving parts, than a more simple html/css/javascript aimed framework targeting the iPhone. However well documented and has an Addison Wesley book covering major parts of it and if your brief is to dela with multiple devices you will need to look at this.
iWebKit – Aimed at iPhone/iPod Touch/iPad and is in the html/css/javascript mould. Looks very powerful and well maintained.
WebApp.Net – Aimed at iPhone/iPod Touch/iPad and is in the html/css/javascript mould.
iUi – Probably one of if not the first framework to emerge. Aimed at iPhone/iPod Touch/iPad and is in the html/css/javascript mould.  Code is good and easy to use. I have built one project delivered to a paying customer in this framework.  currency convertor
jQtouch – is a subset of the jQuery JavaScript library and from that point of view has a lot going for it. Aimed at iPhone/iPod Touch/iPad and is in the html/css/javascript mould. Looks very powerful and well maintained. Also is featured in an O’Reilly book.
PhoneGap – cover iPhone, Android, Palm, Symbian and Blackberry  - looks like a mix of different technologies, i will need to dig into it a bit more.
MonoTouch C# and .NET based applications and libraries that run on Apple’s iPhone and Apple’s iPod Touch devices, while taking advantage of the iPhone APIs.
jQuery iPhone UI – Uses jQuery to build html/css/javascript based web sites.
Dashcode – A toolkit from Apple for building html/css/javascript based widget and other mac tools. Will now also build web sites for Safari and iXxx.
Xcode – Apple grand daddy of development uses objective-c and builds applications as opposed to web sites so really don’t belong here but of course allow the building of all thing iXxx.
Pastrykit – An internal toolkit used by Apple to make iPxxx based web sites. Not released to the public but obviously an Elephant in the room as it were.

QuickConnect

QuickConnect is a powerful, modular, simple to use, application development library available for many languages and platforms. QuickConnect is currently available for: iPhone, Android & Mac JavaScript apps, Erlang/Yaws, and PHP.

QuickConnectiPhone is LGPL so you can use it the way you want. It has a custom Dashcode project that includes the needed files. It is highly modular. It will even let you compile your JavaScript, HTML, and CSS into an installable application if you want.

It is also documaneyted in an Adison Wesley Book

  • By: Lee S. Barney
  • Publisher: Addison-Wesley Professional
  • Pub. Date: June 22, 2009
  • Print ISBN-10: 0-321-60416-4
  • Print ISBN-13: 978-0-321-60416-3
  • Web ISBN-10: 0-321-60454-7
  • Web ISBN-13: 978-0-321-60454-5

http://sourceforge.net/projects/quickconnect/

For more information you could look at

iWebKit

iWebKit is a file package designed to help you create your own iPhone, iPod Touch and iPad compatible website or webapp. The kit is accessible to anyone even people without any html knowledge and is simple to understand thanks to the included tutorials. In a couple of minutes you will have created a full and profesional looking website. iWebKit is a great tool because it is very easy to use, extremely fast, compatible & extendable. It is simple html that anyone can edit contrary to some other very complicated solutions based on ajax. Simplicity is the key!

http://iwebkit.net

Here is a demo:

WebApp.Net

WebApp.Net is a light weight, powerful javascript framework taking advantage of AJAX technology. It provides a full set of ready to use components to help you develop, quickly and easily, advanced mobile web applications.

It has the following advantages:

  • Under active development
  • Active user community
  • Has an open license, free to distribute as long as you include the copyright/disclaimer

http://webapp-net.com/

iUi

iUI is a framework consisting of a JavaScript library, CSS, and images for developing iPhone webapps.

Initialy written by Joe Hewitt but now maintained in google code.

Here is Joes intro

“First and foremost, iUI is not meant as a “JavaScript library”. Its goal is simply to turn ordinary standards-based HTML into a polished, usable interface that meets the high standards set by Apple’s own native iPhone apps. As much as possible, iUI maps common HTML idioms to iPhone interface conventions. For example, the <ul> and <li> tags are used to create hierarchical side-scrolling navigation. Ordinary <a> links load with a sliding animation while keeping you on the original page instead of loading an entirely new one. A simple set of CSS classes can be used to designate things like modal dialogs, preference panels, and on/off switches.

Let me re-emphasize that all of this is done without the need for you to write any JavaScript. It is meant to feel as though HTML was the iPhone’s own UI language.”

http://www.joehewitt.com/blog/introducing_iui.php

jQtouch

A jQuery plugin for mobile web development on the iPhone,

iPod Touch, and other forward-thinking devices.

jQTouch is a jQuery plugin with native animations, automatic navigation, and themes for mobile WebKit browsers like iPhone, G1, and Pre.

  • Easy to install. Get up and running in a few minutes.
  • Entirely customizable with selector options
  • Theme support, including default Apple and jQTouch custom themes
  • Callback functions throughout, including swipe and orientation change detection
  • Page history management and CSS3 page transitions, including 3d flip
  • Easily allow apps to run in fullscreen mode with custom icons and startup screens
  • The power of jQuery to build AJAX applications
  • New demos: Clock and Todo

Oreilly book

  • Building iPhone Apps with HTML, CSS, and JavaScript, 1st Edition
  • By: Jonathan Stark
  • Publisher: O’Reilly Media, Inc.
  • Pub. Date: January 28, 2010   Most Recent Edition
  • Print ISBN-13: 978-0-596-80578-4
  • Pages in Print Edition: 192

http://www.jqtouch.com/

PhoneGap

What is PhoneGap?

PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript.

If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android, Palm, Symbian and Blackberry SDKs, PhoneGap is for you.

http://phonegap.com/

MonoTouch

MonoTouch allows developers to create C# and .NET based applications that run on Apple’s iPhone and Apple’s iPod Touch devices, while taking advantage of the iPhone APIs and reusing both code and libraries that have been built for .NET, as well as existing skills. The current release includes the new APIs in the new iPhoneOS as well as tool support and MonoDevelop support for developing iPad applications.

http://monotouch.net/

http://code.google.com/p/jquery-iphone-ui/downloads/list

jQuery iPhone UI

This is JavaScript library for prototype iPhone interface on web pages

http://code.google.com/p/jquery-iphone-ui/

Dashcode

Dashcode is everything you need to create great Dashboard widgets. Built from the ground up with widgets in mind, Dashcode makes it easy for even a novice programmer to create a widget, give it a professional look, and package it up so you and your friends can enjoy your creation

http://developer.apple.com/tools/dashcode/

Xcode

Xcode is Apple’s premiere development environment for Mac OS X. In addition to being packaged on the DVD with every copy of Mac OS X, the latest Xcode developer release is always available for free to ADC members and includes all the tools you need to create, debug, and optimize your applications. At the heart of the Xcode tools package is the Xcode IDE, a graphical workbench that tightly integrates a professional text editor, a robust build system, a debugger, and the powerful GCC compiler capable of targeting Intel and PowerPC regardless of host platform. Xcode is both easy to use, and yet powerful enough to build the largest Mac OS X applications. The complete Mac OS X developer tools chain is distributed as part of Xcode; these tools include Interface Builder, Instruments, Dashcode, the WebObjects framework, and the complete reference documentation, to name just a few.

http://developer.apple.com/tools/xcode/reviewxcode.html

Pastrykit

An internal toolkit used by Apple to make iPxxx based web sites. Not released to the public but obviously an Elephant in the room as it were. Currently appears to be a set of JavaScript libraries. I have added links to discussions here.

http://daringfireball.net/2009/12/pastrykit

http://davidbcalhoun.com/2009/pastrykit-digging-into-an-apple-pie

http://www.nxfx.com/blog/iphone-development/apples-pastry-kit-iphone-javascript-toolkit/

Feb 20 2010

Thinking of implementing a multi-lingual web site?

On a technical front not a lot, you can use a framework like Zend or Kohana or Rails etc. which usually have the ability to replace the content with tags and then fill the tag with the language of choice at run time. The different languages reside in appropriately named directories and can be triggered by the browser language tag or another mechanism. If you ate not using a framework with this facility then study one to se how it is done. After that and in no particular order.

  • Why multilingual? you really need a compelling reason to do it as the workload you are taking on is large and complex and onerous. I know all the reasons about how and why people like sites in their native language but for a multi lingual site’s investment in money you need to be making a proper return on the investment and not just doing it for the sake of it.
  • Localising, L10N or internationalisation i18n, is not just about language. It is about about cultural differences. Anglo Saxons like cool restrained san-serif type sites. Latin and Latin American cultures like more vibrant colours and cursive type faces. And so on. So you need to have a mechanism that will change the css for each language as well (well to be truly efective you do)
  • Who is doing the translation? Remember it is an idiomatic translation you need, Google Translate API will not cut it and you need a native speaker to translate from and to the target. So for example if you are using FIGS (French Italian etc) from an English original. YOu need a translator for English to French, English to German, English to Italian, and English to Spanish (see the costs mounting?). A good bureau will provide all this for you and manage the process though.
  • Proof reading. Can you speak 5 languages well enough to check that above work is correct?
  • Maintenance. Again assuming English is the base language and there is a new page or a page rewrite or even a typo you need to go through the above process and update the site so you need a good workflow and process control system to ensure that the changes and updates work effectively. The ongoing maintenance can be crippling in time and cost, work it out before you start.
  • Beware of advice form people who localise programmes/applications It is not remotely the same thing.
  • Many solutions actually use separate web sites for each localisation rather than the all in one approach. This can be counterintuitive when we want to put it all into one “technical” package. However you can by separating the sites easily cope with different styles, and character sets and ltr text etc. You can stagger updates and manage the workflow more effectively, adding new site is far far simpler and it allow you to use the different URL’s tha may be required and allows you to optimise each site for SEO
Feb 05 2010

iPhone web frameworks & Pastrykit

Development of web based sites targeted at the iPhone/iPod Touch has increased allowing for faster to market paths and avoiding the esoteric niceties of the app store submission process. I suppose the trick in this development is to mimic the UI of the native applications to give the user a proper “no surprises” experience.

There have been a number of third party kits come onto the nmarket based aroun JavaScript, CSS and HTML.

QuickConnectiPhone, iWebkit, WebApp.net, iUi, jQtouch, Phonegap, monotouch as well as Apples Dashcode.

Well also from Apple and coming quietly onto the scene with Pastrykit. To see this in action navigate to iPhone User Guide on your iPhone/Pod or in Safari but change the user agent in the developer bar to iPhone.

There is no official release from apple so all that is in the wild at the moment is a lot of speculation and some reverse engineered assets of the CSS and JavaScript so i suppose we will need to wait and see if it gets released officially or just stays in the Apple internal ecosystem.

More information and most of the assets for pastrykit here.

From Wayne Pan.

Discussion, questions on stackoverflow.

Feb 05 2010

Fizz Buzz test

At a job interview the other day i came across the fizz buzz test in the wild for the first time. Simple little thing but seems to floor people.

In case you have not seen it you output the numbers 1 to 100 but replace those divisible by 3 with “Fizz” and those divisible by 5 with “Buzz”.

The real trick is less in the programming than in an easy way to determine the div by 3 & 5 and here the trick is to remember your modulo arithmetic.

So simply put i = 1 to 100

if i%3 == 0 print Fizz

if i%5 == 0 print Buzz

else print i

Jan 11 2010

Reversing MD5

Here is an interesting one from the not very leading edge. When you add a password to a site it is often encrypted with and MD5 hash this mean that a word like ‘leonie’ is converted into a string that looks like this ‘af58e0965b64b67028e1f40c69317bf1′.

Now he nice thing about this conversion is that it is only one way. i.e. from the hash ‘af58e0965b64b67028e1f40c69317bf1′ you cannot reverse the algorithm that created it

and get back to ‘leonie’. However some helpful people on the web have published the MD5’s of almost every word there is and put them on web sites, so by googleing for ‘af58e0965b64b67028e1f40c69317bf1′ you get ‘leonie’ and are able to crack the the security that this should give you.

There is no way round this, although i fully expect an American Senator or the EU to attempt to legislate against it, other than to make sure the string you use is unlikely to happen in real life and therefore less vulnerable to this type of dictionary attack.

So instead of ‘leonie’ ‘l30n13′ wher 3 = e and 1 – i and 0 = o helps to remember the password but make the attack less easy and even better would be ‘L30n13@’

Don’t say i didn’t tell you!

Jan 01 2010

…. and add one …….

…… on the First.

Dec 31 2009

Well …….

……. got to do a post on the last day of the year. Happy new year everyone.

Dec 26 2009

iPhone Development Frameworks

As might be expected a slew of frameworks are appearing that allow iPhone and other mobile platform development without necessarily needing to learn the very hardcore elements of programming these devices, or that allow cross platform development or that enables creating the application as a web based version that mimics the actions of the native application.

I shall be doing some more in depth looks at these apps over a series of posts but initially this post is to pull a number of the more mainstream  applications together.

The information about the frameworks is provided from the sites themselves so may me taken as is.

QuickConnect

Web Site

QuickConnect is a powerful, modular, simple to use, application development library available for many languages and platforms. QuickConnect is currently available for: iPhone, Android & Mac JavaScript apps, Erlang/Yaws, and PHP.

IWebkit

Web Site

Iwebkit is the revolutionnairy kit used to create high quality iPhone and iPod touch websites in a few minutes and is based on an LGPL license. In the first 4 months of it’s existance the pack has greatly evolved from a basic idea to a project that has reached worldwide fame!

PhoneGap

Web Site

PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript. If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android and Blackberry SDKs, PhoneGap is for you.

WebApp.Net

Web Site

WebApp.Net is a light weight, powerful javascript framework taking advantage of AJAX technology. It provides a full set of ready to use components to help you develop, quickly and easily, advanced mobile web applications.

Universal iPhone UI Kit

Web Site

If you are looking a CSS framework to develop iPhone web applications you may check this project.

The UiUIKit (Universal iPhone UI Kit) it’s a collection of HTML examples of what can be done with CSS3 and Safari’s Webkit. With this framework you can:

Fast prototype any web app with ease. Make you’re own app using diferent iPhone original interfaces.

The framework is based on 1 stylesheet and several HTML examples, also, it contains original artwork so you can edit them in Adobe Photoshop CS and adapt it to your projects. With this framework you can build:

jQTouch

Web Site
A jQuery plugin for mobile web development, optimized for the iPhone and iPod touch
Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Alibi3col theme by Themocracy