Pages

December 13, 2010

OT: YouTube "Easter Egg"

Hi guys,

I know I haven't written in a long time, but if you're familiar with this blog you know that it happens to me from time to time.
This one is about a funny little Easter egg I bumped into on YouTube. You might know it, I didn't and suspects that many don't.
I appears that when you're waiting for a movie to load, you can play Snake with the loading animation.
Simply click on the arrow key when the movie is loading and there you go - Snake.

Sure makes your waiting more pleasant.

Cheers.

October 11, 2010

Why Android Defeats iOS

Well, it’s a fact now: Android have a bigger market share in mobile OS's than Apples iOS.
Surprising? Really?
This was only a matter of time and a great business strategy by Google, that brought this new OS to the front of our smart phones and defeated Apple in the game they invented.
Why, You might ask.
As I see it, the reason is plain simple. Both OS's offer the same features, give or take. This means that the end users don't really mind what OS they have on their mobile device from the two as far as that is concerned, so now other parameters are coming into view:

First one is the hardware, where Apple offers their iPhone G4 and iPad and  Google offers Nexus one… and HTC's evo... Vodafone 845, Motorola… and SmartQ and more…
As for now, we have much more devices that support the Android OS then iOS. Google could not care less about their own Nexus One, and had no trouble stopping it's manufacture. Their goal was to simply distribute as many Android instances as possible. Mission accomplished, wouldn't you agree? I mean, it’s really nice that Steve Jobs is so excited about the numbers of iPad sales, but Google can calmly reply that each day over 100,000 Androids are being activated, and going…
But that's not the whole deal, cause you know that there are still Apple fanatics who truly love their devices, so you have people from both sides sticking to what they know. What, then, is the differentiator?

The differentiator lies with the developers for the OS's. Simple logic tells that for an OS to be attractive for people it should support rich content. Rich in content means that it should support many running environments as possible, having an open SDK and the most important - creating an easy and cheap way for developing and distributing application for it.
Again, Google comes with an open SDK, supporting the strong Java platform and of course Flash/AIR. Just download the SDK and start developing your application. If I want to develop a Flex application or an AIR application for Android I really don't have to do much.
Apple, on the other hand, seems to have set a goal to make the developing process for iOS as expensive and annoying as possible. If I want to use the Adobe Packager for iOS I firstly need to get an Apple ID by filling a form that truly takes considerable time and doesn't appear to help in any way but having Apple accumulate data on all of their developers. Once you have this ID you have to purchase a developer certificate ($100 yearly). No, guys, it does not matter if you only wish to POC the application on iOS or develop a free non-commercial apps, you gotta pay up.
Well… this was quit enough for me. I think it's a sheer Chutzpah by Apple to take money from people who wish to develop application for their OS and by that make it more atractive to end users. Why would I choose to pay money when other alternatives are available for free?

So what you have now is hundreds of developers who know that Android is widely distributed and gaining more and more users by the day. These developers also know that they can develop applications for Android for free and if the developers know these 2 simple facts, they will start developing for Android.
This is the exact scenario that took place with Apple's Mac's back in 1984 when they restricted some application vendors from coding apps for their Macs. if you restrict developers from developing for your OS, or make it expensive and annoying for them, They will simply choose the easier-faster way, the same way big software companies chose to develop for IBM and MS OS back then. The rest is history as we all know.

As a person that part of his job definition is exploring UI technologies and researching for the best technological solutions, I feel that Apple is holding me down and making it very hard for me to use their technology. If in order to create simple POC I need to register as an Apple User, purchase a developer certificate, upload my apps to iTunes just for the sake of downloading them to my mobile device… come on… I have enough to do with my time, I don't need that too.

If Steve Jobs will not wake up soon, he will be surprised to find out that his market share is slipping between his fingers. Steve didn't allow Flash Packager because he wanted it. He had no choice and the same is here. If Android is open and free, developers will go there. More developers mean more applications. More applications mean more end users. Simple math.

Only time will tell.

September 10, 2010

OT: מייק פורטנוי עוזב את דרים ת'יאטר

לא, לא, תקראו את זה שוב ותנו לזה איזו דקה לחלחל.
מי שלא מכיר את Dream Theater שלא יטרח לקרא את הפוסט הזה, ויסתפק בגושי הצואה שמגיש לו הרדיו האיזורי. בהחלט אחת הלהקות המדהימות שיש כיום, והאדם העומד בגאון מאחוריה, מניע ומזיז הוא לא אחר מהמתופף עטור הפרסים שלה - מייק פורטנוי.
אתמול הברנש הודיע כי הוא לא ממשיך עם הלהקה יותר, נוכח חילוקי דעות לגבי "הפסקה" הכרחית לטעמו. למען האמת, אני מסכים איתו. אני חושב שהלהקה התחילה לחזור על עצמה וצריכה איזה צינון קל בכדי לחזור עם חומרים מעניינים יותר, אבל שאר הלהקה לא הסכימה והחליטה להמשיך בלעדיו. אתם יכולים להקביל את זה לבחור ובחורה שיוצאים ולפתע המילה "הפסקה" עולה. וכמו שחלקנו יודעים - הפסקות יש רק בבית-ספר.
מה אני אגיד לכם... זה מבאס את התחת. בייחוד בימים כאלה, בהם המוסיקה הפופלארית היא מנגינה שמעליות מתביישות להשמיע לנוסעיהן. שלא נדבר על המטאל המתחדש שנשמע כמו גראנג' מעורבל עם שתן. דרים ת'יאטר היא אחת הלהקות שעדיין נתנו לדיסטורשיין שלהן לצאת עם כל האשכים בחוץ. חתימות הזמן מאתגרות, משקלים מוזרים, מלודיות מעוותות, וכמובן מעל להכל - תיפוף של אחד המתופפים הטובים והמשפיעים בעולם, מר פורטנוי.
אז עכשיו הוא הולך להמשיך עם כל מיני פרוייקטים צדידיים מגוכחים ודרים יעשו עוד תקליט בלעדיו - ושום דבר מהמוזכר לעיל לא יהיה הדבר האמיתי. דרים זה פורטנוי וההפך. אין מה לעשות. מי יודע? יש מצב שהתקליט החדש שלהם יהיה הנפצה חדשה, כי פורטנוי באמת כבר נשחק עד עצם, אבל... ואללא, קשה לי להאמין שמשהו טוב ייצא מזה.
גם אתם מרגישים שהמוסיקה ברחבי העולם מתחרבנת לה?

September 09, 2010

Steve Jobs has surrendered

Apple has just announced that they (actually "he") will relax the restrictions on the development tool for creating content for iOS. Read about it here.
Ok, let me translate what is written above: Steve Jobs has agreed to let Flash CS5 export flash content to an iPhone apps.
No, not good enough. Let me try again: Steve Jobs has surrendered.
Steve Jobs has surrendered not Just to Adobe but to all the vendors that can and should produce content for iPhone.
Yep… it's time to climb down that high tree, Apple, and realize the reality everyone's in. I must take my hat off in respect for Adobe in their fair and positive campaign ("we love Apple") , and hand that same old hat to Mr. Jobs to chew on. Please don't waste our time again, mate.

September 04, 2010

IntelliJ, Flex SDK 4.5 and FCSH

