The Artima Developer Community
Sponsored Link

Weblogs Forum
Hybridizing HTML

27 replies on 2 pages. Most recent reply: Nov 8, 2007 4:40 AM by Bruce Eckel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 27 replies on 2 pages [ « | 1 2 ]
Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Hybridizing HTML Posted: Nov 9, 2007 7:24 AM
Reply to this message Reply
Advertisement
> Another ussue with parsing and analizing - not sure that
> all search spiders capable parse latest Flash content.

What I attempted to show in the article is that by combining HTML content with Flex forms, you can have the best of both worlds. Search spiders will still be able to parse your content.

the metapundit

Posts: 3
Nickname: metapundit
Registered: Dec, 2005

Re: Hybridizing HTML Posted: Nov 9, 2007 10:17 AM
Reply to this message Reply
>Since Flash Player 9 this is no longer true.

Ah - that's what I remember reading - and with the benefit in the future the releases for Linux should be more or less synced up with the releases for windows.

>Most of these issues have been addressed. For Flex 2 there
>are libraries like URLKit which add bookmark support and
>back button integration. With Flex 3 that functionality is
>integrated into the framework. View Source is something
>that developers can opt into. There are many Flex
>applications which have done this but most commercial
>applications choose not to enable View Source.

The progress on accessibility, "webbiness", etc is leaps and bounds ahead of the last time I dabbled in Flash (MX maybe?). The point for me is that it is "possible" to support accessibility, expose source, provide permalinks and all those things, but lots of people won't. And my ability to do things like learn by viewing source, personally modify by injecting CSS and Javascript into the page or even create new products by parsing the markup (for example: I wrote a iGoogle widget to track the Sitemeter stats on my blog in about 75 lines of javascript by remotely loading and parsing the sitemeter page displaying my summarized stats...) is diminished when people replace pages that can be implemented in HTML with Flex apps. Flex is inherently less "open" than the base web technologies (and I realize that to a certain point of view that's a plus, rather than a minus).

Don't get me wrong - I don't think Flex is an evil technology - many of the things I'm citing can be weak points for AJAX style web apps too (URLS! Packed and minimized JS that for casual purposes is impenetrable...). Obviously there are use cases where AJAX makes sense and I think there are use cases where Flex makes sense too. I just would hate to see every html form out there replaced by Flex because "it's easier to get cross-platform identical-pixel layouts".

And bringing us back to our original topic of the difficulties of cross-browser layout consistency: it is difficult starting from scratch. Using a "browser reset style sheet" mitigates these difficulties enormously and lately I'm seeing people moving to CSS frameworks for flexible pre-made (and debugged) grid/layout systems. For most apps I'd hate to see people retreating from HTML/CSS/Javascript to plugin based technologies just because of layout difficulties...

Links:
Sitemeter widget: http://metapundit.net/sections/blog/javascript_development_and_google_modules
Eric Meyer's Style Reset: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
Yahoo YUI CSS framework: http://developer.yahoo.com/yui/grids/
Blueprint CSS Grid framework: http://code.google.com/p/blueprintcss/

Elizabeth Wiethoff

Posts: 89
Nickname: ewiethoff
Registered: Mar, 2005

Re: Hybridizing HTML Posted: Nov 9, 2007 10:39 AM
Reply to this message Reply
Thanks, metapundit, for approaching what I'd like to say here.

Bruce, I've noticed you complaining, here and in another post or two, about CSS problems in Firefox. Have you checked the "Minimum font size" in your advanced "Fonts & Colors" preferences? Perhaps it's too large. Assuming you have good eyesight, try setting it to "None". Or perhaps you have set your default serif and sans-serif fonts to choices the developers of the poopy sites didn't anticipate. Try some different default fonts. And for your "Proportional" font, try choosing "Sans Serif" instead of "Serif", and vice versa. Try a different default size for your Proportional font. Try hitting ctrl+ or ctrl- a few times when you view the page. In short, if the developers of the poopy sites bothered to look at them in Firefox, their browser settings probably didn't match yours.

The basic problem is this: How do we get things to display consistently [...]?

You can't. Nor should you try. Why? Because the HTML/CSS/browser experience is all controlled by the user. That's the little known secret. The vast majority of users don't know it. And unless they know a lot more about accessibility than sticking "alt" attributes in "img" tags, most web developers don't know this secret, either.

