Archive for August, 2008

A look at the hands of time.

August 29th, 2008

Those who can control time are truely bless or half human half god. Time cant be caught or captured ...

But then calendar came and god saw that it was right .. Lets take a jump back into the world of Google and talk about 3 API`s we could make a mess of uuh mashup :) .

Prototype Framework

The prototype framework is a really handy dandy light weight framework that allows you to do all sorts of things with a short syntax. It also extends the DOM to give you extra functions to work with while getting objects from the DOM. It is really easy to extend objects that you have on your HTML page. This is a typical prototype routine to extend for example a div.

JAVASCRIPT:
  1. Object.extend ($('somediv'), {
  2. function onclick ()
  3. {
  4. alert ('caught you clicking this div !!');
  5. }
  6. });

The $() is a really easy to use syntax but what ever you do, Avoid using this in loops because the $() method will grab the object from the dom and extend it with extra functions. So this will mean if you are using the $() syntax you will end up with low memory winch could in a bad situation crash your clients browser.

Google Calendar Services

Google calendar API`s are out for some time now they where one of the fist API`s released by Google who are based on there gdata system. Google offers there users a calendar management site at calendar.google.com im am a user of that website along with millions of others.Now with the Google callendar api it will mean that i will be abled to retreive my data from my own public stated agenda and user it any other website.

The API that i am going to use in this mashup will be the javascript version of this api  (there are others like java / .net / Php / Python / C). Examples of how to use the calendar API`s are available on the google code pages. The calendar API requires you to signup for a unique API key that can be used (just as with Google maps) to identify your host, to get that API key go here and follow the instructions to embed the link to the javascript API. If you ever have used an gdata based API from google you will find the API pretty straight forward and easy to use. Even learning the basics of the gdata api is a peace of cake. Im not going to much detail of how to code this but it will be entertain able to see how it will work together with the Google maps API.

Google Maps.

Well i dont think maps needs an introduction because every one has seen / heared used or experienced a Google map at a point in time. A few years already Google hosts this service at maps.google.com and since some time they offer the API to setup your own maps on your website. The documentation for the maps API can be found here, the first thing you need to do when deploying a map is getting a API winch you can use in your code to identify your website. You can get your API from this location and follow the instructions for embedding a link to the javascript API.

What will the mashup do ?

The mashup will be a utility that gives a change to look at the appointments that you have open and it will show the location of your appointment marked on a map with a standard marker. The source of the mashup can be found at this location. Because html in a Wordpress layout can be crappy i decided that the whole application will be Ajax`ed into this post (this will take a sec or 2 to load up).

Once again here is the source

IE8 Beta 2 Bugs — Review of a developer

August 28th, 2008

IE8 Beta 2 the youngest child of the internet explorer a series. Poor gal not even 24 hours young and Phpvrouwen starts to whine about finding some bugs. Well ... I just did i am going to share 2 bugs i found today with my readers.

Compatibility mode and cookies

Once switch that helps you to switch between standard IE8 modes and IE8 quirks modes. You might find out when using this functionality that all of a sudden cookies do not update well or not at all. This problem left me with my Wordpress stats hanging on 1 visit for today and that could never be the case. Once i switched off quirks modes the site worked perfectly again.

Crashing in and out of compatibility mode

i am happy to see the new recovery mode and also the tab recovery mode, meaning if the rendering engine fails at some point it will automatically restore the website for you by opening a new tab with that same website.  But the crash recovery mode is not what it should be in beta 2 because sometimes it will totally mess up the appearance of the website both in compatibility mode or standard strict modes.

IE8 seems to crash at least once in 1.5 hours when working with AJAX a lot (Im a developer so i found this out). This can be really annoying when IE tells you it has to restart the tab. For now i will just fix phpvrouwen (the reason for putting it in compatibility modes) and hope that these bugs will be fixed soon.

Arn`t you happy with anything Johnny ?

Ow yes ! i am developers on top i am saying this because if the new and improved set of debugging tools that Microsoft has put in this version of IE8. They look much better and also they allow you better access to the css side of debugging (at least more as beta 1).

An other thing i was exited about is the option you can view all of your open tabs in  a quick thumb page. Opera users do know this screen as the quick dial screen for some time now but i was pleased to see it in IE as well.

Much much quicker !!, IE8beta2 is so much quicker then any IE8 i have seen so far. I can remember the days i got my first touch on IE7 and reckoned that i have to wait almost 10 seconds thats might be why a load of users jumped right over to Firefox 3.0 when i came out. The speed makes me wanna work with IE again. They did not lie about there speed upgrade on javascript and the interface its lovely to witness this.