Hi guys,
Here is something you might find interesting if your working with FCSH, or use it to compile within IntelliJ, but first - a disclaimer: I didn't go to the bottom of this problem and I don't know what exactly causes it. I just know how to work around it in IntelliJ, so… sorry 'bout that.
I recently updated my Flex SDK version to version 4.5. as part of it, I defined the SDK on my copy of IntelliJ IDEA but after doing so it stopped compiling the sources. Actually it jammed IntelliJ completely.
So… what I did is to check if any of the configurations were changed… nop, that's not it. Second thing was to check out the IntelliJ flex compiler settings.
As you might know, IntelliJ uses the FCSH of adobe, which is a shell compiler, for compilation. I simply disabled the usage of FCSH and used the default MXMLC (I mean, why not?) and it all works well now.
Here's how you do it:
Go to IntelliJ preferences, type "flex" on the search box and you will see the Flex Compiler tab. Just change it from FCSH to parallel compilation. That's all.
Hope this help you,
Have a great week.

Cheers.

August 27, 2010

Providing GWT with the browser's locale at runtime

I think it's my first post on GWT (Google Web Kit) so bear with me, I come in peace :).
I came across a problem where I've created a localization support for a project but wanted my generated code to obtain the browser's locale (note: not the system locale) and act accordingly on runtime.
Now GWT supplies 2 formal way on setting the locale for the web page; one is with a query string on the URL request and the other is adding the metadata on the host page and set the GWT property.
Both option are not satisfying since the a simple HTML cannot access the browser locales (security issues as far as I've looked), so the web pages cannot obtain the locale. You can use GWT to fetch the locale and reload the page with the right locale concatenated to the URL, but that will cause the page to flicker… nhaaaa, not good enough.
The solution is rather simple - having the server analyze the http request and get the browser's locale from it. You don't want you page to flicker, but rather generate the metadata on the host page which holds the locale information for GWT.
Comes JSP.
Since the project runs on J2EE application server, I was able to create a simple JSP page, to be used as the host page for GWT, and have a code inside that will generate the metadata for the locale derived from the request.
Here is the code
<HTML>
<HEAD>
<meta name="gwt:property" content="locale=<%= request.getLocale()%>">
</HEAD>

<BODY>
<%
out.println("Languge:");
out.println(request.getLocale());
%>
</BODY>
</HTML>

Hope this help you guys, I spent some time searching for an elegant solution on the web but couldn't find anything specific, so there you go.
Cheers!

August 19, 2010

OT: ומחר... עוד הכבדה בחום

מזמן לא השתלחתי, ובטח שלא בשפת אימי, אבל אני חושש שהגיעה העת לתקתק מספר מילים עבור העונה המיותרת הזו, הנקראת קיץ וכמובן לסיפטום המטונף שלה הנקרא חום.
פעם מזמן, שעוד היינו זבי חוטם, מאד אהבנו את העונה המיוזעת הזו. כמובן שאז, ואני מדבר על שנות השמונים, הקיץ לא היה טאבון אנושי אלא יותר עונה חמימה עם ימי שרב בודדים. אהבנו גם את הרעיון של חופש בן-חודשיים בו רובצים כמו רד-נקס מול נילס הולגרסון, עם קרטיב לימון בשבעים אגורות. ומעבר לכך, היותי ירושלמי העניקה לי קיצים הרבה יותר נעימים, ללא לחות. מה יותר טוב?
והנה עברו השנים ואני מוצא עצמי באיזור גוש דן, שלדעת רבים עדיין נחשב כבית השחי של אלוהים, הלא היא המטרופולין המבאישה, בירת הגו'קים הנצחית וטמטמת גיל האחרי צבא - תל-אביב.
הקיץ כאן, רבותי, הוא לא עונה. הוא נמשך 12 חודשים שלפרקים יורד גשם-ערפיח, שזה סוג חדש של גשם שבא ללכלך את הרחובות ולגרום למאותגרי נשימה שכמותי לחרחר את שנתם הטרופה. הקיץ כאן הוא מכה שאלוהים חסך מפרעה פן תאבד תרבות הספינקס. ובמדור גיהנום שבע הזה, ישנם חודשיים שלמים בהם המפזר-חום של כדוה"א נשאר דולק על MAX, כשהכנפיים שלו מכוונות לשפלה שלנו. יולי-אוגוסט הם חודשים שצריך להוציא מחוץ לחוק.
מעבר לכך שבני הנוער החשופים למשעי והטיפשים להפליא פוקקים כל ספסל רחוב, החום והלחות פשוט מעבירים אותך על דעתך. כך אני מוצא עצמי מסתובב בדירתי, שפיתחה סוג חדש יכולת המורכבת מספיחת חום במשך היום ויציקתו אל פנים הבית במהלך הליל, כולי לח כמו חתיכת ג'ילדה של מוסכניק תאב בצע, עצבני כמו שרק דמויות מאנגה יכולות להביע ולא יודע איך לפתור את הכבשן בו אני חי.
אי אפשר להתרווח על כורסה, כי גם היא לחה. ואם אני אקנה ארטיק הוא יהפוך לשלולית כימית אחרי הביס הראשון. נילס מזמן לא מככב, וכל שנותר לי הוא לראות את יונית לוי מביטה בי במבט שאפילו עגל מתקשה להעלות, מדברת על מסמך הרמטכ"ל, שבנינו... מעניין לי את המקש לשמאלו של "ס".
הו אז מגיח לו מהטלוויזיה אדון מר דני דוייטש, חזאי ופיגורת-סלב, ומספר לי במתק שפתיים שמחר תחול עוד הכבדה בחום, מה שמביא אותי לחשוב, בחמסין הנוראי הזה, על מקצוע חזאות האויר, שהוא ללא ספק המקצוע הכי מיותר בעולם. מקריא מה שכל ילד בן שנתיים יכול לגגל. כן? הכבדה בחום? אחרי מחקרים הגיעו למסקנה שהקיץ הזה הוא הנוראי ביותר מאז ומעולם? לא צריך מחקרים חתיכת אמבצילים! תראו את האנשים שמתאדים בחוץ כאילו הופצצו בחמישה טונות של נאפלם. אתם כל כך חכמים שאפילו לגרף הטמפרטורות יש זקפה.
שהחזאים יעשו לי טובה, ויסתמו את הפה שלהם עד שגל החום הזה יפסק! אם כרגע אין ירידה משמעותית בחום, אני לא רוצה לשמוע או לראות, לא את דני דויטש, לא את דני רופ ולא את המתבייצת הסדרתית - שרון וקסלר. מחר הכבדה בחום בחצוצרה הימנית שלך!
אתה מדליק מזגן, והמכונה המסכנה הזו כבר לא יכולה לספק לך אויר הרים צלול כיין, וכל הזמן רצה לך בראש המחשבה שחברת החשמל המסכנה שלנו בוכה על זה שהיא לא מוסגלת לספק את הצרכים של המדינה הזעירה הזו. אולי אם הם היו מפסיקים לשרוף פחם כמו קטר במהפכה התעשייתית, ולא מאירים כל גשר-כביש מצ'וקמק כאילו היה חזיון אור-קולי במצדה, היה לנו פחות אפקט חממה ויותר חשמל, נכון דירקטור וולט?!
ועל כל אלה בא המרענן הרישמי של הקיץ - צביקה הדר ונבחרת "כוכב נולד", שמנסה ללא הצלחה להעביר שיר אחד בלי לזייף, וכל זאת עם מודולציה צפויה כמוות לקראת סופו, בעיבודו הניצחי של האדם הבנאלי ביותר בסצנת המוסיקה הישראלית - עמוס בן-דוד.
ומי מאושרים, מי? הג'וקים. וודאי שהרי בשבילם זו יריית הפתיחה של חגיגות המעוף והנחיתה בדירות. הריצה הבהולה שלהם אל מקומות המסתור מהם יגיחו באישון לילה בכדי לטמא את המטבח שלכם. כל תחלואות הארץ, הרמשים והשקצים פורחים בלהט המחורבן הזה. אתה פותח את דלת הפח השכונתי, ומגלה שהפרעת לרייב פארטי מטורף של חמש-מאות תיקנים, בעוד שגל צחנת פחים מבושלים הודף אותך לרצפה.

די!
כמה אפשר?!
לא נותר אלא לצוטט את הצב החכם מכל אדם, הלא הוא בץ מ"פרפר נחמד", ששר בדכאון:

"קיץ, קיץ תיגמר
חורף חורף בוא מהר
חם מלמטה, חם מלמעלה
חם ביום וחם בלילה"

עד גל החום הבא,
סלאמת.

July 24, 2010

Why Browsers?

I've read it somewhere that if Karl Benz was asking people at the time what would they want in terms of mobility, they would probably say "a faster horses". Why horses? Because this is what the knew at the time.
Faster horses can be "created" if you somehow breed them and mess with their genes, but what Benz did was to create a different thing altogether - the car.
The reason I'm telling you this geeky story is because I feel we're kinda behaving like those people back in those days. "In what way?" you might ask. Let me elaborate.
Big companies are asking us what do we want in terms of Internet browsing. What would enhance our experience, what will make it richer. They are asking us all they can and we answer according to what we know and understand - we want a better, faster, more interactive… browser.
Lets add to the pot the whole HTML5 saga. You've probably asked yourself why is HTML5 appears to be the future of web technologies, right? No? ok, anyway, the main reason for people to believe that HTML5 will rule the future of the web is that it will make our browsing experience better, faster and more interactive and it will be a standard for all the… browsers.
Again, browsers.
Here is a thought - given that the browsers are the standard for web browsing today, do they all interpret JS the same way? CSS in the same way? HTML? The answer is no. so what kind of a standard is it?
The W3C is setting up the standard for the web but can't really enforce their standard to be fully respected with no differences among the browsers on the market. Cause eventually it all comes to whether your browser supports it or not. That's all.
But if we're putting HTML to the side for a sec, let me ask you this - don't you feel a bit caught in the past when writing an HTML tag? No really… I mean, Body tag again? Header? This must be extra painful for the Flashers/Flexers among you guys, don't you feel like going ten years back in time? Do you feel that writing ASP,JSP is writing in biblical glyphs?  Well, I do.
So we're coming to the question that hangs on the top of this post. Why browsers? Is that the way we should be consuming our web content in 2010? I may be naive but I don't think so.
I think that HTML on all it's variations had it's time and it is high time we moved into something that fits our web needs better.
I don't have the answers to what can be the "car" for us horse riders, but I feel that our horses don't do the job anymore. We need more speed, more interaction, more abilities, more.
HTML5 is a faster horse, but still - a horse. It is not the answer. As long as it relies on that same old engine, our web experiences will never go past and meet our needs, until the web Benz will come and create something that will blow our minds out into thinking - how the hell we didn't think of it until now?! I will even go as far as saying that having us depend on HTML is kind of having humanity depend on Oil. We all know that there are many far better alternatives out there but somehow, we chose (do we?) not to use them. I'm thinking to myself, maybe it's the same as in with the Oil, where global corporation prevent us from using a better solutions for their own reasons and interests. Luckily, the web is not as rigid as the global energy consortium, right?... I sure hope so.
Something to think about...

Cheers.

June 08, 2010

Is this the time for a security flop, Adobe?

Adobe just recently published that it found a critical (as Adobe claims) security issue regarding Flash Player and Acrobat reader and what can be a better time for this new findings, just after Steve Jobs claimed that Adobe's Flash is not secured enough in that long "mail" he wrote the world.
I mean… come on guys, I can't even find the right metaphor to describe how pathetic this whole matter makes you look like, Adobe. No really, if someone had asked me I would say the Jobs has people inside the Flash Player team, cause it sure feels like there couldn't be a more horrific timing than this.
I think that the people responsible for this security breach should be held responsible for making Adobe appear to the world as an amateur software company. Steve Jobs can now easily say "ha! Told ya!" and the man would be right.
I write these words with pain, guys. I love Adobe but I don't think the love will save the day here.
I know that this breach has workarounds, but let me tell you this Adobe - telling your customers to download a Beta version of the Player is unacceptable. Work day and night, eat, dream, breathe the solution for this matter as fast as humanly can, cause guys… you can't afford to shake the boat, now that the whole RIA world is examining you with a fine lens microscope.

Simply can't.

May 19, 2010

OT: English it is

As you might have noticed, the recent post were given in English, and English alone.
Once upon a time I wrote in Hebrew (my native language) only, and then I decided to translate the posts and have them in Hebrew and  English, cause it might be of assistance to English readers as well, but bringing myself to write both in Hebrew and in English on the same post (cause I can't quite rely on Google's translate) was getting harder and harder. I had this wonderful idea to write about, but when thinking about having to double-write it made me go: "oh well, maybe later".
It came to the point where I've written about my lingual pondering but I've recently decided to go for English.
I love writing in Hebrew and I think I do express myself better in my mother's tongue, but since this is a technical blog, I truly believe it will achieve it's goal better if written in English.
Hope this goes well with you guys.
Have a good one.

Cheers.

May 14, 2010

Adobe's loves freedom of choice. do you?

You've probably read it already, but if you didn't then please do.
This letter from Adobe came as a response to Steve Jobs letter about Flash and Adobe (if you haven't read it, then look it up yourselves :)).
I've decided to put it on my blog to get the idea through. Adobe's has always been a creator of tools for enabling one's inspirations. It's like getting a box of Lego where you can build whatever comes to mind using the building blocks handed to you. I don't think that Adobe thought for a second that Flash is going to replace HTML, I don't think they even directed it in that way. Even as you read, Adobe's evangelists are still giving presentations and demos on Mac machines…
Apple might be a great force in technology, but when you take this power and use it to forcibly lead users like cattle towards your technology, your simply cutting the branch you're sitting on, not to mention disrespect your customers - that means, you guys...
Think about it.

May 08, 2010

Oh boy - JavaScript and Flash really ARE on the same thread

Yeah, I know… this is something trivial that everyone knows, right? but I had to check it out.
The question I was presented with was: If I call a JavaScript function from Flash, will Flash UI keep on rendering or wait for a "response" from JS to continue?
The answer, as sad as it may be, is YES, it will stop rendering.

Here, check out the code below. It's a little test I did, where I have a button to launch an Alert from JS. I've also added a progress bar with it's indeterminate property set to "true" in order to see clearly if it stops, and there I have it. Once the Alert is up, the progress bar stops from rendering.
Hmmm… I don't like this. I don't like this at all.

Here is the Flex Application code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">

<mx:Script>
<![CDATA[
private function onClick(event:MouseEvent):void {
if (ExternalInterface.available) {
ExternalInterface.call("showAlert");
}
}
]]>
</mx:Script>

<mx:Button
label="Show JS Alert"
click="onClick(event)"/>

<mx:ProgressBar indeterminate="true"/>
</mx:Application>

And here is what I've added to the HTML template:
function showAlert() {
alert("Flash UI stops from rendering!");
}

May 05, 2010

Those who don't know their history are bound to repeat it

It's no secret - I don't like what Steve Jobs is doing with this whole Flash on Apple mobiles, and to be honest, I don't like the guy at all. He always appeared to me so full of himself.  As a matter of a fact, I don't like anyone who impose their power upon others just because they can.  Jobs, for one who stood up against Microsoft when it used it's power to set standards in the computing market, is now appearing to do exactly the same.
As the articles pile up about Apple and Adobe, I found myself wondering into the past of Apple, and more precisely into the past of Mr. Jobs. I found the following YouTube short documentary, that I urge you to watch. But if you don't have the time to spare check out below to see what I see and gather from it:



1977 (1:50 in the movie) - The apple II computers are a huge success for Apple. 2 million units sold (back then it's an amazing figure) and it became the standard for computers around the world. Kind of like the iPhone, right? Yeah… I would say.

1981 (2:35 in the movie) - IBM enters the market, and present a competition for Apple and Jobs. Kind of like Google Android and Nexus One?

Later Jobs is putting his trust in Graphic User Interface. A new and innovative feature that was sure to change the way people are interacting with computers - Kind of like the touch screen interface, no?

(3:35 in the movie)  - Job's picks Pepsi's  executive John Scully to lead the Apple business.

1984 (4:00 in the movie) - Apple Macintosh is released. Affordable, but more expensive than the IBM's. customers loved the interface but the availability of software on the new platform was a critical issue. Many software companies preferred writing for IBM's - Kind of like preventing Adobe's Flash on iPhone and iPad and by that preventing a lot of applications from these platforms users, I would say. Could people prefer Google's and other vendors that do support Flash?

1985 (4:40 in the movie)  - Apples sales decline, due to lack of software availability on it. Hmm… interesting.

(4:58 in the movie)  - The market started to realize that maybe the Apple computer were more attractive than the IBM's, but the IBM computers support the things the market wanted to do - Need I say more?

(5:35 in the movie)  - Jobs blames John Scully for Apple failure. Sells all his shares and leaves the company - Sounds a bit childish to me, but hey… that's the guy.

Can history repeat itself? I will let you decide...
Cheers.

April 30, 2010

Loading classes to main application domain from a child SWF

Hi guys,
As part of loading applications in the form of SWF using SWFLoader as a child applications we sometimes encounter a scenario where we need to load classes to the main application domain , in order for all the SWFs to use the same class definitions between them. The thing is, we don't our "shell" application to know all the classes of it's potential children, so we thrive on getting the child application to load their class to the main application domain.
Possible? Well, yeah :).
Here is a code snippet to show you how. The idea is to have a SWF that has the classes declared on it, and load it from the child application, when defining the application domain of the loader context to be the main application domain. How do we get the reference to the main application domain? Easily:

var loader:SWFLoader new SWFLoader();
var context:LoaderContext = new LoaderContext();
context.applicationDomain = systemManager.topLevelSystemManager.loaderInfo.applicationDomain;
loader.loaderContext = context;
loader.source = "your-classes-swf-path";

The code is pretty basic to understad (but let me know if something isn't clear).
Enjoy your weekend.

April 25, 2010

Flash & Flex Israel Convention on Apr 25, 2010

מזה כחודש ימים המייל שלי לא מפסיק להקיא מיילים מאחד, שמו אלמוג קורן, לגבי כנס פלקס שנרשמתי אליו משכבר. בתחילה זה היה "לא יודעים איפה זה יהיה", אח"כ זה היה "תאשרו שוב"... ואז "תדפיסו את הכרטיס", ו"לא, רגע, עכשיו תדפיסו את הכרטיס", ו"מה זה השם הזה Flashmattic, צריכים את השם המלא", ומי ומה ומו... ויא אללא, בואו נרגע, שהרי זה כנס פלקסיסטים לא ועידת וונזה, ימח שמם הגויים.
בסופו של דבר, נסגר שהכנס יתקיים במתחם Yes Planet של קניון אילון, משעה 10:00 עד שעה 16:30.
10:00 בובקר זה עוד סביר בהחלט, אבל פקקים של ר"ג זה משהו שצריך לשבת עליו מדיטציה במנזר שאולין. אין ספק שלעבור לאט לאט דרך רחוב המוסכים התוחם את הקניון גרם לי ללטף קלות את הגה מכוניתי, ולרעוד נוכח הפלאשבקים מטיפולי הרכב של העבר.
לאחר שעברתי בידוק שלא היה מבייש את משמר הכנסת (ראבק, זה לפטופ, לפטופ!) הייתי די אבוד באשר לאן פניי, אבל חוש הנווט החד של עבדכם הנאמן גרם לי לזהות את החנון הראשון נושא הלפטופ ולעקוב אחריו, היישר אל מתחם הקולנוע.
מתחם קולנוע, ובייחוד זה בו נערך הכנס, הוא ללא ספק אחד המקומות המועדפים לערוך בהם כנסים. האווירה החגיגית משהו עם כל מודעות הסרטים (ופוסטרים של נותני החסות, והיו כאלו, ולא מעט), הצבעים החזקים, השולחנות למינגלינג והשאר, פשוט מעלים את איכות האירוע בכמה רמות. הארגון נראה מקצועי לחלוטין בכל הקשור לעמדות שתייה קלה, קפה ותופינים.
ניגשתי לקבלה ומיד קיבלתי את חבילת ה"עט, מדבקה ופנקס" עם תג שנשא את השם Flashmattic Flashmattic מחברת... Flashmattic. וזאת אחרי המיילים ששלחתי עם שמי המלא. גם כן, בירוקרטיה.
המקום החל מתמלא ונראה היה שיש בסביבות ה- 100 פלוס איש, שזה מספר נאה לכל הדעות. אחרי מעט קפה, ודיבורים קלים, כוונו אל עבר אולם הקולנוע להשקת האירוע.
אגב, באולמי קולנוע אין WiFi שזו מגבלה שממש לא מתאימה לאירועים מהסוג הזה. אנשים רוצים לכתוב לבלוג ולהמשיך לקבל מיילים (שהרי זו שעת עבודה לכל דבר), אנשים (משועממים) רוצים לצייץ בטוויטר שלהם לגבי טעם הקפה או הנפיחה האחרונה שלהם ולא יכולים. זה פשוט לא לעניין... לאחר שהתישבנו לנו בניחותא, האירוע יכול היה להתחיל:
תחילה עלה אלמוג קורן, שהוא מנהל הקבוצה של Flash & Flex Israel (מתחרים של פלאשו? לא... קנאת סופרים תרבה חכמה, ומעבר לכך, אין לפלאשו מתחרים, אבל יש לה שני לינקים :)). אלמוג הציג את האג'נדה של היום וכמובן את הדוברים: מיכאי קורלן (עליו כבר כתבתי), הלל קורן ופיטר אלסט. הדס, מנכ"ל קוויקסופט, שהם הנציגים של אדובי בארץ וגם נותני החסות לאירוע, עלתה לשאת דברים מטעם החברה. קוויקסופט מתפארים בכך שהם מעלים כנסים והרצאות ומספקים את נקודת התיווך הטובה ביותר בין המפתחים בארץ לאדובי, אך לצערי מה שקורה בפועל לא כל כך זוהר. מנסיוני, מעט מאד מפתחי פלאש ופלקס מכירים את השם קוויקסופט ופחות עושים את הקישור בין החברה לאדובי וחבל. קוויקסופט צריכה לשאוף לכך ששמה יקשר קשר אדוק עם שם אדובי. המגמה הנוכחית של תמיכה בכנסים רק מקדמת את העניין, צריך עוד והרבה. הדס רמזה על כנס גדול שיערך בהאנגר 11 בעתיד הלא רחוק עם שיתוף פעולה מצד אדובי. יאללא בכיף.
נותני החסות לא חוסכים שבטם, וכך מגיעים got friends? לפודיום ומודיעים שהם כבר תפסו כמעט את כל מי שמתעסק בפלאש/פלקס ועכשיו הם מוכנים ליישב אותם מחדש (נכון שהבנתם? ברור). מיד אחרי עולה אמיר לביא מנכ"ל sortfix, ומספר בהתלהבות של גלולת וואבן- פורטה על המוצר שלהם. שתי המלצות חמות אמיר: לא צריך פאורפוינט סלייד לכל מילה ושנית, אם אומרים "אני מתרגש" (וכמובן שזה כתוב גם במצגת) כדאי לומר זאת בטון שהוא מעט יותר עליץ מזה של טקס יזכור בית ספרי (ואני עדין פה, האמן לי).
אחרי אמיר עלה נדב אברהמוב, ממקימיי WIX, והציג שוב את המוצר המוכר והטוב שלהם. כל הכבוד לחבר'ה הללו. שאפו. ויאללא לדיבורים...
מיכאי דיבר על דיבוג בפלאש בילדר 4, ובעיקר התרכז ב-PHP שלא ממש מעניין את עבדכם הנאמן, וגם היה נראה שלא את הסובבים אותו. כאשר הוא שאל מדוע חלק מהקהל לא עבר לפלקס 4, הוא לא ממש חיכה לתשובות. ואז עוד PHP ועוד דיבאגינג ועוד ועוד... מעט משעמם, כשאני שם לב שהמכונה שלי מצביעה על 13 דק' שנותרו לה לחיות. טוב טוב, אני אשתמש בפנקס הנהדר שחילקו לנו.
שלב השאלות עבור מיכאי הוא כרגיל המעניין ביותר, למשל אפשר לגלות שבגרסת הפרימיום של הבילדר ניתן להתקין אותו על השרת בו מתנהל הבילד של המוצר שלך, ואז להריץ את הבילד של פלקס עליו כחלק מה- integration build. נחמד. שאלתי את מיכאי אם יש עוד קומפוננטות העומדות בתור להיות מומרות ל- SPARK והוא אמר שכרגע עובדים על DataGrid ו- Tree. מצויין, עדיף מאוחר מאף פעם לא.
הפסקה קצרה ותורו של הלל קורן הגיע. הלל קורן הוא בחור אמריקאי חובש כיפה שפשוט עשה את כל הכנס הזה לשווה. משטף הדיבור, ניהול המצגת, ההסברים והדוגמאות מבחינים שהלל הוא מקצוען אמיתי. בלי זחיחות מיותרת שלא במקומה, עם פוקוס על הנושא הלל הצליח להעביר בפחות משעה את עיקרי הפיתוח בפלקס, את הרעיונות מאחורי באזים שרצים ברשת באשר מתודולוגיות ופריימוורקים, מה כדאי ומה לא, איפה נופלים איפה צריך להזהר. הנסיון של הלל מדבר מגרונו וכנראה זו הסיבה שהוא זכה לתשואות כשסיים. ולא יעזור, כשאתה רואה אפליקציה כמו קניית מילים בספר התורה (שכרגע אני לא מוצא את הלינק שלה), זה עושה משהו לנפש יהודי, לא?
הפסקת צהריים קלה ונזרקנו כמו סטארטאפיסטים אל עבר פיצות קרירות אבל אין על תחושת הנוסטלגיה. בלי שום קשר, שאפו שוב, בלי שמץ של ציניות, על אירגון האוכל לאירוע. מאד מתחשב ונכון לעשות. אך שום דבר לא יכל לרכך עבורינו את הבאות...
עכשיו על הבמה נמצא מארגן האירוע והבנאדם שעומד מאחורי כל ההפקה, אלמוג קורן, ושוב אני מציין - כל הכבוד, אלמוג, אבל...
אלמוג הבהיר לנו כמה וכמה (וכמה) פעמים שהוא זה עתה הגיע לישראל (מזה כמה שנים אבל מי סופר?) ושהוא בכלל בא מאמריקה וליתר דיוק לוס אנג'לס, אבל בכדי רק לחדד את העניין נשאלה השאלה האם אנחנו רוצים שההרצאה תתנהל בעברית או בשפת-אמו (כך מסתמן לפחות) הלא היא האנגלית. מפאת הנימוס הצבענו אנגלית. מעט ידענו לאיזו קונגיאדה פינת תעלת בלאומיך הצבעה זו תביא. אלמוג מדבר מהר. אלמוג מדבר מהר מאד ולא ברור, וכל זאת בעברית. כשעוברים לאנגלית זה פשוט טרטור הגובל בבנייה במזרח ירושלים. באמת, אני לא בעניין להכנס בו סתם ולחינם, אבל זה היה פשוט בלתי נסבל בעליל, אלמוג. אי אפשר, באמת אי אפשר לסיים כל משפט ב and what not. לצערי גם התוכן היה לוקה בחסר. חלק ניכר מהמצגת הועבר על פועלו של הנ"ל וחרג מגבול הטעם הטוב.רובנו גם מכירים את AIR ובטח לא צריכים שיראו לנו עוד ועוד אפליקציות בטכנולוגיה. שיווענו להפסקה, ירדנו על ברכנו וזעקנו שתחדל החריקה הנוראית הזו על לוח המורה ובסוף זה נגמר.
עכשיו עלה פיטר אלסט. את השם פיטר אלסט אני מכיר עוד מתקופת הפלאש המוקדמת. הבנאדם היה תמיד בחוד החנית של הפיתוח ולכן ההרצאה שלו נראתה כאחת שאסור לוותר עליה. פיטר סיפק את הסחורה ודיבר בעיקר על הפיצ'רים הקיימים והחדשים של AIR. הרצאה ממוקדת עם דוגמאות קוד פשוטות שמבהירות את הנושא. הקטע עם ה network monitoring מגניב. אמנם היה נראה שאין לו ממש קשר עם הקהל, אך אולי זה נובע מנסיון רב שיש לבחור באירועים מהסוג הזה בהם הוא לא נותן לקהל להסיט אותו מהנושא. חדי העין גם הבחינו שאדון אלסט פתח לפנינו את פוטושופ CS5 וכנראה זו הפעם הראשונה שענינו נחות על הגרסה (אני לפחות).
וזהו... מספיק לא?
לא, אז יש הגרלות וחבר'ה קיבלו ספרים וחולצות ורשיון לפלקס וזה תמיד קטע נחמד וטוב. יאללא הביתה, עם כאב ראש קל, עט חדשה והשראה משהו.
אם לסכם, אני חושב שכל מפגש שכזה הוא מבורך וכן ירבו עוד שכמותו. מה שכן, חייבים איכשהו לשמור על המפגשים הללו מלהפוך לבמת חסויות דורסת. אישית, אני אשמח לתכנים מעט יותר מעמיקים, בהם נוכל להכנס קצת לקוד ואמפלמנטציות. הבאת "אמנים" אורחים מחו"ל זה אקט מבורך וככל שהם יותר קרובים לאדובי כן ייטב. למי שאין מה לומר, בבקשה שלא יעשה את זה על הזמן שלי.
שוב, כל הכבוד ל Flex & Flash Israel על האירגון המשובח ובעיקר לאלמוג, שנראה כמו שנתן מספר ימים כלילות בעבודה.
יאללא, חפרתי די והותר...
And what not.
:)

April 23, 2010

OT: כנס פלאשו להכרזת פלאש בילד 4

אהלן אהלן,
אתמול התנהל כנס פלאשו לטובת ההכרזה על פלאש בילדר 4 וחברים. המיקום - בפארק הירקון ליד הגולפיטק (מודה, פעם ראשונה שאני שומע על המקום, ואולי בגלל שאני לא מבין את המשחק האנמי הזה). התוכנית - שתי הרצאות, אחת של מיכאי קורלן מרומניה, שהוא פלאש-פלטפורם אוונג'ליסט (אנחנו עוד נגיע למינוח הזה...) והשני הוא ליאור ברודר מטעם אינטרביט, שהוא מפתח פלקס ותיק, VP משהו ועוד כמה ראשי תיבות שאיבדתי על הדרך.
בכל מקרה, ההגעה לשם כנראה היתלה בהרבה מהמשתתפים, שמשום מה חשבו שמדובר ביריד הכנסים. מבחינתי, כל האיזור הזה, של שד' רוקח, זו חתיכת חידה מתמטית שלא מעניינת אדם, איכשהו אני תמיד מגיע לאותו הפתרון של יריד הכנסים או איך שלא קוראים למקום. אני בטוח שרוקח מתהפך בקברו.
בירות זה טוב, וכך התחיל לו הכנס, עם בירה וסיגריה ואיזה תצלום חפוז באפליקציית פלקס (איך לא? בעצם... איך כן, לעזאזל?). ומשם התמנגלות עם אנשים מעניינים מהתחום, ואני מוכרח לציין שהאירועים הללו הם קרקע פורייה לשיווק רעיונות, גיוס מוחות חדשים, חשיפה לרעיונות וטכנולוגיות חדשות ובכלל... תקראו לזה צלוחית-פטרי של חיידקי חנאנות פלאשיסטים. סבבה.
מיד אחרי התבחבשות בסביבת הפלייר נכנסנו להרצאה הראשונה של מיכאי קורלן, הלא הוא הפלקס אוונג'ליסט. רבים (כולל עבדכם הנאמן) לא ממש סגורים על הגדרת התפקיד "אוונג'ליסט". שכן לי זה תמיד מתחבר לאמנות בכלל, ולמרות שחלק (קטן והזוי) בקהילת המפתחים רואה בקידוד אמנות רנסנסית משהו, אני לא מוצא ולא רוצה למצוא את הקשר בין השניים. בכל אופן, היינו באוונג'ליסט, ומסתבר שזהו אדם שתפקידו הוא לתור בעולם ולהפיץ את המחלה. חלק יקראו לזה מסיונר של אדובי. אני אפילו מואשם על בסיס יומי בכך, אבל אני מאמין שמסיונר תפס, אפעס, קונוטציה שלילית ולכן הא לכם האוונג'ליסט. מעבר לדברים אלו, זהו ג'וב שזורק אותך לכל מיני פינות בעולם בכדי להעביר מצגות שנכתבו מראש, עם דוגמאות שנכתבו בד"כ ע"י אחרים, וכל זאת עבור קהל שממילא מאמין במה שאתה אומר. מטיף למקהלה? אכן. בורדל של ג'וב? בהחלט.
מיכאי החל לדבר על הפיצ'רים החדשים של פלאש בילדר 4, שעבור כל מי שמתעניין בנושא, נטחנו דק מזה כבר כמה חודשים. אני לא אומר שהדברים לא היו מעניינים, ואני מניח שלחלק אף היו חדשים, אבל הערך האמיתי היה לדבר עם אדם המקורב לעניינים באדובי. מה שכן, כאשר נשאל שאלות נוקבות לגבי מהירות קומפילצייה, מימוש מולטי-ת'רדינג, workflow של פלאש קטאליסט ופלאש בילדר, הוא מעט נחנק ונתן תשובות מאד דיפלומטיות. "אנחנו לא הבטחנו" זו תשובה שלא נעים לקבל בשום מצב. אם אדובי עובדים על שיפור העבודה בין מעצבים למפתחים, יש שם חור אדיר בהעברת FXG מפלאש בילדר חזרה לקאטליסט. זה פשוט לא עובד. זה חור קריטי בפונקציונאליות, שגורם לפתרון הזה להיות חלקי ולא מספק. תשובה כמו "לא הבטחנו" הייתה גורמת לי לפטר אנשים. מאוחר יותר תפסתי אותו ושאלתי אותו "למה להשתמש בפלאש בילדר אם יש IntelliJ בשטח?", הוא לא ידע לענות לי. מבחינתו, בתור מפתח Java לשעבר, הוא הנהן בראשו והסכים ש IntelliJ פשוט לא רואה את הבילדר ממטר ובתנאי ראות אופטימאליים. גם כן אוונג'ליזם.
הפסקה קצרה, עוד סיגריה, עוד דיבורים ויאללא להרצאה הבאה של ליאור ברודר.
כשהוצג בתחילה, זהר בבין (ממנהלי פלאשו וממארגני המפגש) סיפר על כך שליאור הוא הפיגורה הכי מקצועית בפלקס בארץ, וקיבל הנהון הסכמה מליאור בחזרה. וזה בהחלט מישהו ששווה לחכות למוצא פיו, שכן אין הרבה מומחי פלקס בארצנו הקטנה (האמינו לי). ההרצאה הייתה אמורה להיות עוד התפרצות לדלת פתוחה, בה ידובר על מדוע כדאי לעבור פלקס 4, ולבילדר החדש.
בפועל, ליאור דיבר על good practices עבור פרוייקט ואיך פלקס 4 תורם לכך... בערך. האמת, ששום דבר חדש לא נאמר שם. בין קאטצ' פרייזז של יועץ מחד לבין "בחברה שלנו עושים..." מאידך התוכן היה רדוד למדי, ולפרקים משעמם. לא הייתה נגיעה בפיתוח עבור Enterprise (שלעניות דעתי, זהו השוק הגדול והרציני של פלקס), לא היו דוגמאות קוד להבהרת רעיונות והיה נראה כאילו הבשורה הגדולה של פלקס 4 היא התמיכה ב L10N טוב יותר וזהו. מקולות ולחשושים סביבי היה נשמע כאילו הרצאה הייתה מיותרת, וחבל שהזמן הזה לא נוצל לעוד Q&A מול מיכאי. תוסיפו על כך שזה מגיע מהפיגורה המקצועית ביותר שיש היום בארץ ותקבלו גל אכזבה בואכה צונאמי.
ואז הוגרלו הפרסים שזו מסורת פלאשואית נושנה וטובה ויאללא הביתה. מיכאי שהביע רצון עז ללגימת בירה לאורך כל ההרצאה שלו, רצה, באופן מפתיע, ללכת ולשתות....בירה. אז יצאנו כמה חבר'ה מאוחר יותר, לבאר באיזור והמשכנו לדבר כמו חבורת חנאנות. היה נחמד מאד. באיזשהו שלב, מיכאי יצא לעשן סיגר בחוץ (כי כנראה זה מה שמעשנים אוונג'...? ליסטים, נכון), כנראה מפני שהעדיף לחנוק עצמו למוות מאשר לשמוע עוד מילה על פלאש.
All in all, היה אירוע מוצלח ביותר מבחינת האירגון. אינטרביט, שנתנו חסות לכל העניין, עשו זאת באופן מכובד ביותר, עם פרסומות גלויות אבל מעודנות משהו. כן ירבו עוד אירועים מהסוג הזה.
וכן, יש אירוע גם ביום ראשון, נראה מה יהיה שם...
סופ"ש רגוע ואוונג'ליסטי.

