Skip to main content
matt_chotin
Inspiring
February 6, 2009
Question

Fx prefix revisited

  • February 6, 2009
  • 72 replies
  • 23035 views
Alrighty, we promised we'd have further discussion about this on the forums, so here we go. Since I think the email system can't handle really long posts, I'm going to post a series of things that I've written up, along with some responses that started among the team. We'll take things from there.

Solving the naming convention with regard to overlapping classnames is especially difficult when you take a number of factors into account. Here are some of the things to consider as we look to address the issue (not prioritized and not exhaustive):

These issues can be attributed to general use and the SDK:
- Flex 4 aims to be compile-time compatible with Flex 3. This means that we cannot rename existing classes nor break major interface contracts.
- Given we can't rename existing classes, what package naming structure makes sense if new classes will overlap with existing.
- How does CSS differentiate between classes with the same local name (class name)
- How will new users understand the differences between Spark and Halo classes, and especially understand when there is overlap
- What should documentation do to differentiate between Spark and Halo controls, and how do we control which page a user arrives at when searching
- How will someone reading code easily understand which control the code is using
- Given the change in architectures, how does someone easily know which architecture a component belongs to
- The number of overlapping controls between Spark and Halo will increase after Flex 4, Spark will receive new controls over time

These issues can be attributed to an IDE (any of 'em):
- How does code hinting work when you have overlapping classes (what can it do to help differentiate)
- If a list of components is in a panel, how do those components get differentiated
- Should a tool warn when components from different architectures are mixed, how does the tool know when such mixing of overlapping components or architectures is intentional
- Should the tool promote one architecture's components over another, or provide user preferences to control promotion, and how flexible do those preferences need to be

Next up: the current situation.
This topic has been closed for replies.

72 replies

Participant
February 13, 2009
Matt, please, think of the kittens!
http://blog.benstucki.net/images/fx-kitten.jpg

Seriously though, thank you for reopening this issue. It means a lot to a lot of developers, and the fact that you're able to listen and respond thoughtfully is a big part of what keeps us engaged.
Participant
February 13, 2009
While very new to Flex, I'm not new to standards, and I'll echo post#26: make development choices based on what's good for the framework as opposed to what's easier for the tools.

And several posts aptly describe a new developer's dismay at the prospect of this fx prefix idea.

Adobe, thanks so much for asking!
matt_chotin
Inspiring
February 13, 2009
The piling on hasn’t really been necessary for the last 3 days :-)  I’m still working things out but will be posting tomorrow.





On 2/12/09 5:17 PM, "Doug McCune" < member@adobeforums.com> wrote:



A new message was posted by Doug McCune (2) in



Developers --

  Fx prefix revisited



Hey Matt,



Any chance we could get an update on Adobe's latest thinking on this issue? A lot of arguments have been made, many of which have been repeated over and over. I'm not sure much more can be said at this point without being totally redundant, but if we knew what the key points that were still pulling you guys in favor of the prefix solution were, then maybe we could address those that still stand.  



I think everyone keeps saying the same things over and over without knowing if those arguments are working. And if suddenly there is some new argument that hasn't been addressed that turns out to be the basis for the decision I think there will be a lot of unhappy devs out there.



Doug




View/reply at Fx prefix revisited < http://www.adobeforums.com/webx?13@@.59b7cdf0/58>

Replies by email are OK.

Use the unsubscribe < http://www.adobeforums.com/webx?280@@.59b7cdf0!folder=.3c060fa3>  form to cancel your email subscription.





Participant
February 13, 2009
Hey Matt,

Any chance we could get an update on Adobe's latest thinking on this issue? A lot of arguments have been made, many of which have been repeated over and over. I'm not sure much more can be said at this point without being totally redundant, but if we knew what the key points that were still pulling you guys in favor of the prefix solution were, then maybe we could address those that still stand.

I think everyone keeps saying the same things over and over without knowing if those arguments are working. And if suddenly there is some new argument that hasn't been addressed that turns out to be the basis for the decision I think there will be a lot of unhappy devs out there.

Doug
Participant
February 13, 2009
@Dusty

> "Want your app to pop up an Alert box? It still uses Halo buttons"

Yeah, I'm sure that the guys that created Java Swing could even agree with you. But for us coming from a graphics background, such scenario gives us the chills.

What's the point of Adobe trying to raise the bar in GUI graphics with Flash/Flex ( and now Gumbo ) if it would allow developers to engage in such a mess as to pop up a Halo dialog over a Spark UI?

It can only make sense from a programmer's point of view, I tell ya.

> " It's not bad, it's a requirement"

Huh? Don't you know that all the worst deeds in History were presented as being "requirements".

It just happened the "requirements" turned out to be no more than someone's "priorities". ;-)
Participant
February 12, 2009
My 2c:

1. It's obvious that anyone who uses custom components must become familiar with namespaces to use them. So my question is: what proportion of flex developers who don't use custom components are you trying to please with this decision? Why must the vast majority of developers suffer for this small minority?

2. I think my introduction to Flex was fairly ordinary - through the tutorials on Adobe's website, reading blogs, and also the book 'Programming Flex 2'. I've always used namespaces from the very first day - they were in all of the examples I looked at - and it has never presented a problem. As soon as you write your very first custom component (day 2?), it's obvious why you had been using the mx: namespace. As the guy who's the Flex instructor mentions above, he never has students who have a problem grasping the concept of namespaces.

3. There's been plenty of adequate solutions to the CSS problem presented above. The one I prefer is if you have, say, a Button selector, the styles will be applied first to a Spark component if there's one with that name, then to a Halo component if there's no Spark component of the same name, and if there's both, you'll have to use a styleName to style the Halo component. This is still clean, won't add any bloat to the CSS or compiler, and will still be a viable solution in the post-transition period.
Participating Frequently
February 12, 2009
I'm gonna chime in that the Fx prefix is a bad idea.

1. I'll be lazy and just say that I agree wholeheartedly with Ben Stuki --> http://blog.benstucki.net/?p=53

2. I'm gonna be doubly lazy and say I'm in the camp with the people that opposed the Fx prefix in the following bug --> https://bugs.adobe.com/jira/browse/SDK-17854

So...my vote is no Fx prefix.
Participating Frequently
February 12, 2009
Peter,

To get specific about the namespaces, I agree with Haykel Ben Jemia's suggestions:

* MXML 2006 language namespace as we know it
* MXML 2009 language namespace that will contain the spark components, halo components that are not yet (or will not be) ported to spark and the remaining language constructs
* Halo component namespace that contains only halo components that are not in the MXML 2009 namespace
* Spark component namespace that contains only spark components (that are not in the MXML 2006 namespace anyway)

MXML 2006 and MXML 2009 namespaces can not be mixed.
Participant
February 12, 2009
I guess I'd prefer classes that don't share the same name, since they're from the same author. If I have two Button classes, and reason for maintaining both, I'll have something in the classname which communicates the difference. SimpleButton, and AdvancedButton.

If I intend to abandon an earlier Button class, for a new one, I'll replace the old with the new, and note the version in comments.

If Adobe has overlapping classes, that are basically the same thing, I suggest adding new functions/properties that give whatever new functionality there is to the old class. Such that old code isn't broken, but new functionality is built into the classes.

Is there something I'm missing?
Participant
February 12, 2009
@Jay
#2: Not only is this not bad, it's required. Want your app to pop up an Alert box? It still uses Halo buttons. Spark isn't completed, and adding more tasks to the queue will only cause more components to drop off the list or push back release.