Firefox 3 beta 1!


After the early alpha development version of Firefox, Gran Paradiso (it was December 2006 if I’m not wrong), today Mozilla announced the first Firefox beta version.
Here you can find the full post which introduced the new Beta.

What’s new?

Well, looking at the “What’s new” page, it seems that there are tons of changes, fixes, improvements. I’m reporting here just a couple of things from that list:

  • Gecko 1.9 Web rendering platform, which has been under development for the past 27 months and includes nearly 2 million lines of code changes  (!!)
  • One click site info: Click the site favicon in the location bar to see who owns the site. Identity verification is prominently displayed and easier to understand. In later versions, Extended Validation SSL certificate information will be displayed
  • Malware Protection: malware protection warns users when they arrive at sites which are known to install viruses, spyware, trojans or other malware
  • New Web Forgery Protection page: the content of pages suspected as web forgeries is no longer shown
  • New SSL error pages
  • Add-ons and Plugin version check: Firefox now automatically checks add-on and plugin versions and will disable older, insecure versions
  • Secure add-on updates: to improve add-on update security, add-ons that provide updates in an insecure manner will be disabled (I hope this wont break half of the current extenions!).
  • Anti-virus integration
  • New Download Manager
  • Resumable downloading
  • Full page zoom
  • Improved Platform for Developers (mmhhh.. this it’s interesting!)

Download Firefox 3 beta 1 now!

Flex Canvas bug when it is zoomed in and “horizontalCenter = 0”

Recently I came across a Flex bug when working on canvas. If you have a canvas with an object centered inside ( horizontal or vertical, it’s the same ) and scale this object the result is that the canvas will clip left and top its contents!
To understand what I mean see this example and try to scale the image:

[kml_flashembed publishmethod=”static” fversion=”10.0.22″ movie=”http://blog.sephiroth.it/wp-content/uploads/2007/11/canvas_bug.swf” width=”250″ height=”290″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

And this is the code used:


< ?xml version="1.0" encoding="utf-8"?>

1









As you can see once the image is scaled and it’s bigger that its parent, you wont be able to see it top left corner anymore. This is an annoying bug for me!

Later I found that someone opened a ticket in the Flex bug management system here: http://bugs.adobe.com/jira/browse/SDK-13009
A couple of days ago I received a notification that the bug has been closed… and incredible they closed it as NOT A BUG!
I can understand that finding the bug in a file with 5000 and more lines of code it’s not easy and can cause horrible headache, but the reason they gave it’s nosense! It’s completely a different thing that the reason of this bug.

Moreover what’s the connection between flash and html?

Flex have been designed since the 1.0 version as a framework for building RIA (Rich Internet Applications).
A RIA have to behave as a desktop application that runs using the web browser. One of the advantages of Flex agains Ajax is that the first technology provide to the user a behaviour which is much more similar to desktop applications that the one provided using HTML+Javascript. And so my questions is: why should Flex behave like HTML when one of its most important features is to be different from HTML ?
Flex behaves like other SDKs used to develop desktop apps in many situations which are much less important than the one hilighted above. So why close this bug (yes. it is a bug) providing as explanation that it is correct because it behaves like HTML ?

(my)SQL-Front is back!

After more than one year I received an email saying that finally mysql-front is back and no it’s SQL-Front.
MySQL-Front was one of the first mysql clients I ever installed and I was very disappointed when it closed..

Here I quote the Nils entry about the comeback and the new name:

“Hi,
16 months ago, many users of this program were surprised and disappointed to see the project discontinued rather suddenly. I am sorry that I was unable to find a way of continuing the project at that time, so that the users had to suffer from its disappeance. This discontinuation was the result of a senseless fight – from which, at the end of the day, noone had an advantage.

So the question is: Why do people fight when they don’t have an advantage from it? There are multiple answers to this question, but often jealousy of other people or fear about one’s own future are the reasons for it. In my humble opinion, if someone fights against you, you should consider how to help them instead of getting involved in senseless fighting. Therefore, I decided not to fight with them last year, but to withdraw.

In the past weeks, I was able to find a solution…” (read full article)

P.S. Great, my old license key is still valid!

Flex Frameworks

Luke Bayes and Ali Mills of PatternPark made a presentation for the Silicon Valley Flex Users Group (SilvaFUG) of 9 different frameworks and toolkits for creating Flex applications: Cairngorm, PureMVC, ARP, MVCS, Flest, Model-Glue: Flex, ServerBox Foundry, Guasax, and Slide.

Watch the presentation: http://adobechats.adobe.acrobat.com/p12266504/
See the slides: http://www.asserttrue.com/files/ApplicationFrameworks/index.html

Their Conclusion?
PureMVC by Cliff Hall beats out the alternatives
“.

  • Composition over inheritence
  • Liberal use of Interfaces
  • Indirection is used but not overwhelming
  • Instance members hide singleton references from application code
  • MXML views can be extremely thin
  • Benefits of Cairngorm, with few of the disadvantages.

I must admit I never used PureMVC, the only framework I’m currently using is Cairngorm, even if I bookmarked the pureMVC page long time ago promising myself to watch it more in deep. Now it’s time to keep the promise.

AMFPHP and mbstring

These days I was working on a flex 2/amfphp project and I discovered a very strange issue accidentally.
With PHP 5.2.4 installed both on local and remote server, the local amfphp works and the remote gave errors.

Connecting to the service browser I was receiving the error “Channel.Ping.Failed” error and investingating a bit more in the fault message I discovered that the source error was:

The class {Amf3Broker} could not be found under the class path {/var/htdocs/amfphp/services/amfphp/Amf3Broker.php}

and the Amf3Broker php class does not exists anywhere in amfphp! But in the Actions.php file on line 78 I found this:
if(!$handled)
{
$uriclasspath = "amfphp/Amf3Broker.php";
$classpath = $baseClassPath . "amfphp/Amf3Broker.php";
$classname = "Amf3Broker";
$methodname = "handleMessage";
}

That’s the strange thing because the $handled variable should be true ’cause usually the first request sent by flash is a $messageType = “flex.messaging.messages.CommandMessage”. So I continued in my investigation logging all the messages that php was receiving.
So at the end I discovered that amfphp didn’t deserialize the amf data correctly! All the packet were corrupted (that’s why $messageType wasn’t handled), all the strings were not correctly parsed.
Finally I discovered the reason. It’s because mbstring.
The only difference between the remote server and the local server is the php.ini setting about mbstring overload and the others mbstring settings.
The remote server has mbstring.func_overload = 2, that means all the strings functions are affected and that’s why the amfphp methods were returing corrupted data.
In fact I just changed this method into AMFDeserializer.php:
function readBuffer($len)
{
$data = substr($this->raw_data,$this->current_byte,$len);
$this->current_byte += $len;
return $data;
}

into:
function readBuffer($len)
{
$data = "";
for($i = 0; $i < $len; $i++) { $data .= $this->raw_data{$i + $this->current_byte};
}
$this->current_byte += $len;
return $data;
}

and the original error disappeared! Obviously I got other errors later, that’s because there are many other string functions in amfphp.. but at least I found the cause.

In fact, removing the mbstring.func_overload in the php.ini everything worked again!

Adobe Image Foundation

Everyone already knows about the new Flash player 10 (Astro) features that adobe presented at MAX, and above all the new image processing language (Hydra) that it will support in the future.

Today I finally found a couple of hours to play with AIF, even if no more because of my limitations knowledge of image processing algorithms 🙂
In fact I was able to broke different times my video card driver (with a panic black screen)!

Anyway after all I did just a couple of experiments trying to convert a couple of scripts I already did using the old flash 9 bitmapdata filters..


kernel Snn
{
parameter float size
< minValue: 0.0; maxValue: 8.0; defaultValue: 2.0; >;
parameter int step
< minValue: 1; maxValue: 10; defaultValue: 1; >;
void evaluatePixel(in image4 src, out pixel4 result)
{
pixel2 coord = outCoord();
pixel4 valueC = sampleLinear(src, coord);
float theStep = float(step);
float2 point = float2(0.0,0.0);
float x = 0.0;
float y = 0.0;
float count = 0.0;
pixel4 sum = pixel4(0.0, 0.0, 0.0, 0.0);
pixel4 valueA;
pixel4 valueB;
for( x = - size; x < size; x+= theStep)
{
for(y = -size; y < size; y+= theStep)
{
valueA = sampleLinear(src, pixel2(coord.x + x, coord.y + y));
valueB = sampleLinear(src, pixel2(coord.x - x, coord.y - y));
if ( any(lessThan(abs(valueC - valueA), abs(valueC - valueB))))
{
sum = sum + valueA;
} else {
sum = sum + valueB;
}
count = count + 1.0;
}
}
result = sum/count;
}
}


kernel Websafe
{
parameter float value
< minValue: 0.0; maxValue: 500.0; defaultValue: 10.0; >;
void evaluatePixel( in image4 src, out pixel4 result)
{
result = sampleLinear(src, outCoord());
result = (floor((result*255.0)/51.0) * 51.0)/255.0;
}
}

As you can see it’s nothing new, they’re just my first steps in this new language.. don’t spend much time on these example, look at the coolest examples shown in the Hydra gallery instead!

Microsoft to release .NET libraries source code

Well, it seems that Microsoft will release the .NET libraries (not all, but it seems the most relevants ) source code with the next release of Visual Studio 2008 late this year.

This will be useful indeed while debugging in VS, but also it would be very interesting to look into the source code to view how they did it, expecially the Windows Form related part.. (..but what about Silverlight? :))

Read more here: http://weblogs.asp.net/scottgu/…framework-libraries.aspx