March 19, 2010

FlexPMD on Maven

Scroll down for English translation...

מכירים PMD? לא?!
לקצר את ההסבר, זהו כלי מצויין לווריפיקציה של קוד, כלומר, עובר על הקוד שלנו ומוצא בו הפרות של קונבנציות וכיו"ב לפי סט של חוקים שאותם אפילו ניתן להגדיר בצורה קאסטומאלית.
מצויין, אז יש את PMD, ויותר מכך, יש PMD עבור פלקס, שעובר על הקוד שלנו ומוצא לנו את המפתח הסורר שהכניס שטויות לקוד שאח"כ כולנו נשלם על כך. זה גם אחלא כלי ללמוד ממנו קונבנציות קוד ו- good practices.
יש 3 דרכים עיקריות להפעיל את flexPMD - ע"י CMD, ע"י ANT וע"י MAVEN (אני בכוונה מתעלם מהדרך ה MACית בשלב הזה). אני רוצה להתרכז באחרון.
בשביל להכלול את הדו"ח של PMD, אנחנו צריכים להוסיף חלק קוד קטן ל POM שלנו. בצורה שאדובי ממליצים עליה, הדו"ח יווצר בשלב של ה reporting, שקורה כשבונים את ה site בעזרת מייבן (mvn site). זה לא ממש עוזר לי, כי אני מעניין שהיצירה של הדו"ח תעשה בזמן הווריפיקציה של מייבן (אתם יכולים לקרא פה על "שלבי החיים" של מייבן). בכדי לעשות את זה, אני הוספתי את הפלאגין של מייבן כך - תגללו מטה ותראו את Code 1.

