|
|
Archive for October, 2006

This one is on the top of my list of “the most wanted” for Flex 3.0. I am tired of the treatment MXML gets from us coders. In ActionScript classes you can make class “dynamic” and add properties at will. There is no similar construct on MXML.
Here is what I think would work and be very “natural”. If you use a MXML tag derived from “dynamic” (actionscript) class, MXML should allow unknown attributes – without a warning. To force type information on the unknown attributes developers can use {binding} notation – we are misusing it for initialization anyway, so it would be quite natural.
I would also argue in favor of “dynamic” or “expando” attribute on every control for application developers (changing a hat). A lot of “business layer frameworking” could have been avoided if each object would expose a single “Object” property you can add your props to. That would allow application “polymorphism” in a dynamic way that is different to tachings of pure programming science but greatly simplifes application coding.
Here are examples of cumbersome code that would greatly simplified (no need for extra classes, simplier syntax, etc.) by the above approach:
http://samples.faratasystems.com/AdvancedDataGrid/index.html – there is complete source there – PropertyBagDemo is a good example of “dynamic” approach. By the way, thanks everyone for the emails on this one!
Thank you,
Anatole
�
Permalink
I’m sure, lots of small companies around the world got goose bumps after hearing this loud announcement that Adobe offers $100M in venture capital for making killer apps for Apollo. MAX excitement is over, and let’s get down to business. To put it simple, “Show me the money”.
We at Farata Systems have some ideas of useful applications that we could have developed should we had more time and resources. Typically, to get funding, you need to put up a business plan together and show it to someone. To whom? Anyone knows the URL or any other means of claiming a slice of this Rich (as in $100M) Internet Application Pie?
Thanks,
Yakov
Permalink

The term Rich Internet Applications (RIA) was introduced by Macromedia back in 2002. To the best of my knowledge, RIA is a combination of low-cost deployment model of the Web browsers and networked platforms and a rich user experience that is at least as good as with today’s desktop applications. In addition to this, RIA do not require entire Web page refresh for updating their data, which translates to much faster response time and more efficient utilization of the network bandwidth. Think of a globally available rich client-server application.
Regardless of when the term was introduced, first RIA applications were born as early as 1995, when Java language has been created. Initially, Java became popular because it has presented small downloadable Java programs called applets (remember the dancing Duke?), which were created with Java AWT (and then Swing) libraries and ran in the Web browser’s Java Virtual Machine (JVM). Ironically, this technology that made the Java language popular, was pushed back, and today Java shines mostly on the server side and in mobile devices.
In 2004, yet another catchy term Web 2.0 was coined by Tim O’Reilly. As of now, no one has clearly defined what makes a Web site to qualify for this term. If someone sees a cool looking Web site, s/he calls it Web 2.0. But the idea of marking better looking products with the version 2.0 , is pretty popular these days. Often, it refers to social engineering sites that allow people to collaborate and build the content of the sites themselves.
Wikipedia offers a lengthy article about Web 2.0 that may give you some idea of what this term means.
I wonder if anyone can provide a definition of Web 2.0 in one sentence? This is one of the fuzziest terms I’ve ever heard.
In my opinion, “Web 2.0 defines any cool highly-interactive Web application of the first decade of the 21st century“.
It goes without saying that Tim O’Reilly is a good businessman, and while I was trying to come up with a free definition that people would understand, today O’Reilly has announced availability of a special report called Web 2.0 Principles and Best Practices . Sounds great! The only little problem is that this one-hundred page report cost $375 USD. Ouch! I’d like to read it, but can’t afford it.
Here comes the new one: Web 3.0 is referring to a semantic Web… Do you know what this means? Anyone?
Yakov
Permalink
We are publishing a set of three articles (excerpts from our book) in ColdFusion magazine (October, November and December) on advanced DataGrid techniques. Let the name of the magazine not mislead you – thes articles are written for all Flex developers, regardless of what has server-side technology they use. Here is the url to all code samples from these articles:
http://samples.faratasystems.com/AdvancedDataGrid/index.html
Please note that source is available on the first page only. Also, was deploying in the rush – with debugging player you might see message boxes asking for debugger – just cancel them.
Enjoy,
Anatole
Permalink

