נובמבר 11, 2009

Add support to informative steps for the Flashmatticomponents Wizard

Scroll down for English translation...

טוב, זה יהיה קצרצר.
הוספתי לאחרונה, ל- Wizard Framework, את התמיכה בצעדים שכל תכליתם היא אינפורמטיבית.מה הכוונה? הכוונה היא שיש צעדים שלא אמורים להכלל בסיכום, בסופו של ה- Wizard. כל יעודם הוא להיות איזה Disclaimer או אולי המלצה מסויימת. מה שקורה בפועל הוא, שברגע שאין לאותו צעד data שהוא אמור לייצג, הוא פשוט לא נכלל בסיכום של ה- Wizard.
את קוד הפרוייקט החדש אתם יכולים להוריד מפה.
שימו לב שההורדה הישירה של ה- SWC גם עודכנה, אבל כרגיל, אני ממליץ להוריד את הקוד ולקמפל לבד.
תבלו.


Ok, this will be a quick one.
I recently added, to the Wizard Framework, the support for informative steps. What do I mean by that? I mean that there are steps that are not supposed to be included in the Wizard Summary. Their all purpose is to be some kind of a Disclaimer or some kind of a recommendation. What happens is that when these steps don't have a data representation, they will simply won't be included in the summary step.
You can download the project code from here.
Please note that the direct download of the SWC file was also updated, but as always, I recommend downloading the code and compiling it yourself.
Take care.

אוקטובר 15, 2009

A Single Thread that can kill Flash

Scroll down for English translation...

זו רטינה.
אמנם לא חסרת תכלית, אך אם באתם בתקווה למצא פתרון, אני מצטער לאכזב אתכם הפעם.
מאד דרמתי מצידי, אבל אני חושב שזה מן ההכרח להצביע על המלך הנודיסט הוותיק - הרי הוא הת'רד היחיד של פלאש.
העובדה שפלאש יודעת לנהל רק ת'רד אחד בניגוד לסביבות ריצה אחרות (.NET, Java וכיו"ב) תמיד הייתה שם ברקע, אך מעולם לא נתפסה כטיעון מהותי נגד הטכנולוגיה. יש הטוענים שאם אתה מתכנת לפלאש פלייר ומצאת עצמך מנסה לנהל ת'רדים, אתה כנראה עושה משהו לא נכון. הוסיפו על כך את העובדה שבכדי לנהל ת'רדים, ה-VM של פלאש אמור לגדול בנפח, וקיבלתם את השיקול העסקי של אדובה לא לגעת בבייבי שלהם.
ברם, RIA, ומעבר לכך - AIR.

מה הבעיה ש'ך?
קחו את התרחיש הבא, בו אפליקציה כלשהי אמורה להשתמש ביכולות גישה ל- File System, ולעשות איזו איטרציה מסויימת על קבצי מערכת, משהו סטייל "ספר לי מה יש שם". תרחיש שיכול להיות בן-בית אהוב באפליקציות AIR, למשל, לא? עכשיו, בכדי שהלקוח שלנו יהיה מרוצה, אנחנו רוצים גם לתת לו חווית משתמש טובה (כי אנחנו מאמינים שאפליקצייה טובה לא נגמרת בארכיטקטורה פונקציונאלית), שתעזור לו להבין שמשהו קורה. progress bar נשמע כמו רעיון מבטיח.
אתם כבר מזהים את הבעיתיות? הרי יש לנו לולאה רקורסיבית שלא עושה הרבה בתוכה, אבל עדיין יכולה לרוץ פוטנציאלית פעמים רבות, מה שייתקע את הת'רד היחיד של פלאש, ושיגרום לכך שדבר, אבל דבר(!) לא יזוז על המסך והפלייר יתקע כמו אוטוביינקי בקסטל. אנחנו נחלוק מזל גדול אם ה- Progress Bar יעלה בכלל לתצוגה.

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

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

Pixel Bender
נחפש עוד קצת ונמצא את פתרון ה- Pixel Bender. בקצרה, Pixel Bender נועד ליצור אפקטיים חזותיים כמו פילטרים וכדומה על bitmaps, וקטורים ועוד. ת'כלס? אופרציות מתמטיות שמעבדות ביטים, ורצות על ת'רד נפרד. רגע, רגע, אז זה בדיוק מה שאנחנו צריכים לא? יש לנו ת'רד נפרד ועליו נריץ את מה שאנחנו רוצים, לא? ובכן התשובה היא לא. אפשר להריץ שם חישובים מתמטיים אבל לא לולאות. מה שגם, צריך לבנות עבור פעולות מיוחדות קרנלים (כן, Kernels, זוכרים מלינוקס? איזה כיף הא?... בואו נחולל קרנלים!), אז הפתרון הזה נחמד ויפה למניפולציות גראפיות או סאונדיות, כל עוד אין לולאות בעניין. לא טוב לנו. אתם יכולים לקרא על זה פה.