אחלא. אז יש לנו יצירה של PMD, לתוך ספריית target/pmd.
את ה PMD הזה אנחנו יכולים לראות באחד ה viewers המוצעים, אחד מהם של אדובי. זה די טוב, ברם הייתי רוצה שהבילד שלי יכשל קליל ברגע שיש הפרה של PMD, ולכן הוספתי בקונפיגורציה של הפלאגין את השורות הבאות - תגללו מטה ותראו את Code 2.

מה שזה עושה הוא, שברגע שיש הפרה הכי מינימאלית, תעיף את הבילד. אבל, אליה וקוץ בה. הפלאגין של אדובי לא ממש מכבד את הקונפיגורציה הזו, אז סאחבק פתח באג (שוב, איזה גלעד ארדן אני, הא?), ממש פה, ובאופן מפתיע כבר עובדים על תיקונו ועוד מעט אני אדע בדיוק באיזו גרסה התיקון נעשה.
זה הכל להפעם, אנשים. מקווה שתשכילו להשתמש בכלי הנהדר הזה ו... סופ"ש נעים.

Do you know PMD? You don't?
To make a story short, it's an excellent tool for varifing code, which means that it goes over our code and finds conventions violations according to a set of rules which you can even be custom defined.
So great! We have PMD and even better, we have FlexPMD that goes through our code and finds the remains of a misfit developer that we're all going to pay on later. It's also a great tool to learn code conventions and good practices.
There are 3 main ways to invoke flexPMD - command line, Ant and Maven (I'm not mentioning the Mac way on purpose). I would like to talk about the later.
In order to include reporting for PMD we need to add a bit of code to our POM file. In the manner that Adobe suggests, the report will be generated in the reporting phase, which occurs when building the Maven site (mvn site). This doesn't really help me, cause I want the report will be generated on the "verify" phase of Maven life cycle (you can read about Maven's life cycle here). In order to do that I've added the Maven plug-in like so - Scroll down to see Code 1.