While the term Ajax was introduced in 2005, the technique of using XMLHttpRequest object was known since 1999 (this object became available in Internet Explorer 5). But up till now XMLHttpRequest object was never standardized by World Wide Web Consortium. This technically means that each Web Browser vendor can implement it differently.
Such Internet giants as Google, Yahoo, Amazon started using Ajax in their applications, which brought interest of business application developers who always wanted to make their Web applications less static and minimize page refreshes. A discussion on usability of Ajax for business applications is out of the scope of this article.
When I was learning how to work with AJAX, I went through a number of 101-type articles. The biggest problem with these tutorials is that the authors are trying to explain several things at once, which is confusing. I’ll try to offer you a very simple example of an Ajax application that will illustrate the “refreshless” nature of Ajax. Here’s a simple HTML page:

Click on the link, and the text area will be populated with the content of the server side file, which in our example has the text “Hello from the server!”
What’s the big deal? There is no entire Web page refresh! The XMLHttpRequest object sends an asynchronous request to the server, gets the data back and changes the content of just one object on this HTML page – the text area.

<form name="myForm">
<a href="http://yakovfain.javadevelopersjournal.com/how_the_ajax_magic_works.htm">Read more...</a></form>Yakov
Permalink

After attending half a dozen conferences this year I took a break and did not go to MAX. I check MXNA blog aggregator daily, but finding useful info is not easy. This is how a typical blog looks like. Yo man, it’s so cool! I’m going to MAX in three days! Two days till the conference… One…I’m in the airport. My flight is delayed. And again. And again. Finally I’m up in the air. What happen to the beer? Five bucks? You gotta be kidding me. That’s a bummer. The good news is that now they allow three ounce shampoo on the plain. I should not forget to take a dozen of these little shampoo and body lotions from my Venetian hotel room. By the way, anyone knows what the body lotion is for? Is it supposed to be used while in shower or after? There is no instructions on the bottle. Need to check Wikipedia…
I’m in Vegas! They gave me this military bag with some promo junk. Let me throw it away real quick. This bag is going to be for my cousin Vinni. Need to pick up a couple of XXL T-shirts on the vendor’s floor for my ant and mom.
Almost forgot about the Flex/ActionScript posters! Here they are! Yep, they are free! Adobe wanted to sell them for ten bucks each, but the entire blogosphere said, “Ain’t gonna buy no stinking posters for ten bucks”. I like Adobe. They always listen to the community, and now these great posters are free. This poster discussion is the most popular subject of the week at mxna. Finally I can get rid of this old J-Lo poster in my cube. She’s not that hot anymore.
Let me check the mxna feed and see what other guys are blogging about. Lemme see…Max is so cool…Cool is Max… Is Max Cool?…Adobe has released Flex Builder 2 for Mac OS X. Is there such thing as Flex Builder 1?
Several guys are leaking. They are leaking this tomorrow’s opening keynote. Everyone’s saying that we should be there at least for the first ten minutes. Some Blue Guys are giving either a demo or a show. I need more T-shirts.
My schedule for tomorrow is finally shaping up:
8:30-8:40 – keynote. Ben Forta hits 3 millionth mile spreading the good word about ColdFusion. I hope he’s in American Express miles award program. Ben, Bloomingdales gives away gift certificates: $1 for each hundred Amex miles. Your wife deserves these thirty grand! I have great respect of this man, really!
100K Flex developers. I wonder how they count? Is this just a number of downloads? Since Flex framework is free, you can’t even count sold licenses now. This raises one more question. The MAX book store was carrying 60 copies of the Flex Training from the source book, which is the only Flex tutorial available today and you can’t but it in stores yet. Hello Adobe marketing! I guess you’ve never heard of 100K Flex developers. No worries. The store promises another 40 copies of the book for the day 2. Round of applause to the newly hired Adobe Senior VP of marketing…I guess she needs some more time.
8:45-9:30 – hit some slot machines to warm up
9:30-10:30 – Black Jack table
10:30-11:15 – I’m presenting on Flex 2 tips and tricks
11:15-2PM – Roulette table
Hmmm, if you use the random number generator from ActionScript and the PieChart component from Flex Charting, you can easily emulate a roulette table! I just need to learn how to spin it! Should I register a new startup Online Flex Gambling right here in Vegas or Delaware is still the best for incorporation? I’ll need to create a number of skins for the roulette, a couple of transitions effects for showing the winning number, add some audio, which is piece of cake in Flash Player.
2:15 –4PM Hit the vendors floor. Do not get intimidated. Like the design of this T-shirt? Just stop by the booth, introduce yourself and spend five minutes listening to the brouhaha about how the product XYZ will revolutionize your life. Get the T-shirt and move to the next table. Look at these nice little glowing pens! Aren’t they something? Just give these vendors your business card and bring home a couple of pens for your kids. You’ll sure get this annoying phone call from their salesman in a month or so, but it’s in a month… while your kids will start enjoying these pens next week. Daddy came back from the business trip! What did you get for us? Look at this lady in red: she carries a huge bag of freebies and brochures. Trust me, she’s not going to read them. In the best case scenario, she’ll bring them to her office after MAX. But most likely she’ll leave them in the hotel room instead of tipping the maid.
4-5PM Attending a session on E4X. I need to learn how to write an RSS feed.
OK, Create XMLListCollection, declare a Filter object on it. Got it. The call to refresh functions will actually remove unwanted blog entries. How many mxna aggregates? More then 900? I’ll keep a couple of dozens in my feed. Where Celine Dion is singing? In Caesars? E4X rules! Flex 2 rules! Flex rules 2! Adobe is cool! Can’t wait till MAX 2007!
Yours truly,
Yakov
P.S. There are two bloggers that take good notes at MAX: Jen deHaan and Tariq Ahmed Thank you, guys!
Permalink