The user decides what fonts are installed on the system. The user decides on a browser. The user controls the browser window width. The user controls + and - font size. The user is in control of all the browser preferences. The user controls whether or not the browser uses a User Stylesheet. The user controls what's in the User Stylesheet. The user controls how the Stylish (http://userstyles.org/stylish/) Firefox extension renders the page. Etc.

Yes, most users are not power users. Yes, probably most users don't have accessibility problems. Yes, most users accept almost all of their browsers' defaults. (Heck, an awful lot of people can't even figure out how to increase and decrease font size.) But as soon as a user or a site developer changes any browser setting (and this includes window width), all bets are off.

Me, I'm accustomed to "broken" web sites, not because I'm a Firefox user, but because I have accessibility problems. I insist on huge font sizes and only certain fonts, I keep my browser window surprisingly narrow by today's standards, I keep JavaScript turned off, I use Stylish to tweak or outright eliminate the most bothersome portions of my favorite sites, and I've disabled Flash. Why no Flash? Because I can't control the font sizes and can't require that Flash not show movement. (I have photosensitive epilepsy triggered by images moving sideways.)

So, yeah, I'm an extreme user, a tough customer. And I'm sorry I can't help you diagnose your write-once-run-anywhere Flex bugs. I imagine the reason Flash is easier than HTML/CSS/browser for developers to obtain consistent results in is that users have no control over default rendering.

Elizabeth Wiethoff

Posts: 89
Nickname: ewiethoff
Registered: Mar, 2005

Re: Hybridizing HTML Posted: Nov 9, 2007 3:59 PM
Reply to this message Reply
Sorry, I'm such an accessibility Nazi. I've calmed down a bit now.

If you (anyone) want to control how a web page looks in a browser, you, unfortunately, have to stop using CSS. :-( You have to go back to using table and font tags and specifying the appearance of everything under the sun with element attributes. And, yep, that's a royal PITA for the developer.

So, the lesson of the day is, the more you "separate content from presentation" in a browser, the more you hand over control of the presentation to the user. The CSS defined by a site developer only suggests how the site will look. Its appearance is ultimately up to the user, all because the browser itself hands loads of control to the user in this situation. All a site developer can really do is hope that the web page turns out pretty much legible and not entirely nonsensical for pretty much everyone.

As things stand today, your best bet in the world of browser/HTML/CSS is to set sizes using em or ex units, assuming you have a really good reason to specify the size of something. But em and ex units have nothing to do with the pixel units of image height and width and nothing to do with the thin/medium/thick widths of borders. Hence, no layout is truly "liquid" and there will always be several users for whom the site looks ghastly.

ahmed seleem

Posts: 9
Nickname: ahmedrs
Registered: Aug, 2007

Re: Hybridizing HTML Posted: Nov 11, 2007 12:10 AM
Reply to this message Reply
thanks a lot , for this article , but i have some begginer's questions :

- you didn't talk about the size of the page as you promised .
- can i have a flex component on the page without seeing the progressbar ??
- if i change the background of the project , when run it apears ,first ,the default green color , then it loads my custome color !!!! , how to fix this ??

- is better to always converte the mxml files to AS and include only the AS
when deploying , while keep the mxml code for update the reconverte
....., is it realy improve the performance ....??
-- how can i use new fonts in my project ??

ahmed seleem

Posts: 9
Nickname: ahmedrs
Registered: Aug, 2007

Re: Hybridizing HTML Posted: Nov 11, 2007 1:42 AM
Reply to this message Reply
you all spoke about Firefox as if it's the best browser !! , I was a firefox user
,but, now I am using Safari 3.0 public with the newest nightly builds...from
http://webkit.org/
and safari is pretty , simple , stable , fast , has the best standard support.....and more , I just feel happy while browsing with it :

- see the font rendering with it and look at firefox!! , or IE !! , or any.......
- see the forms components with and look at firefox (it's very ugly in FF)

and don't be happy with the huge number of extensions for firefox lots of them apearntly affect the performance , and look how FF eats the ram after
you open many tabs , then its freez many many times !!!!!

i think the firefox 1.* is better than firfox 2.* and more stable..!!!!

Rarely,Rarely,i saw wrong apearence for a web page in some few things
specially some microsoft's pages !!!!!!!!!! because as you all know , it
doesn't supporte standards in purpose !!!!!

so we should use the one who supporte the standards.

David Hope

Posts: 2
Nickname: dhope
Registered: Nov, 2007

Re: Hybridizing HTML Posted: Nov 15, 2007 5:48 AM
Reply to this message Reply
Interesting article. Your continual praise of the flex system and its separation of the GUI from program logic seems quite interesting and perhaps the way forward as opposed to swing, wx etc. However for web browsers I think its maybe a bad idea to encourage a flash based technology as the way forward on web pages just because whilst Flash is widely adopted it's missing in many places. For example my 64bit Ubuntu installation has issues with Flash and also its not yet supported on the iphone which many people use. Also i sometimes turn off Flash to avoid annoying adverts or 'funny' animations that seem to be everywhere. So from a purely pragmatic view of what people use I am not sure its quite the way forward yet though it sounds good in principle.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Hybridizing HTML Posted: Nov 15, 2007 11:25 AM
Reply to this message Reply
> Interesting article. Your continual praise of the flex
> system and its separation of the GUI from program logic
> seems quite interesting...

Don't forget that Bruce has appeared in adverts promoting Flex and therefore, in the absense of any contrary information, might be assumed to be a paid advocate of Flex.

ahmed seleem

Posts: 9
Nickname: ahmedrs
Registered: Aug, 2007

Re: Hybridizing HTML Posted: Nov 16, 2007 7:56 AM
Reply to this message Reply
> might be assumed to be a paid advocate of Flex.

no , no , no !!!!!!!

this a bad way in discussion !!!!!

no comment !!!!!!!!!!!!!!!!!!!!!!!

Clark Updike

Posts: 11
Nickname: clark
Registered: Apr, 2002

Re: Hybridizing HTML Posted: Nov 27, 2007 7:40 AM
Reply to this message Reply
I'm surprised nobody has yet mentioned yahoo's YUI CSS toolkit. It's designed to deal with many of the cross-browser CSS issues if you work within its constructs. I watched the YUI CSS video (see link below) and thought it was interesting enough to plan on trying at some point.

http://developer.yahoo.com/yui/grids/

Raoul Duke

Posts: 127
Nickname: raoulduke
Registered: Apr, 2006

Re: Hybridizing HTML Posted: Nov 27, 2007 1:57 PM
Reply to this message Reply
> Sorry, I'm such an accessibility Nazi. I've calmed down a
> bit now.

I wish more people were proponents of accessibility and therefore I think usability.

> site will look. Its appearance is ultimately up to the
> user, all because the browser itself hands loads of
> control to the user in this situation. All a site

I also wish that sites were designed with the whole "let the user decide for their needs" rather than the "if your fonts are even slightly big, this site will suck for you" attitude or utter cluelessness that i seemingly see more often than not. :-(

Unfortunately, it seems to me that while CSS might be a nice idea in theory, it falls down even faster than JavaScript-DOM differences from browser to browser.

All hail HTML tables.

wave heatin

Posts: 1
Nickname: waveheatin
Registered: Apr, 2008

Re: Hybridizing HTML Posted: Apr 16, 2008 4:17 PM
Reply to this message Reply
I have tremendous respect for Bruce, but I think his suggestion of embedding a flash form in html is a bit too simplistic. In order to use a flash form in real application, you have to have a way to dynamically manipulate the form and dynamically display part or the whole form and its content. To achieve that you have to get a whole suit of tools from Adobe either on the client side and/or on the server side.


Whenever you think about using flex, you have to ask the return on investment. How much do you actually gain by going through such a trouble of completely abandoning your simple html? The key reason for HTML's success is its casual attitude.

Only very rarely you wish to tightly control how your user interface is displayed (style, font size,..). I love to change the text size and sometimes complete ignore the style defined by the page.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Hybridizing HTML Posted: Apr 17, 2008 12:11 AM
Reply to this message Reply
> The key reason for HTML's success is its casual attitude.

That makes HTML perfect for a casual website but it doesn't follow that HTML is therfore a good basis for a professionally designed web site.

> Only very rarely you wish to tightly control how your user
> interface is displayed (style, font size,..).

It depends. For a casually designed (i.e. not really designed at all) web site then control is not an issue. On the other hand, where I work (which is a fairly typical high public profile commercial company) the web site design is incredibly tightly controlled and the same goes for most high profile web sites.

> I love to
> change the text size and sometimes complete ignore the
> style defined by the page.

Yes, it's great fun but it's only one way of managing a web site.

Flat View: This topic has 27 replies on 2 pages [ « | 1  2 ]
Topic: Hybridizing HTML Previous Topic   Next Topic Topic: Polyform Puzzler Talk Video (Montreal Python)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use