HTML
הלאה, כי אנחנו לא ילדות, ואני מנסה לפתור את העניין עם HTML. עובדה מעניינת אחת היא שאם תטמיעו HTML באפליקציית AIR שלכם, ותקראו לפונקציית JS שתרים Alert, אתם תופתעו לגלות שהת'רד היחיד של פלאש לא משחק שם תפקיד (מן הסתם) וה- Alert עולה כמו נינג'ה. מה שכן, אנחנו לא ממש מעוניינים ב-Alert. אנו רוצים משהו יותר בכיוון של חלון חדש שנפתח, עם פלאש פלייר אחר בתוכו, שיפעל בת'רד הבודד שלו. אתם יודעים מה? עזבו פלאש, אני מארגן progress bar שהוא AJAX נטו בפנים, יותר טוב מזה? אין.
כינים.
בשביל שה-HTML הנחמד שלנו ירונדר הפלייר צריך (ניחשתם נכון) לרנדר אותו, אבל הוא תפוס על הפעולה הרקורסיבית שלו, ושום דבר לא יעזור, ה-HTML לא מראה דבר וחצי דבר.

עוד פתרונות?
אין לי. לכן אני פה, כועס ורוטן. יש לכם? אשמח לשמוע...

סיכום
ישר ולעניין, יש טכנולוגיות מתחרות שתומכות בת'רדים מרובים. עד כאן יש? אחלא.
אם אדובי מעוניינים לשמור על היתרון היחסי שלהם בעולם ה- RIA ובעיקר באיזור ה- Desktop Applications, אני מציע בצניעות שייקחו את עניין הת'רד הבודד של פלאש לתשומת ליבם ובזריז, כי מיקרוסופט לא מחבקת עצים בזמן שהם משתעשעים בכנסי MAX.




This is a mutter
Not completely useless, but if you came here in search for a solution I'm sorry to disappoint you this time.
It's very dramatic of me, but I think it's high time to point out the so obvious fact that Flash has only one thread.
The fact that Flash can run on a single thread only, as opposed to other running environments (.NET, Java etc.), was always on the backgrounds but never was conceived as a major argument against the technology. Some might claim, that when you find yourself in need of multiple threads when developing for Flash, you're probably doing something wrong. Add that fact that in order to manage threads, the Flash player VM needs to grow in volume, and you get the business consideration for Adobe to not touch their little baby.
But then comes RIA and to top it off - AIR.

What's your problem?
Take the next scenario, where there is an application that supposed to use the file system API, and do some kind of an iteration over files. Something like "tell me what's going on in that directory". A scenario that can be a native resident in any AIR application.
Now, for our customer to be happy, we also want to give her a nice UX (cause we truly believe that an application does not end in a mere functional architecture) that will help her understand that some process is running. A Progress Bar sounds like a great idea.
Can you smell the rotten egg already? We have a recursive loop that doesn’t do much inside, but still can potentially run many times, what will eventually stuck Flash single thread and cause that nothing will be renderered on the screen. The player will be jammed and we will be considered lucky if our progress bar will be added to the stage (not to mention, show the progress).

Does it make you mad?
Now you tell me, does this lonely thread is something that Adobe needs to put high at their priority list when racing to conquer the RIA and Desktop Applications realm? Hell yeah.
It's very nice that the player is small, and it goes well with poor Web-Sites, but times are changing and you cannot be stagnated with the argument that "our player is small", especially when the competitors are supporting multi-threading.
Adobe has leaned and still leaning on the evangelist developers community, that works day and night in finding workarounds to many player limitations (RTL someone?), but the solutions to multi-threading support are awkward, expensive and to be honest? Not supposed to be something that we should develop.

Ok then, what can be done?
Roaming the web, I didn't find any reference to the issue from Adobe where it comes to Roadmaps for the future of Flash player. I wouldn't put my money there either. I'm still waiting for the Time zone support promised for Flash player 10.
The solutions suggested usually speak about simple loops and not recursive ones. A naïve approach to divide these loops into smaller routines and run them while considering the frame rate. A sample of that you would find in an excellent post by Alex Harui (reading the comments is a must).