Good. So now we have PMD report generation into the target/pmd directory. We can view this report in one of the offered PMD viewers. You can check out the one offered by Adobe.
It's pretty good, but I eould like my build to fail on violating the rule set of PMD, therefore I've added these following line to the plug in configuration - Scroll down to see Code 2.

What it does is, that when there is a minimum violation of PMD rules, Maven should fail the build, but unfortunately Adobe's plug-in does not respect this code, so I've opened a bug (yet another one...) right here, and supprisingly enough they started working on it and soon we shall now in what version the fix resides.
That's all for now. Hope this tool will help you write better code and… have a good one.

Cheers.

Code 1

<build>
...
<plugins>
...
<plugin>
<groupId>com.adobe.ac</groupId>
<artifactId>flex-pmd-maven-plugin</artifactId>
<version>1.0.RC5</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${basedir}/target/pmd</outputDirectory>
</configuration>
</plugin>
...
</plugins>
...
</build>



Code 2

<failOnViolation>true</failOnViolation>
<failurePriority>0</failurePriority>
<verbose>true</verbose>

March 06, 2010

Flex SDK 4.0.0.13875 bug on Flash Builder

Scroll down for English translation...

באגים, באגים, באגים...
טוב, נו, האמת שלא כל כך הרבה אבל הנה אחד שממש עצבן.
אני בונה פרוייקט בפלאש בילדר 4, ומשתמש בגרסת ה-SDK היציבה האחרונה שיש: 4.0.0.13875 .
מסתבר שכאשר אתה מנסה לעשות אימפורט ל MouseEvent למשל, פלקס אומר שהוא לא מכיר את החיה הזו בכלל. חפירה קצרה הביאה אותי להבנה שהתוכן של Playerglobal.swc לא נכלל ב- lib path של הפרוייקט. כמה מתסכל, הא?
בכל אופן, פתחתי באג ב Jira של פלקס ואשמח אם תצביעו עבורו, ואם אתם נתקלים בבעיה הזו, פשוט תייבאו את ה SWC לבד מספריית ה SDK. זה פותר את הבעיה.
שבוע טוב!