And gosh ... i caught my self promoting IE (oh my .. they did that to a Firefox user) Heads up for the fellow IE users and for Microsoft please fix these bugs soon and go for acid3 (winch i hope i will see support for in IE8Final) !!

Contribute here.

First of alll thank your for reading this story that makes me deeply happy :) . I dare you to post your experiance with IE8 rights now. I did find these bugs because i am developing the main javascript framework for my company so i used it a lot today. So common and share what you think and what you think about where IE8 is going to.

Chears,

Johnny

IE8 Beta2 has been released

August 28th, 2008

Microsoft internet explorer beta 2 is out

Following beta 1 Microsoft has now released beta 2 of their IE8.  It was announced that the second beta would be for the users this time and not for the developers. On Monday 28 July of 2008 Andy Zeigler the Program Manager of the Internet Explorer released some information about new IE8 features on the IE Blog. Here is a little summary of the new key features

  • Loosely-Coupled IE
  • Automatic Crash Recovery
  • Windows Error Reporting
Loosely-Coupled IE

One of our most significant investments is in a feature called Loosely-Coupled IE (“LCIE”), which is an architectural attribute that helps isolate different parts of the browser from each other, most notably, the frames from the tabs. LCIE is the foundation that we have built a few of our features on including Automatic Crash Recovery of which I expand on below.

If you haven’t already read about what we started in Beta 1, I would encourage you to read my first post which covers how we isolated the frame window, which roughly corresponds to the “chrome”, from the tabs by putting them in their own separate processes so that a tab can now crash without bringing down the rest of your browser.  Visually, this separation would look like the following, with the frame area highlighted and the tab area dimmed:

Building on Beta 1, we have continued to develop LCIE in IE8 Beta 2 to further improve reliability and performance.

For Beta 2, we added the following changes:

Frame Process Merging

To help improve startup performance, we have  reduced the number of processes that we start. Instead of firing up two processes every time you launch the browser (one for the frame and one for your tabs), we now only fire up one frame process the first time you launch IE. Subsequent launches will only start a new tab process or make a new tab in an existing tab process.

For users that are accustomed to browsing websites in multiple “sessions”, for example if you want to log in to multiple email sites simultaneously, you can specify the “-nomerge” command line option to disable this feature.

More tab processes

It turns out that the vast majority of all IE sessions contain three or fewer tabs. Accordingly, in Beta 2 we try to give users three efficient tab processes.  This is contingent on the user’s computer capabilities, but the more capable a computer is, the more processes we will use, up to a point. Adding more processes gives users much better isolation in the event of a failure. If each tab is in its own process, websites are completely isolated from each other.

Virtual tabs

We have also added the internal capability to “hot swap” the process from underneath a tab. Previously, Protected Mode worked on a per-process basis. For example, say you add a website to your trusted sites in IE7. If that site links to another site that is not in your trusted sites, it will cause you to switch browser windows when you click the link.

We improved this in IE8 Beta 1 with LCIE when we split the frame from the tabs. With the split we can create a new tab in the same window and switch you to that tab as opposed to being “punted” to a new window.

Virtual tabs lets you navigate across Protected Mode in the same tab since we just switch the process under the tab to the correct integrity level. This is really just “UI-sugar” – virtual tabs do not impact security or protected mode in any way, other than to make it more convenient to transition between protected mode on/off.

LCIE's capability of isolating different parts of the browser coupled with more tab processes and virtual tabs will improve the performance and overall reliability of Internet Explorer.

Automatic Crash Recovery

In the event of a crash, Automatic Crash Recovery is designed to get you back to browsing as quickly as possible. It uses LCIE’s tab isolation to help localize the failure to your tab. If you experienced a crash in Beta 1, you may have noticed this bubble:

This is the “tab recovery experience” – the failure has been confined to your tab. Your browser never goes away and we get you back to the site pretty quickly.

What’s happening behind the scenes is that we are keeping track of an array of information about your tab. In Beta 1, the following data about each tab was stored:

  • Current URI
  • The travel log (your back/forward history)
  • Tab order
  • Which tab was active

When you crash, we tear down the old tab process, create a new tab process and recover the stored data back into the tab. For many website this works well; however, there are other websites, such as sites with web forms, or sites that you need to login to, that we didn’t recover successfully.

In Beta 2, we improved this further by adding:

Session cookies

Session cookies are often used for authenticating the user to a website. Session cookies are temporary cookies that only persist for the lifetime of your browsing session. When you login to a website, they usually give you a session cookie that contains a unique token that identifies you while you are logged in. As you navigate around the website, IE sends your session cookie to the site, and the site can examine this token and determine that you are authenticated. Unlike persistent cookies, they are not written and retained on your hard disk.

