|
|
Archive for March, 2011
I’ve recorded our chat with my colleague Anatole Tartakovsky who leads the mobile development at Farata Systems. We were discussing approach for migrating existing legacy enterprise RIA to these shiny iPads, Xooms and the likes. You can listen to this podcast on any MP3 player, or simply press the icon POD at my NO BS IT podcast terminal to start playing on the device you’re using now.
If you are attending the 360 Flex Conference in Denver, attend Anatole’s presentation on this subject.
Permalink

Flex comes with a uses well-designed and extensible event model that’s based on the standard Flash Player’s events. On the other hand, there is an open source alternative solution created by Robert Penner, a well-respected software developer. The replacement is called AS3 Signals. Below are some quick notes comparing standard Flex events with AS3 Signals. I’d appreciate if the readers could add more pros and cons to this laundry list for the benefits of the Flex/Flash community.
• There is no need to instantiate each signal, whereas creation of new instances is required with Flex events (the DynamicEvent is an exception, see the following blog for a sample use).
• AS3 Signals are more strongly typed than events, which seems to be appealing to software developers with Java background, but signals still would not indicate data-type errors during the compile time – they’d produce an error during the runtime only, which is not a big advantage.
• Using AS3 signals makes sense in the applications where lots of events are being dispatched in the background, e.g. a real-time trading application or a game with heavy use of animations.
• AS3 signals have less overhead than events, for example, not every application needs the support of events during the event capture stage, and such a standard feature as event bubbling? Custom Flex events must extend the class EventDispatcher, but with signals you can use composition vs. inheritance.
• AS3 signals support adding a signal listener for one time processing. The function addOnce() will trigger the event once and there is no need to remove listeners as there may be with Flex events.
• With signals you can dispatch many arguments of different data types. This sounds like an advantage, but with signals changing the API in related classes can mean changes in the signal processing code, which is not the case with events that are dispatched with a payload in a form of a DTO.
• While Flash Player events are the part of the Flex framework, AS3 Signals is a third-party product that can be considered as yet another moving part in already long laundry list of the software products contributed to your product by various vendors.
To summarize, I’m neutral to the use of AS3 signals at this point. Would appreciate if someone would contribute compelling arguments for the use of this light-weight and simple to use addition to the toolbox of Flex and ActionScript developers working on enterprise RIA.
Yakov Fain
P.S. AS3 Signals don’t have to be used with any particular Flex-based framework as some people seem to believe. Hint: the name of this framework starts with R and refers to the limbs of a non-human being.
Permalink

I am very concerned by Apple’s stance on application platform control at this point. They are at the point when the competition is actually caught up technologically and in the price segment with Android. In my opinion, their next step should be to promote VMs on iPad platform thus allowing better hardware AND choice for enterprises. That would really drive iPad acceptance by enterprises as it would allow clean separation of business and consumer functions. I would argue it is needed to allow Apple to sustain the price war and command a higher price without really driving the quality of the hardware in the ground.
How long can you keep the lock on the platform? My 11 year old son rooted his iPhone 4 within a week after getting it, so did all his classmates. And he is probably one of the most loyal Apple fans I know with most of his toys running on OSX platform.
So far virtualization of iPhones and iPads was not practical – those were underpowered devices built for a very short lifespan. Android on iPhone 3 performs really bad, but it is almost usable on iPhone 4. With iPad 2 and iPhone 5 we can expect 2+ years of service before being forced to replace these devices, which is enough for the enterprises to consider them as viable business tools.
For the first time in the last 3 years I am unloading Apple stock – almost all of it – as I believe that their current strategy is slowing the long lasting success. There is the point when the pride of job well done turns to hubris and Apple is crossing that line.
Sincerely
Anatole
Permalink

If you already upgraded your Flash Player to 10.2, take a look at this little demo, which has three Flex DataGrid components. Two of them on the left are good old mx:DataGrid and the one on the right side is the extension of new spark:DataGrid available with the recent Flex SDK 4.5 drop.
All the UI controls share our custom implementation of IList/ICollectionView and are able to show 4 million records. Actually, with mx:DataGrid you can go even further and display 10 million records. As a side note, if you stick to MX-only components, the example may be compiled with Flex SDK 3.4 and work with older version of the player.
The spark:DataGrid is a more complex case. First, unlike with MX equivalent we have to subclass original component to add scrolling event. Second, it seems that Spark GridLayout has overflow errors when calculating layout for the dataProvider of approximately 5 million records and above — hence the limitation of mock data set size in demo.
Finally, there is an error with fast scrolling using scroller thumb: after thumb-scrolling spark:DataGrid it’s necessary to move up/down with scroller’s arrow keys otherwise Spark grid would repaint itself after scrolling of mx:DataGrid-s. We are working on this issue – most probably our extension either misses a thumb scroll event or needs to be better synced with the scrolling events.
Don’t try it at home with the default IList implementation (ArrayList) – it’ll eat up all your memory.
Valery Silaev
Permalink