Bugs, bugs, bugs…
Well, not that many, really, but here is one that really pissed me of. You see, I'm building a project using the Flash Builder 4, and I use the last stable release of the SDK for it: 4.0.0.13875.
It appears that when you try to import the MouseEvent class for instance Flex tells you that it doesn't know it at all. A little digging helped me understand that the content of the flashplayer.swc is missing from the project lib path. How frustrating, right?
Anyhow, I've opened a bug on flex's Jira and I will be happy if you vote for it, but in the meantime, if you encounter this problem all you need to do is to import the playerglobal.swc yourselves from the SDK directory.
Have a good on!

February 06, 2010

A skin for each button icon in Spark!?

Scroll down for English translation...
אהלן, מה קורה?
האמת שהיה לא רע כל כך, עד שנתקלתי בעובדה פלקסאית חדשה שמעט ערערה אותי.
אתם מבינים, אני לאחרונה חופר מעט ב-Spark, בקטע של "need to know basis". מה שאני צריך אני בודק, בלי לפתוח אתר ארכיאולוגי. ת'כלס עניין אותי הכפתור החדש, מה קוראים אותו s:Button.
העובדה הראשונה שמטרידה את עבדכם הנאמן היא העלמות הפתע של המאפיין הנחמד icon. כמה קל זה היה להצמיד אייקון לכפתור? בלי בעיות ובלי נעליים, שים את האייקון על הטאג וסגור עניין. אז זהו, שלא עוד. אז מה עושים?
או! מכיוון שהכל ב- SDK 4 הוא מכוון Skins and Styles, מהנדסי אדובי החליטו שגם את האייקון ל Button החביב יגדירו ב Skin. על פניו, החלטה נכונה, הגיונית ויושבת טוב עם כל האינטגרציה שהם עושים עם Catalyst, אמה-מה? זה אומר שלכל כפתור שאני רוצה לתת בו אייקון, אני צריך לבנות Skin.
שמעתי נכון? לכתוב סקין לכל כפתור שרוצה אייקון? זה אבסורד. תחשבו, שכאשר תבואו לשדרג את ה SDK של הפרוייקט הקרוב לביתכם, כל כפתור נושא אייקון, יצטרך עכשיו סקין אישי. לפני שנאמר דבר בנושא, ולפני התחכמויות - גרוע.
אז לא. באים המתחכמים ואומרים, עשה לך Class אשר יורש מ- Button, ופתח API להגדרת האייקון שנמצא עליו. במילים פשוטות - תכתוב את ה Button הישן של mx, רק עם המאמבו-ג'אמבו של Spark.
שוב, שמעתי נכון? למה?! אני מבין את הרעיון לאפשר את הגמישות הזו, אבל מה המחיר, אדובי? כבר עכשיו צצות להן כל מיני קומפוננטות שמרחיבות את Button, שכל יעודן הוא לאפשר הצגת אייקון על כפתור. אתם יכולים לדמיין לעצמכם את האנדרלמוסיה הגרסאתית שנוצרת פה? איך קומפוננטה כל כך בסיסית הופכת למשהו שהוא קאסטומאלי ולא חלק מהפריימוורק של פלקס?
הגמישות פה אכן משחקת תפקיד מפתח, כי אם בעבר אייקון על כפתור נראה ומוקם בצורה מאד מסויימת, היום אין קץ ליצירתיות, אבל לדעתי היום צריכים לשמר את הפונקציונאליות הבסיסית כחלק מהקומפוננטה.
אני לא יודע כמה מכם כבר נחשפו לעניין, אבל בתור מפתח פלקס (ותיק, אם יורשה לי) אני מוצא את הרעיון כ- overhead רציני, ועוד נקודה טובה עבור המקטרגים על פלקס. משהו שאני עוד צריך ללעוס, אבל בינתיים, סאחבק לא מרוצה.
סופ"ש רגוע שיהיה...

