Flex2 :: Text Layout and HTML
Hello,
Let’s see here, I have been doing MANY proof of concept designs in many areas of UI visualization. I have to come to a closing conclusion on a very important aspect of the Flash Player that lets me down, html text fields.
I don’t know what it is with text layout and the Flash Players hatred for it but, we need GOOD text formatting tools for the Flash Player!
About 2 1/2 years ago I programmed the XHTMLTableRenderer. This component was about the hardest component I have ever created. Plus, I named it wrong so it was the spruce goose to begin with. I had such an idea it excited me, so I went out on my expedition and started coding. A quarter through the project I realized something; Macromedia isn’t making it easy for me to use images inside TextFields OR even TextFields for that matter.
TextFields as far as I am concerned are the MOST IMPORTANT control of the whole computer interface. So why didn’t Macromedia put Flash’s TextField object on top priority for developing hard core text formatting with images?
Let’s put this into my current context;
I just basically recreated my WordPress blog UI, yes this one you are looking at, in Flex. I was like a kid in a candy store saying, you know how many things I could do like this? Well, then the reminiscent Macromedia voice kicked in and said, no you don’t Mike.
What is this voice? It’s the voice of the old TextField saying, “I can’t measure the embedded tags correctly, so anything you try to do with me Mike is going to fail with flying colors.”. And it did, once I ‘remembered’ that I actually had to do some crazy image tag parsing in my table renderer to get the rows to size correctly (separate image rows).
So another idea goes down like a rocket that was never meant to get off the launch pad.
But wait! This is not the end of the story, oh no there is a happy resolution, at least I think so.
After my heart sank to the floor, my light bulb went off again. It said, “Mike, you are using Flex!, Flex is going to reinvent the internet and desktop, so you have options that know one has even thought about!
OK voice shut up.
What I have decided is that, I was trying to create something HTML in something that is not HTML (Flex). My mind needs to bend and flex to support new ideas of user interface patterns for a desktop world. This thought specifically steams from using images inside text fields.
If I take my lessons learned with object oriented programming and apply them here, an idea pops in that says keep your objects separate. Maybe that is why embedded images are HTML not operating system.
What do I mean?
When you program a user interface in an operating system, you plan modules. These modules play together but, they do separate things. This is the way we need to attack Flex development.
This next 2 years with all the new emerging technologies, is going to force developers to look for new solutions to UI problems. It’s time to ditch past thoughts of layout, text layout and image layout. There are so many other possibilities that thinking in context of HTML is wrong and not intended for Flex developers.
Now, the question is, how do we change the way people store their data.
Peace, Mike
May 29th, 2006 at 11:42 am
Mike,
Thank you for the post, it was very insightful.
In my company, this discussion happens over and over again… What?! Why Flex cannot render properly render HTML tag?
Also, In my previous Flash projects I pretendend to extend TextField object to support propety for the text.
We all seem to be prisoners of the HTML 4.0 based layouts to some extent..
May 29th, 2006 at 1:41 pm
Thanks jabby
Isn’t a blog opinions anyway?
Besides, the world is changing, look I am talking to you!
Peace, Mike
May 30th, 2006 at 3:04 am
Opps, HTML worm had ate my > and < symbols in my previos post.
The correct meaning for one of my sentences was:
Also, In my previous Flash projects I pretendend to extend TextField object to support property BACKGROUND-COLOR for the text.
May 30th, 2006 at 3:04 am
Oops, HTML worm had ate my > and < symbols in my previos post.
The correct meaning for one of my sentences was:
Also, In my previous Flash projects I pretendend to extend TextField object to support property BACKGROUND-COLOR for the text.
June 1st, 2006 at 4:18 am
Good suggestions… I know I will be thinking about new ideas. Still, I can’t be that at ease about Adobe not taking an active approach to fix this. Talking about worms you opened a can of worms for me with this topic Mike. Sit tight.
// begin rant
I have a lot of ideas that I can’t do in Flex because of this. I’ll hoping I don’t have to wait two more years to do something like this. I haven’t had the time to test if Flex textfields can measure text and images correctly but I’ll take your word for it. The main problem for me is how can you create any sort of cms for your Flex app without image support and basic HTML support (i’d say a few more than just the ~5 supported tags)?
The RIA is more than just the front end. In any RIA you actually have 2 projects to complete. You have two pieces of the puzzle that you need to deal with. One is the main site, the main RIA that delivers and shows the content. The second part is the Content Management System or (CMS). This is the place you enter and create the content. Flex has an RTE component but it does not support images.
I read an Adobe developer blog post recently about Web 2.0. He broke it down to Web 2.0 is read & write. My question then is, “How can Flex 2 be or support Web 2.0 without a *basic* RTE?”
// end rant
of course this is just a rant, because at this moment flex builder 2 is not out yet. but still, it would be hard to wait 2 more years.
October 22nd, 2006 at 7:49 am
I am looking for documentation on how to lay out regular document type text with headings and paragraphs and styles in Flex Builder.
Does anyone know a good resource for information on this?
I have searched the help docs and I have tried out a few things like using the HTMLText object (which didn’t work as well as I hoped for). The documentation seems much more oriented towards making application forms interfaces.