Any outsider who had to work with insurance bureaucracies quickly develops very strong feelings to endless paperwork, fine prints, endless riders and questions. It compounds with the fact that most of information you need to enter is public, not readily accessible or redundant.
Adobe makes probably $1B/year on licenses of PDF technologies. People developed love/hate relationship with electronic documents. The love portion is mostly caused by the fact that you can view PDFs almost anywhere in a consistent printable format. You hate PDF while trying to use it on mobile devices, try to implement the data entry there, or find the money for the high fees Adobe charges to make your documents editable by consumers.
In this article I will talk of what seems to be inevitable transformation of PDFs within the next 2-3 years. But first, lets step back 5+ years, when Macromedia and its Flash technology didn’t belong to Adobe.
At that time, Macromedia released product called FlashPaper. It would convert any printable and/or Office documents into lightweight flash streams preserving formatting and pagination. FlashPaper had a lightweight chrome to facilitate zooming, pagination and printing – it was directly competing with most uses of the Acrobat at the time. The product was discontinued about 6 years ago, and Acrobat as de facto standard went in the opposite direction becoming heavier and replacing most of the internal UI with flex.
Fast forward to today when we have low power devices with smaller screens – the Acrobat is way too big of a product for them. Adapting to different CPU/OS /screens take tremendous amount of time, leaving developers with a wrecked product. In iOS, PDFs are processed by a rudimentary Apple Reader, which has no features Adobe worked on in the last 5 years. Even Android has significant limitations – no scripting and forms functionality.
The only viable solution is to have Acrobat PDFs served on the top of the VM (yes, you guessed it right, Flash VM). With SWFTOOLS (PDF2SWF), an open source solution PDF to SWF converter you can embed a PDF in your Flex application. It converts pages of PDF into frames of movie clip. If you need the entry fields, a bit more work is required. You need to parse the PDF for inputs (type, geometry and binding) and generate “skin” for the SWFs thus providing a data entry layer.
Of course, eventually Adobe will have a PDF reader written in Flash. Till then we would have to use the above approach to allow PDF integration on both Web and Android platforms
Sincerely
Anatole
Permalink

BBC has a nice way of presenting news – I believe it’s called “No Comment”. The viewers can watch some happenings in silence without hearing any comments. I’ll borrow this technique and will present you a Twitter “conversation” that started after I made a statement about MVC and Dependency Injection frameworks in Flex. I’m planning to prepare a presentation explaining my position for the Fourth Annual Farata Flex Symposium that will take place in June in New York City, but for now, enjoy the twitter conversation without comments. I’m going to use abbreviated Twitter nicks of people who responded to my twit – the rest are original twits.
@yfain There are 4 types of MVC/DI Flex Frameworks people: creators, evangelists,users,and myself who can’t get what are they for. #flex
@b… What?
@b… again, what?
@bp…Ummm… I think you’re probably a creator if you’re not one of the others. Over and over again, too.
@_… Amen 
@h…You don’t use it or not recommend any flex framework?
@j… DI itself or just the frameworks? I kind of agree with you on the frameworks, I try to only use the [Inject]
@yfain Not in general, specifically in Flex frameworks
@f… count me in 
@j…In my case, I (almost) refuse to develop without MVC / DI in client-side development.
@bp…They’re also great for learning… every MVC/DI framework I’ve used on any platform has taught me something new and valuable.
@_… The Flex Framework Frameworks only result in higher dev costs. Complexity up, Qualified devs down. 
@yfain Exactly, Ted 
@_…That said, I am finding that robotlegs might be the exception… 
@yfain While MVC/DI frameworks can be good in Java EE world,they damage minds of Flex/AS developers. Pros: they keep consultants longer on billing.
@b… I see – I must have forgotten, best practices are only for Java. How silly of me all this time, leaving behind maintainable code…
@bp…Can you give an example of bad habits or practices we’re learning?
@yfain Wrong. You’ve forgotten that Java is a language while Flex is already a framework with a great event model.
@b… wrong. flex as a framework doesn’t address the need for application patterns. the free for all approach doesn’t cut it
@neosavvy It is true. Vendors use design patterns to hide low qualification and prove legit design to clients who don’t know how to argue.
@m… you honestly can’t see a need for DI? Ever write a unit test?
@b… yakov’s just out trolling again. Don’t worry about it too much, he’s warned that you’ll “damage your mind” in the process
@yfain what’s wrong with using events instead of DI?
@m… How would you use an event to provide dependencies to an obj? Injection is a means to allow isolation which is a precursor to tests
@yfain An object is listening to events. There are no dependencies.
@n… I find this conversation hilarious because I think the statement “keeps consultants longer on billing” might be true wrt DI in Flex.
@yfain It is true. Vendors use design patterns to hide low qualification and prove legit design to clients who don’t know how to argue.
@n…Isn’t that how Cairngorm got so prevalent? I agree that design patterns may be for the weak minded. Useful for handoff and support.
@yfain De mortuis nil nisi bonum. Speak no ill of the dead
@i… I’d really like to see some examples of the proper way of doing things without frameworks in Flex. Think you could post some up?
@yfain Start here http://bit.ly/dQPywI
Sincerely,
Yakov Fain
@yfain
Permalink
|