As a tribute to MAX2006, we have uploaded the latest release of our open-source daoFlex code generator and library.
What’s cool in this release? We now support complete data synchronization via Flex Remoting. Here is how: we’ve created a ActionScript class DataCollection that descends from ArrayCollection, but it is “destination-aware” and has its own methods fill() and sync(). DataCollection knows how many elements have been modified, created, deleted, etc. and can manipulate them freely.
ActionScript class BatchService allows sending updates done to multiple DataCollections in our batch. We wrote a small BatchGateway destination which applies such batch as a unit of work (JTA transaction). More, you can batch arbitrary remote calls, say invoking a stored procedure in the same transaction. And watch this: you can do this without writing a single line in Java, except defining annotated abstract classes.
So now you can use Flex Remoting for your data synchronization with back-end on par with Flex Data Services. These technologies are complementary to each other. Use Flex Data Services when you need the server push and pagination. For all other use cases Remoting is sufficient. Classes generated by daoFlex are universal for either solution. You take the side, we will supply the ammo
If you are in Vegas this week, I’ll be showing it in action at MAXUP.
Victor Rasputnis
Permalink

Ten years ago I’ve been doing PowerBuilder and my mentality was different: first, I was the best friend of business users, and second I did not really worry about what’s under the hood. I could do stuff quickly, or using the modern jargon, I was an agile programmer without even knowing this (on the same note, lots of people were creating Ajax applications five years ago without knowing this, but it’s off topic). I’d ask the business user Joe, “How do you usually do your business, what would you like to have on this screen, what step do you do after this step?” Most likely Joe did not really know, but I’d still give him a wide American smile: “No problem, I’ll come back tomorrow and will show you something”. Mary, yes, you, “What’s the most important word in my last sentence?” No, Mary, not “I’ll come back”, but TOMORROW. Not next week, not next month, but tomorrow.
With DataWindow component it was easy. I did not have to pull Joe’s teeth, I was able to create a working prototype in a day, show it to Joe next day, his glassy look all of a sudden would become friendly and understanding. Now Joe was back in control: “No, Yakov, you did this part wrong, I want it differently”. No problem, Joe, I’ll see you tomorrow. Mary, what was the most important word in my last sentence? Good girl, Hasta maniana! I did not really know how DataWindow worked, but I trusted this component. PowerBuilder used event-driven programming model, which was clean and simple. An object A triggers an event XYZ on object B, and this event can carry a payload – the data that the object B needs to operate. Using the modern jargon it’s called Inversion of Control or Dependency Injection design pattern. Whatever. What’s important is that the object B does not know about the object A. Loose coupling in action.
Then I became a Java programmer, and my mentality have changed. Big time. I realized that the user’s screens are not that important, because I have an intimate knowledge of how programs work internally. Screw users. I’ll spend majority of my time designing a multi-tier system that does not really depend on any specific screen and is universal. Joe still asked me, when is our next meeting? In a month. Mary, do not raise you hand. I see that you know the most important word here. Why in a month? Because I could not do a decent prototype sooner (Java folks, easy, easy – Matisse was not even in the picture yet), and more importantly, we started to make fun of PowerBuilder or Visual Basic programmers who were thinking screens, while us, cool Java gurus, knew how the motor worked inside! These guys were enjoying a ride and counting cup holders, while we were thinking sparking plugs and combustion chambers. We were enjoying the process of programming in itself.
There is this Russian stand-up comedian Mickhail Zhvanetskiy, and one of his excellent phrases was “Who cares about the soup, when so much is going on in the kitchen!”
Now, with Flex I started to care about the soup again, because I can. I can change the prototype twice a day, and Joe does the same with his business requirements. No six-freaking-sigmas documentation. Napkin on the knee is back and it works. I’ll give the final OK to my server side Java team only after Joe is 100% happy.
Besides, with Flex I can have the best of both worlds: the source code of the Flex framework is available, I can learn how it works inside and override it (not always it’s as easy as it should be, but it’s doable).
Working with Flex promotes agile development. If you do not know what it is, get a really good book Agile Java Development with Spring, Hibernate and Eclipse. This is one of these mis-titled books, which has not much to do with Spring, Hibernate and Eclipse other than the fact that it comes with the working sample application written with these tool/technologies. It presents an excellent overview of the development process in an enterprise Java shop. You’ll learn how to set up the environment, gather business requirements, and build the project deliverables in agile way.
Dear user, I’m your friend again! Now I’m as flexible as Flex can be. What do you want me to change?
Permalink

