Posts Tagged ‘web development’

Web App for iPhone and Android

Sunday, November 15th, 2009

Some screenshots of an web-based iPhone app I’ve been working on. I downloaded the Android SDK recently. The screenshots here are from the Android emulator. It’s awesome that Android and iPhone web apps are completely cross-platform. Obviously there are some advantages to using a native API, like Cocoa Touch, but for companies looking for a mobile presence a web app is the natural choice. I feel that a mobile version of a site is really not enough. The best approach is to mimic the behavior of native apps as much as possible. That means building AJAX user interfaces and controls meant for fingers rather than cursors.

Anyway, some screenshots.

list view

iphone list view

android list view

android list view

iphone list with sortable columns

iphone list with sortable columns

iphone company details

iphone company details

android company details

android company details

As you can see, there are only some styling difference between the two platforms. The behavior is essentially identical in each.

results from search

iphone results from search

contact details

iphone contact details

You may have noticed that the browser chrome and location bar is not visible in these shots. That effect is easy to achieve and contributes to the look and feel of a native app.

Obviously this app allows for data entry and search as well.

カークサミュエルソン.com?

Thursday, October 29th, 2009

Internet addresses set for change

’bout time. All hail unicode.

UPDATE: This is wrong. It’s long been possible to have domain names like the one in the subject (which is my name in Japanese Katakana, BTW). The technical method that allows this (a ToASCII conversion algorithm) has been around for several years. I had the impression that this was becoming an official ICANN implementation at the root name servers. Not so. It’s been official for a long time. But only for certain top level domains. The only thing that is changing is now non-Roman alpabet TLDs (top level domains like com, net, edu, org, jp and so on may be created. They were already possible in theory using the ToASCII method but ICANN had never approved any for actual use.

In short, this is a pretty boring story but the details of IDN implementation are pretty interesting. As usual, the Wikipedia page provides the best overview.

So, カークサミュエルソン.com is NOT possible but カークサミュエルソン.jp most certainly is. Not only that, it’s still available.

AJAX Debugging

Thursday, September 17th, 2009

HTTP Inspector for Komodo IDE
HTTP Headers. Allows you to break on each request/response and modify the header before submitting. Very cool. Comes with Komodo IDE which is great. It’s not cheap but probably worth it. It has a Javascript debugger that works with Firefox as well.

Wireshark: Go deep.
Network Protocol Analyzer. Runs in X11. Looks like X11. Geek quotient – hardcore. The point here is you can see traffic. You need that to analyze ajax requests.

YUI Library: Logger
A component of Yahoo’s YUI javascript libraries. Useful if you’re using YUI, otherwise, not so much. I’m using YUI for some things right now but will probably use other tools for debugging anyway.

firephp_large.png
FirePHP – Firebug Extension for AJAX Development
Use this with Firefox and the Firebug extension. Log messages to the Firebug console from your PHP scripts. It works on the server response side of AJAX rather than the client Javascript side.
The best explanation of what FirePHP is and does was written by the guy who created it. Christoph Dorn – Integrating FirePHP for Ajax Development

There’s also Aptana but I’m taking a break from the whole Eclipse platform.

Database transactions

Thursday, September 17th, 2009

An interesting post on the Doctrine blog. Plus the word of the day. Yes, it’s a real word.

I want to sensibilize you for the fact that there are a lot of factors in PHP application performance and that you can very easily lose the performance that you hoped to gain by not using framework X or Z or building your own (“Not Invented Here”-syndrome) by several orders of magnitude through rather trivial errors or misconceptions.

This is also the run-on sentence of the day. But nevermind, I believe his point is that although you might think a complicated database abstraction layer like Doctrine would make things slower than simple selects, updates, deletes you’d be wrong. Using a framework developed by guys who, like the author, have thought through and benchmarked all this stuff is a big advantage. You only have to weigh that against the pain of the initial learning curve. Or maybe it’s like cycling – you’ll get faster but it will always hurt.

The Bad Parts

Thursday, September 10th, 2009

JavaScript: The Good Parts | O’Reilly Media

From the introduction:

“If you want to learn more about the bad parts and how to use them badly, consult any other JavaScript book.”

OK, then.

CoC

Saturday, September 5th, 2009

Speaking of symfony, I’ve found it’s “convention-over-configuration” approach a little maddening. There’s zillions of directories. Many of them have the same names but are along different paths. This one tripped me up today.

Configuration Principles in symfony

For many symfony configuration files, the same setting can be defined at different levels:

  • The default configuration is located in the framework
  • The global configuration for the project (in config/)
  • The local configuration for an application (in apps/APP/config/)
  • The local configuration restricted to a module (in apps/APP/modules/MODULE/config/)

Yes, three levels of config folders on top of the default (which is hidden deep inside of /lib where it belongs). That’s a good thing in that it allows for a lot of modularity and module-specific behaviors. But it’s a bad thing when you edit the file at the wrong place in the hierarchy as I did today. SVN helped me bail out of that particular fuck up.

I like the CoC approach – not being a trained programmer I do things intuitively and defining conventions is a very intuitive approach. Just takes a little pattern recognition to see what’s going on. Humans are good at that. The flip side is that convention over configuration is a my way or the highway proposition. If you don’t like it you may want to keep hacking your own code or maybe use Zend Framework which is not convention-driven.

So, I’m hanging in there with symfony after two days. It’ll probably take a month before I either jump all in or give it all up. We’ll see which.

Doctrine ORM

Saturday, September 5th, 2009

Doctrine is an Object Relational Mapper for PHP. I’m new to this so correct me if I’m wrong – an ORM allows you to interact with databases on a purely objective level. I finished Day 5 of the 24 day symfony tutorial today and had my first exposure to this. Symfony is object-oriented through and through. Tying it to an ORM keeps everything in the realm of objects. That’s attractive but it also means, you know, a high level of abstraction. So it can be a little mind bending. But, I’m game. I’m tired of writing stuff that is just driven by constant data retrieval and iteration through records. It may be nice to have things more encapsulated and just sort of… always on.