Code, Code, Revolution!
Are you too having problems updating your iPhone to OS 4.0 beta and iTunes crash while showing the message “Verifying iPhone update with Apple”? Use restore instead!
Also, it is possible to downgrade from iPhone OS 4.0 to 3.1.3 using the restore function and a firmware image for 3.1.3. The baseband however will not be downgraded.
Today Apple presented what will come later this summer, iPhone OS 4.0. Multitasking has been a long awaited and talked about feature that I’m not the only one being excited about, I was not so excited however to find out that it’s not supported on iPhone 3G! The new multitasking feature looks really neat and the tray is integrated nicely with the OS.
Multitasking is implemented using different services. It’s still unclear to me what limitations this has on freedom to develop whatever. Apple demo’ed Pandora’s Internet radio streaming app, iPhone OS 4.0 will allow apps like it to play music in the background, with playback controls available even at the lock screen. They also demo’ed Skype (VoIP), which utilize the VoIP service to continue to receive calls even when it is not the foreground app, LOVELY! A third mechanism is a new direction feature which calculate the device location from cellular towers instead of using battery draining GPS. Awesome for applications that don’t really need GPS accuracy. A fourth and fifth enhancement relates to Apple’s existing push notification service and a new “local notifications” service that allows apps to post reminders or other events without using Apple’s servers.
A sixth feature, task completion, will enable an app to start a job and continue working on it after the user leaves the app. And example given cited an app posting photos to Flicker, which continued working after the user left that app.
The seventh multitasking mechanism is fast app switching, which “allows you to restore the state of an app when you switch out and back,” is the easiest to implement, essentially freezing the progress of an app such as a game while the user handles another task in another app.
Interesting and annoying sidenote. While trying to update my iPhone to iPhone OS 4.0 beta iTunes keep crashing when trying to “Verifying iPhone update with Apple…”. Pesky!
If you want to read about todays iPhone OS 4.0 event, head over to Engadget: http://www.engadget.com/2010/04/08/live-from-apples-iphone-os-4-event/
If you found this post it’s likely you’re interested in finding a cheap (most likely free) CDN. There are numerous posts on the net about using Googles’ App Engine as a free CDN. It’s important to understand what a true CDN is. Definition of a CDN from Wikipedia:
A content delivery network or content distribution network (CDN) is a system of computers containing copies of data, placed at various points in a network so as to maximize bandwidth for access to the data from clients throughout the network. A client accesses a copy of the data near to the client, as opposed to all clients accessing the same central server, so as to avoid bottleneck near that server.
Content types include web objects, downloadable objects (media files, software, documents), applications, real time media streams, and other components of internet delivery (DNS, routes, and database queries).
App Engine does spread files to different geographically located servers however, Google doesn’t provide any information about their content delivery network. Just Ping has a tool that ping/resolve domain names at 41 different locations in the world. Looking at this URL my App Engine domain resolves to 12 different IP addresses over the world! In this sense Google App Engine is a real content delivery network, but that is not the primary focus of the service. How well does App Engine perform and how can you leverage it »
Recently I turned my interest at content delivery networks (CDN) and found a plethora of blog posts both praising and bashing Google App Engine as a CDN. This is the first post in a series of posts I will publish discussing Google App Engine as a CDN.
Google App Engine wasn’t created to be a CDN provider, but it does have CDN capabilities. Some posts argue that App Engine is not a real CDN, others describe how to utilize it as a CDN. Just Ping is a service that will ping/resolve domain names from 41 different locations. Pinging my App Engine results in 12 different IP’s over the world!
Google App Engine was first released as a beta version in 2008. There are a number of posts detailing problems and restrictions in App Engine. Most of them were published around the launch and I started looking into App Engine a couple of weeks ago. Here are some fact corrections:
The facts, the API details and code »
The iPhone (and now iPad) SDK supports reverse geocoding out of the box. Reverse geocoding means you have a coordinate and want to find out where you are located, for instance, the name of the street you are on. Forward geocoding means you know the name of a location and want to find the coordinates. For reasons not totally clear to me there’s no support for forward geocoding, I’ve read somewhere that it has something to do with license deals.
I’ve started working a little with the iPad simulator and with its large display it makes sense presenting information on a map view. Because I haven’t found a good example/API for forward geocoding I’ve decided to publish my own. There are a few players offering geocoding services, Yahoo, CloudeMade, Tele Atlas and of course Google. Yahoo and Google are both free but I’ve decided on using Google.
This sample iPad application contains a search bar and a large UIMapView. Search results are visualized on the map with a placemark and by clicking the placemark the map will zoom to the viewport returned from the geocoding service. When I started working with the geocoding service it was still in version two, this last week Google launched version three. Version two will be depricated of course but I had already written the parser for version two so I’ve included it as well in my sample. Of course the API works for iPhone as well. Because the API contains quite a lot of code you will find the code inside the sample project at the bottom of this page.
If your EPiServer site is running a version older than CMS5 R2 and you (or your clients) are using Internet Explorer 8 you’re having problems creating XForms. There are multiple issues with XForms in versions prior to CMS5 R2 that can be somewhat confusing. A form created with IE6 will work for a visitor using IE8, a form created with IE8 will not work for anyone. If you use IE8 you cannot save your form if it contains radio buttons or checkboxes. There is a posts on EPiServers forum where Vladimir Ljepoja claims a solution for EPiServer CMS 5 R1 SP2 and DropIT has published a blog post on how to fix the problem for EPiServer CMS 5 RC1.
I’ve investigated this problem thoroughly and found the reason why IE8 is causing problems and how you can solve it for all versions of EPiServer. This work is based on investigations in EPiServer 4.61.5.
When I started investigating this problem I obviously started in font-end with javascript debugging. The XForms editor javascript code is in a file named xformedit.js which is located at different places depending on your EPiServer version. For 4.6.1 it’s located in util\javascript. What’s causing the problem on the front-end is this line of code:
Keep reading and find out »
Microsoft Windows SharePoint Services 3.0 includes the same powerful infrastructure for auditing user access to list items, and documents and pages included in MOSS. The only difference in auditing functionality between MOSS and WSS is that the UI for configuring and viewing audit trails has been removed. Microsoft provides information and code on MSDN on how to programmatically activate the audit functionality.
SharePoint offers auditing for the following events:
Fortunately, you don’t need to write the code yourself because some guys has already published an excellent feature on Codeplex that enable the functionality: http://wssaudit.codeplex.com/. The current release from May 5th 2009 is listed as alpha 2, but don’t let the alpha version label fool you, this feature work great. The screen shots below are taken from my environment.
Enabling gzip compression is an easy way to make your site load faster, but how do you go about doing so for your EPiServer site and why should you?
Gzip compression will reduce the size of a text file (such as html markup, css, js and files) up to some 90%. If your user is on a slow connection, reducing the size of data does make a difference. The number of users on “slow” connections are actually growing by every sold smart phone and mobile broadband connection. Here’s a real world example:
| Content | Uncompressed | Compressed |
|---|---|---|
| Markup | 40kb | 40kb |
| CSS | 104kb | 18kb |
| JS | 368kb | 119kb |
| Toal | 512 kb | 177 kb |
Gzip will typically compress a text file around 65-90%. In this example this example we reach an average compression of about 70% for the static content. A web page usually contains more CSS and JavaScript content than the size of the specific pages’ markup. Although, this is only true for the initial page the user visit, for subsequent page views the visitors’ browser has already cached the static content making page markup the biggest part of text content.
If you’re on a broadband connection, meaning 2mbit+ and not including wireless broadband, downloading the page (ignoring images) uncompressed will take less than 2 seconds. If you’re on a slower connection however, say, 0.2-0.5 mbit, it will take about 7-10 seconds. With compression enabled a mobile user with not optimal coverage (which seems more common than good coverage with Telia) you can save some 5 seconds which is significant if you’re that user. There’s another aspect to compression aswell. Say you run a large site with 100.000 unique visitors per day, by reducing at least the first page view by 330kb that reduce your daily traffic with a whopping 3,9Gb of data!
Compressing the markup will reduce the size for each request but because the markup is generally not very big the download time improvement will not be as significant. Compressing dynamic content will also use up more server resources for each page view. IIS will store/cache compressed static files on disk at first request so the impact of compressing static files is minimal.
Here’s an old but still very informative blog post by Yahoo on front end optimization.
With this blog I try to provide useful tips and solutions for programming .NET, Objective-C and more. My name is Björn Sållarp, and I love writing code.
It's now available on AppStore. It's free and open source. Read more about the app here: Swedish / English