I’ll be teaching a hands-on Flex 2 class at NYU starting on November 9. It’s a 5-session evening class that will run over five weeks, which is a slow-pace way to learn how to create RIA with Flex. I still did not decide on the text book to recommend to the students for purchase.
Since I am Adobe Certified Flex instructor, I’m allowed to use Adobe’s original courseware. It’s a well written manual with great labs. The only thing is that the courseware may be a little expensive for students – need to talk to Adobe.
The other choice is O’Reilly book “Training from the Source“, but it’s printed version is not available yet.
And the third choice is to use three chapters of our upcoming book “Developing RIA with Flex and Java“. While this book is not a tutorial, it has beginning chapters where we just create a bunch of really small applications demonstrating various techniques/styles of programming. This “just-do-it” approach works well if there is an instructor in the room. The book is not printed yet, but I can create ten-page handouts. We’ll see.
NYU has already signed me up for a similar course in April 2007. There will be plenty of printed materials on Flex by the next Spring. I enjoy teaching programming and am looking forward to it.
Yakov Fain
Permalink

There is this blog and a nice looking demo showing how AJAX can happily live together with Flex charting. This vendor’s AJAX grid component is populated with the data first, and then using FABridge the data is being passed to the Flex Charting component. Typically blogs demos like this get a number of Wows , and I expect several “Cool, man” comments to this blog within the next day or so.
Since the blog authors have provided the decription of how this demo was made, I’ve read it and these are some of my questions/concerns.
I understand that these guys need to promote their AJAX grid component, and that’s why they’ve published this blog, but let me ask you this: if I’m planning to pass data to Flex components anyway, why on Earth not just use Flex Data Grid in the first place?
Then authors honestly admit: “To ensure that the details grid is still fast, we only render the part of the dataset that the user is looking at rather than rendering all 1000 records say, which can take a long time when you use the DOM innerHTML property.” That’s right guys, and instead of jumping through various hoops to overcome such issues, just use Flex DataGrid – it would be much faster.
Keep reading…
“All of the sales data is transported from server to the client using Ajax, but subsequently massaged using XSLT and rendered using the FABridge and Flex Charting 2. This approach is particularly attractive since it enables us to preserve the way each tier in our application works as an Ajax application, and simply extend the application to include Flex.”
If you’d use just Flex, you would not need to use XSL transformation to pass the grouped data to Flex. After doing your grouping on the server side, and sending the data to Flex collection once, and using data binding both controls would be populated.
Guys, I really wish you all the best in selling your AJAX grid, bit I’ll be honest with you: I won’t buy it. And you did not convince me that this demo is the right use of FABridge.
This is a very good demo of bad practice.
Regards,
Yakov Fain
Permalink