Hey, How's it going?
To be honest, I wasn't that bad until I bumped into a Flex fact which shook be a little bit.
You see, I'm lately lightly digging in Spark, in the "need to know basis". What I need I check out, with out opening an archeological site over it. Bottom line, I was interested in the new Button offered by Spark, what you call s:Button.
The first fact that disturbs me is the sudden disappearance of the "icon" property on the Button. How easy was it to just place an icon on a button, right? No trouble there mate, put it on the tag and there you go. So that's it for that. No more. So what do we do?
Right! Since everything in the new Flex SDK 4 is Style and Skin oriented, Adobe engineers decided that the button icon should be defined in a skin. On the surface it looks like the right thing to do, that sits well with all the Catalyst integration, BUT is means that for each button with an icon I need to create a custom skin.
Did I hear right? Write a skin for each button that needs an icon? This is absurdity. Think, when you come to upgrade your nearby project, every button that has an icon on it will need a new skin now. Before anything is said - this is bad.
So wait! No. Developers come and say "hey! Make yourself a Class that inherits Button and enable and API to define the icon that is on it". In other words - write the same old mx:Button only with the Spark component definitions.
Again, did I hear right? Why?! I understand the idea of enabling this flexibility to the components, but for what cost. Adobe? Even as we speak, extended component are emerging , that extend the Button component, destined to enable the displaying an Icon on the button easily. Can you imagine the version mess that is being created? How come that such a very basic component is something that is custom made and not part of the framework?
Flexibility does play a key roll here, cause if in the past the icon on the button would be place in a certain manner, today you can really go far with what can be done, but in my opinion, the basic functionality should have been kept as part of the component.
I don't know how many of you were exposed to this matter, but as a Flex developer (senior, if I may) I find the idea as a major overhead, and yet another good point for all of these that talk trash about Flex out there.
This is something I still need to chew on, but in the meantime - yours truly is not happy at all.
Have a good on...