Pixel Bender
If we look a little more we would find the Pixel Bender solution. In short, the Pixel Bender purpose is to create a dynamic visual effects like filters and such, on bitmaps and vector graphics. In a nut shell? Mathematical operations on bits that run on a different thread than the one used by the Flash player.
Hold on! This is exactly what we need, isn't it? Well, the answer is no. you can run mathematical calculations but not loops, and you also need to generate Kernels (yeah, remember that Linux fun?), so this solution is nice for graphic or sound manipulations, but as long as there no support for loops it doesn't really help us. You can read about it here.

HTML
Going on, cause we're not giving up that easily, I try to solve the issue with embedded HTML. One interesting fact is that if you embed HTML into your AIR app, and call a JS function that pops up an Alert, you will find out that Flash single thread doesn't get in the way and the alert goes up when asked, but I want something nicer, like a window. You know what? I don't even need Flash inside that window, I did it all in pure AJAX. Does it get any better than this?
Nothing.
In order to render HTML, the player needs to render the HTML container, but it is caught up in it's loop so nothing happens.

More solutions?
I have none. This is why I'm here… complaining. If you have some, I will be sure happy to hear them.

In conclusion
Straight and to the point, there are other technologies that do support multi-threading.
If Adobe wishes to keep their relative advantage over the competitors, in the RIA section and mostly in the Desktop Applications, I humbly suggest that they will take the matter of multi-threading into consideration, and fast, cause Microsoft ain't gonna wait until the next MAX convention.


ספטמבר 20, 2009

You open, You see :: Curly Braces

Scroll down for the English translation...

מה המצב? איך עובר עליכם החג? בטוב? יופי.
אז ככה, אתם יודעים שמקום העבודה הוא אחת הזירות הטובות ביותר להעלות תהיות ומחלוקות. וכך קורה ששאלות תמימות (או לעיתים לא ממש) הופכות לדיונים סוערים, שאפשר להפיק מהם בעיקר תובנות ותשובות.
הנה משהו שקולגה שלי העלה וחשבתי שיהיה נכון (כמובן, ברשותו האדיבה) לשתף אתכם בו:
בזמנו, כל ביטוי action script בקובץ MXML היה צריך לחיות בתוך סוגריים מסולסלים, אבל מאז עברו מעט מים בנהר והסוגריים המסולסלים הם לא ממש הכרח. מתי לא? מתי שהצפי הוא עבור אובייקט, או מתודה, או אם להיות יותר מדויק כל מה אמור לייצג מחרוזת. סוגריים מסולסלים קיבלו מקום בעיקר עבור Binding, וכולנו יודעים שהן בעצם מורות לקומפיילר לייצר אקסטרה קוד שאמור לנהל את ה- Binding במקןם הנתון.
ובכל זאת, אנחנו עדיין רואים מפתחים משתמשים בסוגריים מסולסלים, כאשר הם למשל מגדירים event handlers, הו-אז נשאלת השאלה הבלתי נמנעת: האם כאשר אנחנו מגדירים event handler בתוך סוגריים מסולסלים אנחנו למעשה כופים על הקומפיילר ליצור אקסטרה קוד עבור Binding לא נחוץ בעליל?
בפשטות? לא.
למטה תוכלו למצא את קטעי הקוד המג'ונרטים (ברוך המוציא generated מן הקומפלייר), פעם אחת עם סוגריים מסולסלים ופעם בלי. כפי שאתם רואים, ההבדל הוא, באופן מפתיע, סוגריים מסולסלים. אז מעתה אתם יכולים להיות רגועים ולהרגיע את הסובבים אתכם – זה בסדר.
שנה טובה.



How’s its going?
So, you know that the working place is one of the best places to raise thoughts, wonderings and debates. And so it happen that innocent questions (or some time not that innocent) become a great argument, which sometimes you can benefit from.
Here is question that my colleague raised and I thought it would be great (with his generous permission) to share with you:
At the time, any ActionSctipt expression on an MXML file would have to be inside curly braces, but since then time has passed and the curly braces are not mandatory. You ask “when?” – Well, whenever the expression is not meant to define a String. Curly braces got the honorable rule of defining Binding (in general), and they instruct the compiler to generate extra code to handle the binding on the spot.
Still, we see developers using the curly braces when they define Event handlers, for instance. Then, one might ask, when you define an event handler inside curly braces, do you still instruct the complier to generate extra code, to no need?
Simply answered? Nop.
If you look, below, you would see the code and the generated code snippets for both using curly braces and not using them. As you can see, the only difference is, well, the curly braces. So from now on you can relax… it’s ok… it’s ok :).

