Archive for November, 2003

24
Nov

invalidateStyle needs invalidation itself

I’m working on the next version of our component set and implementing all of it’s styles. I was trying to figure out how components knew to redraw themselves when one of their styles change since they don’t seem to subscribe to any style events.

After digging for a while I found mx.styles.CSSSetStyle and notifyStyleChangeInChildren(). Seems a little odd, it loops through every movie clip in the entire application and calls invalidate style based on some criteria. Regardless of criteria, it recursively loops through every movie clip in the entire application.

This is all based on a single setStyle call. So, I did a little testing. I put a trace statement in notifyStyleChangeInChildren, added a bunch of components to the stage, and a few frames later I made some setStyle calls. With one setStyle call, notifyStyleChangeInChildren was called 316 times and with four calls 1260 times.

That’s a lot of calls, and a few seconds of frozen movie. So seems like we need a new setStyle method that invalidates the call to notifyStyleChangeInChildren, which itself just invalidates styles. Or better yet, how about adding in an event interface so we don’t loop through every movie clip but instead only those that use the style we changed.

Oh, and btw, it only loops through clips from _level0 onward. I guess if you load things into _level1 or higher, they don’t update based on style changes.

::sigh::

16
Nov

Come see Macromedia Flex at MAX

Our employer, B-Line Express, will have a booth at MAX to showcase our B-Line Charting Components. We’ll be demonstrating both the currently available 2.5 set and the in-development 3.0 version. This latter version is a complete re-architecture around the v2 framework and supports both Macromedia Flash MX 2004 and Macromedia Flex. If you’re at MAX, come by our booth to check out how our components can be easily integrated into a Macromedia Flex application with code such as follows.

<bl:LineChart
   id="chart"
   x="0"
   y="0"
   width="500"
   height="400"
   title="SampleLine Chart"
   pointType="circle"
   dataProvider="{dataStore.sales}"
   marginRight="100"
   xmlns:bl="com.blinex.charts">

   <bl:xAxis field="Month"/>
   <bl:yAxis minValue="0" maxValue="10" majorUnit="1"/>
   <bl:series title="Tom" field="tomSales"/>
   <bl:series title="Dick" field="dickSales"/>
   <bl:series title="Harry" field="harrySales"/>

</bl:LineChart>
16
Nov

Revolutionize RIA development with Macromedia Flex

Macromedia today announced their newest product, Macromedia Flex. This is the final name for what was previously coded as Royale. This is a great product that Chafic and I have had the privilege to be involved with over the past several months. With Flex it is so easy to snap together all your components with a very straightforward XML grammar. Then you can attach your AS2 classes to control the whole application. It lets you concentrate on the specifics of your application and greatly improves the entire development process.

The hope here is that Macromedia Flex will bring RIA development beyond Macromedia’s current aficionados. Flex is a server-side product meant to be easy for Java and .NET programmers to pick up and integrate into their applications. By using declarative XML syntax and familiar application and form based concepts as well as the OOP friendly AS2 language, Flex is far better for traditional programmers developing RIA’s as compared to Macromedia Flash. With Flex you never need to worry about animation-related concepts found in Flash such as the stage or timeline. This will make component based development even more important in the future.

This expanded market also will be a boon for component developers, which can now be sold to both Macromedia Flash and Macromedia Flex developers.

Macromedia Flex is in beta now and due out early next year. To read more about Flex from Macromedia click here. To apply for the beta program click here.

16
Nov

Why blog aggregators should have language filters

The internet is a wonderful thing. It lets everyone from all over the world communicate with one another. At least, it does if they have a common language.

MAX looks like it’s getting great turnout including international turnout, as is evidenced by the international pings to MAX Bloggers.

Unfortunately, I’m not able to read all of the posts since I’m not educated in German and Dutch and my Portuguese is way too rusty. I guess this aggregator is a good example of why people should build language filters into the aggregator.

Ideally, it would be best to support all languages and let visitors specify which languages they can read and filter out all others. However, if an aggregator is written on short notice, totally filtering for just one language would work too.