January 08, 2010

Flashmatticomponents - now also at RIAForge

Scroll down for English translation...

מה המצב?
הודעה ממש קצרצרה - לפני מספר ימים העלתי פרסום של Flashmatticomponents לאתר האירוח RIAForge.
בלי שום קשר, האתר הזה הוא אחלא מקום למצוא פרוייקטים של Open Source בכל מה שקשור ל RIA ובעיקר לפלקס.
אתם יכולים לקפוץ לביקור.
בינתיים אני יכול לספר לכם שעד כה היו קרוב ל 50 הורדות של הספרייה שיצרתי. בינתיים, אף אחד לא מצא לנכון להעיר על התוכן (אם מחוסר עניין או אולי מחוסר באגים.... לאאאעע... לא יכול להיות), ככה שאני מבסוט :).
מקווה שאמצא זמן לעדכן בשאר הדברים שעוברים לי תחת היד.
סופ"ש רגוע

How's it going?
A really short message here - a several days ago I published my Flashmatticomponents project over the RIAForge hosting site.
Regardless, this site is a great place to find Open Source project related to RIA and especially Flex. You can check it out for yourselves.
In the meanwhile, I can share with you that the are approximately 50 downloads of the Library I've created and so far nobody commented about the content (whether they didn't find it interesting or may it's because there aren't any bugs… nhaaaa… can't be), so I'm happy :).
Hope I'll find the time to update you with the other stuff I'm working on.
Have a good one!
Cheers.