Cheers.


Without curly braces


/**
* @private
**/
public function ___CurlyBraces_Application1_creationComplete(event:mx.events.FlexEvent):void
{
onCreationComplete(event)
}


With curly braces


/**
* @private
**/
public function ___CurlyBraces_Application1_creationComplete(event:mx.events.FlexEvent):void
{
{onCreationComplete(event)}
}

ספטמבר 16, 2009

Flashmatticomponent direct SWC download

Scroll down for English translation...

אהלן,
אם תקראו את התגובות על הפוסט בו הצגתי לראשונה את Flashmatticomponents, תוכלו להבחין באחת המלינה על כך שאין אפשרות להוריד את ה- swc ישירות, אלא חייבים להוריד את הקוד ולקמפל לוקאלית.
נכון, ואללא נכון. הסיבה שעשיתי זאת כך היא מפני שהרבה יותר קשה לנהל את הגרסאות בצורה הזו, ויש מצב שה-SWC שאפשר להוריד ישירות לא יהיה הכי-הכי מעודכן.
בכל אופן, זה יהיה נכון לשים שם את גרסת ה-SWC, וזה מה שעשיתי. תרגישו בנוח לגשת לאיזור ה-download של אתר הפרוייקט ולהוריד את ה-SWC.

יאללא ביי.


Hey guys,
If you'll read the comments on the post where I first published the Flashmatticomponents, you'll notice one that complains about not having a direct download option in the project site, for the SWC file, but rather the option to download the code and compile it locally to get the artifact.
True, yeah… The reason I did it so is because it's a lot harder to manage the versions that way, and a situation might rise, where the direct download SWC will not be as updated as the one generated by compiling the code.
In any case, it would be a good Idea to put a direct download link to the SWC, which I did. Feel free to go there and download it.

Cheers!






ספטמבר 10, 2009

FlexPMD from Flex Builder

Scroll down for English translation...

שלום שלום, מה קורה?
וודאי רובכם יודעים שאדובה הוציאה את FlexPMD לשוק הפתוח, ואם נהיה כנים - זה אחלא של דבר! למי שלא מכיר, אפשר לקרא פה, אבל בכל זאת הנה העיקר:
מוצא קוד שלא בשימוש.
מוצא קוד לא יעיל.
מוצא קוד שהמורכבות שלו מוגזמת.
מוצא רוטינות קוד ארוכות מדי.
ועוד יותר...

תשמעו, אתם מריצים את זה על הפרוייקט והוא מוצא תחלואות שלא היו מביישות את סומליה. ממש ממש כלי טוב, פשוט ויעיל העוזר לייצר קוד טוב יותר, ברם (ואתם ידעתם שזה יבוא), אליה וקוץ בה.
זה מגניב שאפשר להפעיל את זה אפילו מהמטבח של גיל חובב (mvn, ant, cmd) אבל אני רוצה דרך מהירה ויעילה להפעיל את העניינים. משהו של "קליק אחד ויאללא לרפואה", משהו של "מתוך פלקס בילדר ולעסק", וזה נכון שאדובה אומרים שהם עובדים על פלאג-אין לפלקס בילדר, אבל סאחבק לא נודע בשל חיכיונו למשיחי-תוכנה החל לתור אחר פתרון.
External tools!
מה שעוללתי הוא external tool בתוך Flex Builder, שיקרא Create PMD, והוא ידע לפנות ולבצע את הפעולות, נכון למיקום הבחירה בעץ הפרוייקט. כלומר, אם תבחרו את ה root, קובץ ה- PMD יופיע שם, אם תבחרו package, הקובץ יופיע בה.
תעקבו אחר הצעדים בתחתית הפוסט (הם באנגלית, אני יודע, אבל אתם תתמודדו), ובשלוש דקות יהיה לכם כפתור שמייצר PMD בקליק אחד. בכדי לחזות בתוצאות באופן נהיר, אדובה מציעים לנו את ה viewer שלהם. כל שצריך הוא להעלות את ה- PMD אליו וחזות בזוועות הקוד.
אם יש בעיות עם ה- tool, דברו איתי :).


Hi guys,
Recently Adobe has launched a new open source project called FlexPMD. You can read all about it here, but here are the highlights:

“FlexPMD is a tool that helps to improve code quality by auditing any AS3/Flex source directory and detecting common bad practices, such as:

* Unused code (functions, variables, constants, etc.)
* Inefficient code (misuse of dynamic filters, heavy constructors, etc.)
* Over-complex code (nested loops, too many conditionals, etc.)
* Over-long code (classes, methods, etc.)
* Incorrect use of the Flex component lifecycle (commitProperties, etc.)”

Well this is multi-nice, but it seems that we need a better/quicker way to invoke it on our projects than have it on the Maven site/Ant/CMD. This is something that we need on a day-to-day, hour-to-hour basis.
So until the Flex Builder plug-in will be out (they are working on it), here is my solution, and you are all welcomed to adopt it for better coding:

STPES:

Download the “command-line” version from adobe and extract it onto your local machine.
Open Flex Builder.
On the top menu, go to Run > External Tools > Open External Tools Dialog…
Create a new External tool and call it “Create PMD”.
Fill it according to the following:
  • The Location is where the java.exe can be found
  • The Working Directory is set to a variable which is the selected resource on the project tree (the variable name is “resource_loc” and can be found on the variables list).
  • The Arguments are where the flex-pmd-command-line-1.0.RC3.jar is found, the source (“s”) and output (“o”) folders which are set to be at the same location as the Working Directory.
Ok – all you need to do now, is to select a resource on the project tree and run this tool.
After the tool has completed its work – you will see a pmd.xml file on the same folder you’ve selected on the project tree (if you don’t, refresh the tree, it’s there…).
Launch Adobe PMD viewer URL.
This is the viewer for PMD that Adobe created (If you’re really lazy, you can open the viewer directly from Flex Builder… but that's another story).
Load the file onto it and witness the HORROR :)

If you encounter any trouble with the tool, please let me know.
Cheers.



ספטמבר 05, 2009

עברית או אנגלית / Hebrew or English

An English translation is available for this post...

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

It’s been a while that I’ve been walking with a small wondering cloud hanging above my head, as to keeping the Hebrew flavor of my blog. I love Hebrew, I love writing it, but there is no way you can avoid the obvious fact that this blog, being a technical blog, kinda misses its full strength when you mix the holy tongue with hi-tech terms. It’s true that I keep translating the technical posts, but still, aside from the fact that it’s a double work for me, it feels a bit overwhelming to the readers and sometimes even intimidating.
And on the other side, I truly love Hebrew.
I want to ask you, those who read the this blog - what do you think is the right direction to go? Hebrew? English? Both? Maybe a different solution?
What say you?

אוגוסט 21, 2009

Flashmatticomponents – Open Source Flex/AIR Library by Flashmattic

An English translation is available for this post...