In IE8 Beta 2, we recover your session cookies too  and  still do not write them to disk! We store copies of them in the frame process. When your tab crashes, we just copy them back from the frame into the tab, and the user is automatically logged back into the site they were using (i.e. webmail, blog sites, social sites).

Note that session cookie recover only takes place for tab crashes.  If the whole browser crashes, the session cookies are lost, however we do expect that the overwhelming majority of crashes to be isolated to the tabs, as most crashes are caused by malfunctioning add-ons, which are now isolated to a tab process.

Form data

We can now recover your form data. If you typed information, such as an email, blog post, comments, into an HTML form, we can now recover that information.

Leveraging LCIE’s tab isolation allows Automatic Crash Recovery to quickly restore the user to their browsing session without having to log back in to their sites or re-enter new data into forms.  Combined, LCIE and Automatic Crash Recovery provide a really innovative and graceful way to recovery from crashes.

Windows Error Reporting (aka Watson)

In the event of a crash or a hang, you may have received a choice to “send information to Microsoft”. You may be wondering what we do with this information.

The short answer is that we look at it every day. We take each report seriously because this data is extremely important to us. Not only can we determine what is causing issues, in aggregate, but we can determine the specific issues that are affecting the most people, and actually fix them.

If IE crashes or hangs and you choose to send information, Windows Error Reporting does some work to collect information about the state of the program when it crashes or hangs. We can see what add-ons are loaded and what IE was doing when it crashed. To the coders in the audience, it sends a call stack along with a memory dump. If you’re writing an application for Windows, or an Internet Explorer add-on, you can get Watson data about your own application and use it to improve quality.

Windows Error Reporting is smart enough to collect similar problems into “buckets”, which are usually lots of instances of the same underlying problem. If the problem lies in IE code and it is encountered frequently, we fix it. In IE8, we recognize that the most important failures that we can fix are ones that are out there happening on users’ machines. We have even committed to fixing the top 50% of all Watson hits in IE (including issues that may have carried over from IE7).

Microsoft goes to great lengths to protect privacy when customers submit error reports.  When an error occurs, a report is generated with the minimum amount of data needed to check for a solution.  This report does not contain any personal information and customers are asked before any information is sent back to Microsoft.  Microsoft also does not track error reports back to an individual — unless that individual chooses to track an error report to find out if a solution has been found for the error.  Even then, Microsoft developers working with the data cannot identify the customer and will request further information only if additional contact is needed to solve the problem.

Get Ready for Beta 2

LCIE, Automatic Crash Recovery and  a good deal of bug fixing has helped make IE8 Beta 2 a browser you can depend on. When IE8 Beta 2 is released, I encourage you to check it out!

Andy Zeigler
Program Manager
Reliability and Privacy

One more nice feature

An other nice feature that Microsoft has put effort in building is forcing to browser to pop up a file save dialog when accessing a download.Microsoft calls this feature "MINE-Handling: Force save". This is what they shared about it on their blog.

MIME-Handling: Force Save

Lastly, for web applications that need to serve untrusted HTML files, we have introduced a mechanism to help prevent the untrusted content from compromising your site’s security. When the new X-Download-Options header is present with the value noopen, the user is prevented from opening a file download directly; instead, they must first save the file locally. When the locally saved file is later opened, it no longer executes in the security context of your site, helping to prevent script injection.

HTTP/1.1 200 OK
Content-Length: 238
Content-Type: text/html
X-Download-Options: noopen

Content-Disposition: attachment; filename=untrustedfile.html

Save File Dialog

Taken together, these new Web Application Defenses enable the construction of much more secure web applications.

I round up by asking if you have any experiance with IE8beta share it here and we will talk about this new browser.

Resources:

IE Blog - IE8 Security Part V: Comprehensive Protection
IE Blog - IE8 and Reliability

Codename Arrow

August 27th, 2008

To provide the readers and the community with closer look on the technology that i blog about i decided to start a new opensource project. The project will be code named "Arrow". Arrow will used in at least wordpress (to start with) and extend any blog into a community. It will use Gears, Flash, Javascript,Php and some SQL needed to save user information. Im still at pre Alpha stage of making the specifications for the project.

If you are a good application designer you can join the group any developer is welcome to join and together we can come to a good name. Web designers are also welcome to provide the team with a logo and or some themes or designs.

Plans of things that i intend to include in this project

  • Use of the Geo codes with Google gears
  • Gdata contacts
  • Flash sounds
  • Gears offline tools
  • Users will be abled to commincate with each other
  • Users will be abled to send in stories
  • Avantars for users
  • User pages

So what are you waiting for mail me at info[at]phpvrouwen.nl and signup for the project or bing forward some plans. You can also post here in the comments.. Im looking forward to this project ow and if you have a great name dont keep it to your self :) .