ActionScript 3 allows a function to have a variable number of arguments by using so-called … (rest) parameter. Ellipses followed by the name represent an array parameter that can contain any number of comma-delimited arguments:
public static function calcTax(… taxParams):Number{
for (uint i=0; i< taxParams.length; i++){
trace(taxParams[i]);
}
}
Java programmers may find the … (rest) similar to the varargs notation. You can mix the … (rest) with other function parameters as long as it’s the last parameter listed.
Unless you use the rest parameter, AS3 creates in memory a special object called arguments, which is an array that include references to each of the arguments and a reference to function itself (arguments.callee). AS3 allows you to call a function with more parameters than were included in the function declaration, and each of the parameters can be access by using the arguments[i] notation.
Here’s an idea of using … (rest) parameter to overcome the absence of overloaded constructors in AS3:
public function MyCLass(…args) {
switch (args.length) {
case 0: constructor1(); return;
case 1: constructor2(args[0]); return;
case 2: constructor3(args[0], args[1]); return;
…
} }
This sample covers the case of constructors having different number of parameters. But if you want this solution to work with functions having the same number of parameters but different types, you’d need to add the type check to each of these cases above, i.e.
if(args[0] is String) {
//do one thing
}else if (args[0] is Number){
// do another thing
}
Permalink
Today’s assignment is to be able to run a Flex application against different servers (dev, uat, prod) without the need to recompile SWF. It does not take a rocket scientist to figure out that the URL of the server should be passed to SWF as a parameter, and we’ll do this by using a special variable flashVars in HTML wrapper. Flex documentation suggests to include flashVars parameters in the tags Object and Embed and read them using Application.application.parameters in AS3 code. At the time of this writing this does not work. But as the ancient saying goes, “Adobe closes one door but opens another”. Let’s get familiar with Flex code:
Read more…
Permalink
Just finished writing an article called “Polymorphism Without Interfaces”. I challenge you to review and explain the code below:
for(var i:uint = 0; i < workers.length; i++) {
var p:* = workers[i]["increasePay"];
output.text+=p==undefined?”no luck”:p(5);
}
The person who writes the best explanation, will get a free copy of my e-book “Java programming for kids, parents and grandparents “. I’m sure people understand the syntax of this code snippet, but I’m looking for an explanation of WHY it’s written this way.
Good luck,
Yakov
Permalink