RSS has a language identifier for this purpose, so aggregator should take advatnage of that. I’m not sure how many aggregators do filter on language, but I don’t remember seeing non-English posts in the MXNA, Full as a Goog, or FLOG.

16
Nov

Attending MAX, bring your slides!

If you’re going to MAX, you should have received an e-mail with resources including links to presentations, the MAX Cetral App (very kewl), and Intro. Macromedia will not be distributing handbooks this year that have all the slides printed up. Therefore, everyone that’s attending should print up all the slides for the sessions they”ve signed up for and bring them to Salt Lake City.

And while you’re at it, be sure to install the very nice Central app that can show you where all the rooms are and give you reminders for sessions.

It’s Sunday night and my flight is in the morning.. getting excited now! :-)

16
Nov

Multiple versions of IE for testing

I always thought it wasn’t possible to run more than one version of IE on the same machine until i stumbled onto this page by Insert Title Web Design. With the new EOLAS patent issues and other browser/versioning issues, being able to run multiple versions of IE might be handy to some.

16
Nov

Public and Private meaningless in v2 components

When you start working with the v2 core classes, one of the first thing you’ll notice is that nothing is declared as public or private, everything is just defaulted to public. This alone degrades much of the value of OOP and encapsulation and the new static typed compiler in Flash MX 2004 as it relates to v2 components. Well, today I found another problem.

Most of the functions have comments attached to them. Many of these have a comment that says “@private” which seems to indicate the function is private. So, even if the compiler can’t know which functions are intended as public and private, we can find out and program responsibly.

However, some functions marked as private are actually used as public. For example, StylesManager.isColorStyle() is commented as private but is used within UIObject.getStyle().

So how do we know which are really supposed to be public and which are really supposed to be private? We need to read all of the v2 code and cross-reference every function and that will at least tell us how MM uses them. Of course, Flash MX 2006 might be out by the time you’re done figuring it all out…

14
Nov

Getting ready for MAX 2003

MAX will be held next week and Sam and I will be there. Sam has attended DevCon in the past but for me this will be the first. We will be exhibiting our B-Line Charting components so if you want to say hi stop by our booth. We will also be blogging from the event with any free time we can find.

Also, keep up to date with MAX using MAXBloggers which will include our entries and entries from several other weblogs.

10
Nov

ColdFusion Hosting woes

Even though we run nine servers ourselves at various client sites, we also have some small applications spread across four different hosting providers from projects over the years, all on shared hosts. Anyways, we had problems today with two of the hosts.

MediaTemple is sending out letters to anyone who inquires about ColdFusion hosting stating that they no longer support ColdFusion (we saw the letter in a mailing list). So we called to inquire about it and they clarified that they’re no longer accepting any new clients for ColdFusion support but for now they’re still supporting current customers. That doesn’t give us any kind of warm fuzzy fealing about the future so it seems time to drop MediaTemple.

Hostcentric a few days ago decided to move our account to a different server. We have a few really old apps on one of their CF5 servers and these are apps we know have issues with CFMX but the clients don’t want to upgrade. However, Hostcentric moved them to a new server with ColdFusion MX. The kicker, they didn’t tell anybody. They just moved the apps, which we knew wouldn’t work, so now they’re down. These are in-production apps so we’re in the process of migrating these apps on our own dime today to get them back up ASAP. We’ll be dropping Hostcentric as soon as possible.

I’m hoping we move these to our dedicated servers. I’m not sure why we’re using shared hosts ’cause we have had issues with them and when we add up all our different shared host sites, it’s about as much as what we’d pay for a decent dedicated server. We have some sites on HostMySite.com and we’ve been happy with them and have heard lots of good reports.

(knocks on wood)

06
Nov

ColdFusion based time machine

Did you know you can write a time machine with ColdFusion MX? Apparently if you call createUUID repeatedly it will cause you to leap forward in time. Well, really it just changes your system clock a little.

Details and work-around in this new technote.

ColdFusion MX: CreateUUID Increases the Windows System Clock Speed.