כותרת מפוצצת, הא? כן... אבל יש סיבה.
שלא תגידו שסחבק בא עם כל מיני "אני מכין לכם משהו", אבל יוצא מוסכניק בסוף. בחודש האחרון אני עמל על פרוייקט חדש ופריימוורק מגניב (לדעתי, אבל איך אומרים – "קוף בעיניי אימו, איילה"). אז אם כן, בשעה טובה ומוצלחת, אני פורש את הדברים לפניכם, והרי עיקרם:
זה נכון שכחלק מתהליך עבודה, אתה מוצא עצמך בונה סט של קומפוננטות, ואם יורשה לי, פריימוורקים לשימוש האישי. ככה זה, והרי זה מבורך, אבל אחרי זמן מה הסוציאליסט החבוי שבך מתחיל להרים ראש ולשאול "למה לא לחלוק... בנאדם?".
אז הנה אני מוצא עצמי בונה פרוייקט קוד-פתוח בחסות google-code, בשם Flashmatticomponents (שימו לב לקופירייטינג המושחז והמרטיט). הפרוייקט הזה, כמו כאלו שקדמו לו, יכיל קומפוננטות ופריימוורקים וכל דחפין יתי ויאכל. הקוד פתוח, כלומר שראשית, ניתן להוריד את ה SWC ולהשתמש בו כאוות נפשכם בכל פרוייקט העולה על רוחכם, ושנית, ניתן להוריד את ה source בעזרת SVN, לייבא את הפרוייקט לפלקס בילדר הקרוב לביתכם ולהתעמר בו. הרשיון לשימוש הוא Apache License 2.0.
אז לפני שאני אתן לכם את הקישור, אגיד לכם מה יש שם כרגע, ככה שלא תופתעו:
יש שם את ה PathValidator שפרסמתי לא מכבר. למי שלא זוכר, זהו וואלידטור המוודא שנתיב ל file system הוא ואלידי ומצביע אל קובץ או תקייה אמיתיים. זה בקטנה, ככה באפרטיף.
מה שבאמת מגניב הוא פריימוורק חדש שקראתי לו “Wizard”.
Wizard הוא פריימוורק שכל יעודו הוא לתת מענה קל ופשוט לייצירת step-by-step wizards בפלקס. אני לא מאמין שיש מישהו שלא יודע מה זה wizard, אבל לכל אלה שלא התקינו אפליקצייה מימיהם, ועשו next-next-next, אני אסביר שזה המקום שבו אתם בד"כ עושים... next-next-next.
ה- Wizard נותן כמה יכולות מאד מתבקשות, כמו:
1. הגדרת צעדים בתוכו היא קלה ומאד אינטואיטיבית.
2. מנהל את הנוויגציה בין הצעדים השונים בו.
3. מדספטצ' events עבור כל פעולה בו, בין אם עוברים לצעד הבא, או חוזרים אחור, מבטלים או מסיימים את ה- Wizard.
4. קובע את הגודל של עצמו נכון לגודל הצעדים שבתוכו. המפתח לא צריך לדאוג לכל עניין המדידה.
5. אחראי על איסוף המידע בכל צעד והשמה שלו באובייקט Data Model שהוזרק לו מבעוד מועד.
6. יכול להתבטל בכל רגע נתון.
סבבה, לא?
בכל אופן, את "איך משתמשים" ודוגמאות קוד תוכלו לקרא בדפי ה- Wiki של הפרוייקט, וכמובן אם יותרו לכם שאלות, אני פה (או שם), פשוט תפרסמו הערה ואני כבר אטפל בעניין. לא לא, זה מאד חשוב – כל הערה, שאלה משאלה (או גם מילה טובה, אם יש על מה) אני אשמח לשמוע ולפעול בהתאם, בטח ובטח אם גילתם באג סורר, או התנהגות לא צפויה/נכונה, אפשר לדווח על באגים בדף הפרוייקט עצמו.

אז עכשיו, כל שנותר הוא לקפוץ לאתר הפרוייקט, להוריד ולנסות.
תבלו :).



Grand headline, euh? Yeah… but there’s a good reason for that.
Just so that you won’t say that I come up with those promises of “cool stuff”, and later fail to deliver, I will let you know that I’ve been working on a new project and a cool framework for the past month or so, and if you allow me, I will present it now:
It’s true, that as a part of a working process you find yourself building a set of components, and dare I say frameworks that will help you along the road. That’s just the way it is, and a good thing too, but after a while the collaborative persona within you rears its head and starts asking: “why not share… mate?”
So I find myself building an Open Source project under Google-Code with the name of “Flashmatticomponents” (whiteness the marvelous and spin-shivering copywriting). This project, like other Open Source projects contains components and frameworks, so that whoever wishes to use them, will be able to.
The code is open, which means that you can download the SWC and use it freely in you project, and secondly, you can download the source and, import the project into your Flex Builder and mess with it. The Open Source Licensing is Apache License 2.0.
So, before giving you the link to the Google code site, I will tell you what currently can be found there, so that it won’t catch you in surprise:
You will find the PathValidator that I’ve recently published here. To those who don’t remember, it’s a Validator that checks the validity of native paths to the local file system. Pretty handy for any AIR application that uses file access, but this is just the aperitif…
What is really cool is the new framework that I named “Wizard”.
Wizard is a framework that its whole purpose is to make the implementation of wizards in Flex/AIR easy. The Wizard gives some very trivial behaviors:
1. Steps are easily implemented and added to the wizard, allowing the developer to concentrate on more important stuff.
2. It is responsible for the navigation within it, whether the next or previous steps are available and knows when the user has reached the end of the wizard.
3. It dispatches events for each relevant stated of the Wizard, such as: moving forward to the next step or moving backwards to the previous one, canceling it and of course when the Wizard is completed.
4. It is responsible for scaling itself according to its steps measured size. The developer using it should not be bothered with setting width and height to the Wizard or the steps.
5. The Wizard is also responsible for collecting the information the user has entered throughout the steps and package them into a data model object given to it.
6. The wizard can be canceled at any stage.
Sweet, right?
Anyway, you’ll find “how-to”’s at the project Wiki, and of course, if you still have questions, submit a comment and I will happily attend to it. No really – this is very important, if you have any wish, question, found a bug or simply have something nice to say, I will be glad to hear about it.
All there is left now is to jump to the project site, download and try it.
Enjoy :).