I picked up a growing concern in flexcoders forum messages related to the need of itemRenderers use to do simple things – like changing the color of the field in DataGrid depending on the column value or things like that. Using the terminology from the forum, it is like “hunting a rabbit with elephant gun”.
So, let us switch the target. You want that customization functionality inline, with as little glue as possible. If you want common functionality in most of your controls, go to the lower level. DataGrid control has itemRenderer property to specify the factory used by all the controls on the DataGrid.
Add that to the previous post (http://flexblog.faratasystems.com/?p=91) – and you can have declarative way to add any behaviour to the datagrid columns. Here is my post from FlexCoders back in July showing performance of run-time styles implementation within DataGrid (case 3). Please note using formula checking the salary range for run-time colors styles:
case 1 : basic grid – no formatting or styling
case 3: typical usage of formatting and styling – IMPLEMENTED VIA RUN-TIME CSS AND COMPUTED EXPRESSIONS – very straightforward code in KISS paradigm. Use right mouse button to see the code for examples.
Personally, I hate big guns, but with this one you can safely offload most of run-time styling and customization to the BA staff while maintaining control of the implementation and performance.
And the clients get code that is smaller, simplier to read and maintain
Enjoy,
Anatole
Permalink

In Java, if you’ve created an object from a particular class, you can use only properties and methods that were defined in this class. For example, if the following class:
class Person {
String name;
}
you can only manipulate with the name property:
Person p = new Person();
p.name = “Joe”;
System.out.println(p.name);
ActionScript calls such classes sealed, but it also has different animals: dynamic classes, which allow you to programmatically add new properties and behavior to classes during the run-time. Just add the magic keyword dynamic to the class definition:
dynamic class Person {
var name:String;
}
Now let’s add dynamically two variables name and age and the function printme() to the object of type Person:
Person p= new Person();
p.name=”Joe”;
p.age=25;
p.printMe = function () {
trace (p.name, p.age);
}
p.printMe(); // Joe 25
You do not have complete freedom though: you can dynamically add only public properties and methods. Of course, nothing comes for free and sealed classes are a bit more efficient in terms of memory consumption, because they do not need to create a hash table to store the properties and methods that are unknown during compilation. Another obvious restriction is that dynamically added functions can’t access private members of the dynamic class. Read the article Programming In Style or an Elevator Pitch to see how by just declaring standard Flex component dynamic, the your code becomes more simple and elegant.
In AS3, any function can be attached to a dynamically created property of a dynamic object, for example
function calcTax():Number {…}
var myObject:SomeObject = new SomeObject();
myObject.tax=calcTax; //add the tax property and attach the function calcTax()
var myTax=myObject.tax();
The delete operator destroys the property of an object and makes it eligible for garbage collection:
delete calcTax();
myTax=myObject.tax() // generates an error
Some of the Flex classes were defined as dynamic, i.e. Object, Array, MovieClip, NetConnection, TextField, and others. At the time of this writing, subclasses of dynamic classes are not dynamic by default.
Because of this, you may run into an ugly run-time error: imagine a sealed class S that extends a dynamic class D. If you create an object as
D myObj = new S(), an attempt to add a propery to myObj will produce a runtime error because the variable myObj points at a sealed object.
Let’s do a quick test. Create a new project in FlexBuilder and select ActionScript project as its type. Enter AS_Only_Project as the project name. In a couple of seconds you’ll see the auto-generated code that looks as follows:
package {
import flash.display.Sprite;
public class AS_Only_Project extends Sprite
{
public function AS_Only_Project()
{
}
}
}
Next, create a new class called D and check odd the Dynamic checkbox in FlexBuilder pop-up. You’ll get this class.
package {
public dynamic class D
{
}
}
Now, instantiate and test the dynamic nature of the class D by adding the constructor
public function AS_Only_Project()
{
var myD:D=new D();
myD.favoriteBand=”Pink Floyd”;
trace(“Favorite Band=”+myD.favoriteBand);
}
Run this application in the debug mode, and sure enough it’ll print
Favorite Band=Pink Floyd
Create one more sealed class called S inherited from the dynamic D:
package {
public class S extends D
{
}
}
An attempt to add properties on the fly to the instance of the class S fails miserably as expected:
var myS:D = new S();
myS.favoriteSinger=”Alla Pugacheva”;
trace(“Favorite Singer=”+myS.favoriteSinger);
ReferenceError: Error #1056: Cannot create property favoriteSinger on S.
at AS_Only_Project$iinit()[C:\TheRIABook\eclipse\AS_Only_Project\AS_Only_Project.as:13]
If you’ll try to instantiate your sealed class as follows:
var myS:D = new S() as D;
I have two news for you: the good news is that it compiles, and the bad (and expected) news is that it generates exactly the same runtime error.
Most likely Adobe’s gonna hire a hitman and kill me after the following statement, but I’m going to say it anyway (at least you’ll now who to blame)… May be I should not?…Life is so good, and I’d like to witness the success of Apollo…I’m sayyyiiiinng this:
If you need to add new functionality to one of the existing standard Flex components (buttons, comboboxes and the like), do not bother extending them and creating new classes. Just create one simple empty subclass with the keyword dynamic and instantiate and add new properties on the fly as needed, as was shown by the Smalltalk student in this article.
A sound of a silenced pistol shot. Curtain.
Yakov Fain
Permalink

Your old programming habits influence the style of your programming in any new language you learn. Let me illustrate my point using Flex.
We usually run Flex training for private clients of Farata Systems , but once in a while we teach public classes for people with different programming background (my next Flex class at New York University starts in November). All students usually get excited by Adobe Flex, but each of them comes with different understanding of how to do things right. So I’ll tell you the story that might have happened in a real life, but first, let me remind you of an old Indian tale about seven blind men and an elephant . In short, one blind man touched the elephant’s head, the other one touched the tail, someone was by the leg. And each of them visualized an elephant differently based on what he touched…
My students usually arrive to the classroom early, but this time three seats were empty. Five minutes later I got a phone call from one of them explaining that they got stuck in the elevator and will stay there for another fifteen minute until the serviceman arrives. Needless to say that each of them had a laptop (do not leave home without it), so I gave them a short assignment to trying to help them use this time productively.
Here’s the assignment: Create a Window with a Panel that can resize itself by clicking on the button +/- that is located in the right corner of the panel. One click should minimize the panel’s height to 20 pixels, and a subsequent one should maximize to 100 pixels, and so on.
Read more…
Permalink

Well, not quite, but (hopefully) we are getting closer.
I have been following closely on the progress of Apollo and whatever news I could find on inroads it makes in different types of applications. It seems that more people who are lucky to get their hands on it are switching from Web applications to disconnected or partially disconnected ones ( http://www.onflex.org/ted/2006/09/svn-client-with-flashnetsocket-in.php is a good example). In other words, we are moving to desktop applications again – this time desktop 2.0. As history repeats itself, let us recap.
Desktop 1 arrived as intelligent and jazzy replacement of mainframe terminal. Terminal emulation has been major function within the first 10 years of Desktop 1 era. Few “killer apps” (1-2-3 and WordStar) changed the way people see computers. You could own your private data. And on the way, new set of technologies named client-server emerged – reflecting relationship between the new and the old. The main selling point of that was the ease of opening up server data to the end-user. And it did – taking away terminals and mainframe UI along the way
The server world fought back – we had 10 years of JEE and semi-intelligent browser terminals
We are getting really close to “client-web” revolution – this time making all the data in the world available and personal in the same time. The trick is to remake all killer applications of the past in a different context. In case of word processor or spreadsheet for me collaboration and privacy are more important then spellchecker (and it probably shows).
Here is what I think the game is going to be. Making application development simplier will get us half way there. From a personal experience, I believe that a small team of developers can create any “Office” component in Apollo before it ships. The other half is to put end-user in charge of “experience” they want. Here is an example - a lot of browser handicaps were “fixed” by toolbars and components. Making RIA platform and applications capable of cross-integration is going to be vital.
There is no question in my mind that working on AJAX and such is just a waste of time. Actually, I personally gave up on AJAX about 2 years ago (just before it got “named”). Microsoft was contacting software vendors who developed browser enhancements to see what features of their product can be used in IE7. We offered bunch of low-level technologies to cure JavaScript/browser problems - reliability, performance and productivity. The answer was that Microsoft is looking beyond the browser as the next Web platform.
This month we will finally start releasing commercial products for RIA platform. I can only assume from what I see and hear that quite a few others are on the verge of product delivery. If you have interest in making Flex/Flash/Apollo platform succeed, you better get cranking on the next killer desktop app.
PS. I am starting small pet project on Flex virtualization. Quite often we need preconfigured server/application (not just Tomcat, but mySQL, certain messaging, workflow, etc products) to be available to the clients or people going through training here at the company. I was thinking of VMWare nano-vm appliance that could be dropped on any desktop or server for instant deployment. If you have similar requirements and would like to participate, please drop me a line – we can always use good developers and beta testers.
Sincerely
Anatole
Permalink
One piece of this week’s code seemed to be “typical” for UI in List/Tree control – overlay element that needs to be shown on the selected row(s)
Here is the used approach:
1. Inherit new control from the Tree or List.
2. Define overlayRenderer getter/setter as ClassFactory
3. Override drawItem method of the control. You will need to look in the parent code, and make “if” statement on selected argument – if true, show or make new instance of overlay item and add it as a child to the item being drawn, if false remove/make invisible, and position it within the item.
Upside of such approach is that you do not have “column” of the “overlays” in the tree, but rather just one or few (depending on selection mode)
Enjoy,
Anatole
Permalink
|