PDA

View Full Version : Quirks or Standard mode?



gslender
12 Jun 2008, 1:56 AM
Darrell,

Probably something we should get a clear direction from you on - are we moving forward with standards mode or quirks mode? (http://en.wikipedia.org/wiki/Quirks_mode)

Google as of GWT 1.5 have decided to recommend moving to standards mode...
http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_StandardsModeSupport

As testing/bugs will exist depending on what HTML mode is used, I think it would be worthwhile getting some statement on what is / isn't supported?

Thoughts??????

gslender
12 Jun 2008, 2:02 AM
I note that both Explorer and Mail demo both run in Standards mode.

zaccret
12 Jun 2008, 5:01 AM
I believe Ext GWT should support Standard Mode for these reasons :
- "Support for quirks mode (...) may be dropped in future versions of GWT"
- I believe cross-browser compatibility will be better with Standard Mode
- when you build a new webapp with the GWT 1.5 applicationCreator, the generated html file enable Standard Mode. Therefore I (and I guess other users) have tested my web application in standard mode since beta1 release (was already supporting GWT 1.5M2) and not in quirks mode.


I note that both Explorer and Mail demo both run in Standards mode.Actually, when you generate a new webapp with applicationCreator, it generates the following declaration :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> In Explorer and Mail demo, it is not the same :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

gslender
12 Jun 2008, 12:13 PM
Wow - didn't think of using the Application creator to confirm - obvious now.

Yep, well that is probably enough for me... we should be using standards mode and probably the doctype as defined in GWT ...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

gslender
17 Jun 2008, 1:52 AM
some bugs pop up due to wrong/different doctype

issue found here http://extjs.com/forum/showthread.php?t=38183

and here http://extjs.com/forum/showthread.php?t=38671

gslender
17 Jun 2008, 2:07 AM
another interesting tid bit...

ExtJS set the doctype to...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
in samples/demos like http://extjs.com/deploy/dev/examples/form/dynamic.html

But most other samples have no doctype set - so quirks mode? So how does Jack handle things?

zaccret
20 Jun 2008, 1:20 AM
HTML 3.2 doctype requirement has been add to setup.txt : http://extjs.com/forum/showthread.php?p=182881#post182881

gslender
5 Aug 2008, 6:33 PM
Note that GWT RC2 release notes has suggested that it is better to revert back to quirks mode, and the applicationCreator defaults to quirks mode when creating a new GWT app.


You can still use standards mode for your GWT app, but please be aware that you may notice some layout issues. If you are switching an app from quirks mode to standards mode, your CSS styles might be applied differently, which could also affect your application. We will continue to address standards mode support in future GWT releases.

Quirks mode it is then ;-)

zaccret
6 Aug 2008, 12:11 AM
What a shame :(
Anyway, Ext GWT relies neither on standard mode nor on quirks mode. Ext GWT relies on "old standard" mode (HTML 3.2) so it won't affect us (we still have to add a doctype after the applicationCreator).

gslender
6 Aug 2008, 12:19 AM
Ext GWT relies on "old standard" mode (HTML 3.2)

Not true anymore - Darrell has advised that moving forward, HTML 4.0 will be the quirks mode required...


so it won't affect us (we still have to add a doctype after the applicationCreator).

...but this is still true even with RC2 of applicationCreator eg

1) ExtGWT needs this...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

2) RC2 GWT creates this ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

subtle but important difference in the version...

http://en.wikipedia.org/wiki/Quirks_mode#Comparison_of_document_types

zaccret
6 Aug 2008, 12:45 AM
Wow, I'm confused.


Not true anymore - Darrell has advised that moving forward, HTML 4.0 will be the quirks mode required...

You mean that HTML 4.0 doctype will be a Ext GWT requirement soon (instead of HTML 3.2) ? The help center still talks about 3.2 (http://extjs.com/helpcenter/topic/com.extjs.gxt.help/html/gettingstarted/helpfulhints.html).


RC2 GWT creates this ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Ok. I didn't know because I haven't tested yet. So Google has only removed the system identifier "http://www.w3.org/TR/html4/loose.dtd".


http://en.wikipedia.org/wiki/Quirks_...document_types
Interesting page. As far as I understand, with the new GWT 1.5RC2 default doctype (4.01 without system identifier), every browser will use quirks mode. The good thing is that every browser will have the same behaviour. Of course, I'd prefer standard mode - ideally with a strict XHTML doctype -, but we're far from that, and the most important thing is that our code has the same result on different browsers.


1) ExtGWT needs this...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

You mean next versions of Ext GWT will need this ? Actually, this would also make every browser using quirks mode... why not just use the same as GWT (4.01) ?

zaccret
17 Sep 2008, 2:31 AM
GWT 1.5.2 application creator creates :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Following the help center (http://extjs.com/helpcenter/topic/com.extjs.gxt.help/html/gettingstarted/helpfulhints.html), GXT still needs
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

As these two doctypes seem to enable quirks mode in all browsers, shouldn't Ext GWT be compliant with the 4.01 instead of 3.2 (then we would not need to modifiy the generated html in a a new Ext GWT project) ?

gslender
17 Sep 2008, 3:00 AM
You raise a good point.

I wonder what is the real difference between HTML 4.01 and 4.0 would be, considering both doctypes result in quirks mode ???

zaccret
2 Oct 2008, 1:17 AM
You raise a good point.

I wonder what is the real difference between HTML 4.01 and 4.0 would be, considering both doctypes result in quirks mode ???

Hi gslender.

I'm not sure to understand why you are talking about 4.0. The help center suggests us to use 3.2 final and GWT application creator default behaviour is to generate a transitional 4.01 without system identifier. Did you mean you wonder the difference between 4.01 and 3.2 ?

gslender
2 Oct 2008, 1:34 AM
I've spoken with Darrell (core dev) and he indicated the correct doctype is html 4.0 which quirks for all browsers.

btw html 4.01 is not quirks for all browsers.

zaccret
2 Oct 2008, 1:51 AM
I've spoken with Darrell (core dev) and he indicated the correct doctype is html 4.0 which quirks for all browsers. btw html 4.01 is not quirks for all browsers.

Ok. I'm confused because GWT statement is not so. When you generate an application, you see that in the HTML file :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set -->
<!-- the browser's rendering engine into -->
<!-- "Quirks Mode". Replacing this declaration -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout. -->

zaccret
2 Oct 2008, 1:52 AM
It is also what we see here : http://en.wikipedia.org/wiki/Quirks_mode#Comparison_of_document_types

jpnet
3 Oct 2008, 7:27 AM
Ok, now I'm a bit confused... which one is the proper one to use? It would seem to me that we should use the one that the GXT dev team recommends. But, it also seems to me that the GXT dev team should be using the one that GWT recommends.

So which one is the best to use? The one listed in the GXT help center?

Thanks,

JP

gslender
3 Oct 2008, 3:43 PM
setup.txt in the 1.1 download clearly states...


Ext GWT requires the following doctype.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


I have confirmed with Darrell (core dev) this requirement.

I have checked a few websites and I've seen cases where 4.01 does not always place the browser into quirks mode. GXT needs quirks mode.

GWT 1.5 initially introduced default support for standards mode, but after much feedback they switched back to default of quirks, but clearly the needs for quirks in GWT is less than GXT.

Cheers,
Grant

zaccret
6 Oct 2008, 1:15 AM
Ok. It's clearer now. That's ok for me.

By the way, I was referring 3.2 because the help center still suggests (http://extjs.com/helpcenter/index.jsp?topic=/com.extjs.gxt.help/html/gettingstarted/helpfulhints.html) 3.2.

zaccret
6 Oct 2008, 1:15 AM
I'll open a bug thread

zaccret
4 Nov 2008, 1:18 AM
Ok, I've opened a bug thread (http://extjs.com/forum/showthread.php?p=246663).

By the way, Grant, if I understand what you say, it means that GWT statement and wikipedia are wrong ?

sdc
13 Nov 2008, 12:11 AM
Actually, I don't think they are wrong... :-? I find it counter-productive to edit the HTML file instead of keeping the 4.01 doctype (as generated by GWT applicationCreator) and I think GXT is perfectly 4.01-compliant.
By the way, it would be clearer if setup.txt, "Helpful hints" page and "FAQ" were all suggesting the same doctype (and 4.01 would avoid confusion to new users).

gslender
13 Nov 2008, 3:07 PM
Overall, what I believe is required is Quirks mode in HTML v 4.... anything that gets you there is probably ok... if you have rendering issues, stick to what is supported by GXT. ;)

A few things to consider are...

4.01 is something Google is providing - that suits Google's widgets and CSS etc. and they support that. Excellent if you are using GWT widgets only (remembering that Google don't actually offer much paid support so "support" is fairly loose here).

4.0 is something that ExtJS team are supporting and that would be based on the years of experience with the ExtJS library (html/css etc) - so I guess its about what can be supported not what is easier for new users or what fits in with GWT etc...

I agree the multiple sources all saying different things is a tad confusing... but the setup.txt is probably the best source as it relates to what's being tested against in each build. :-?

I'd guess this will all be cleaned up in the 1.2 release? Darrell, care to comment? :D

Cheers,
Grant

darrellmeyer
13 Nov 2008, 9:26 PM
The only requirement GXT has is that the browser is in "quirks" mode. So you can either use no doctype or use a doctype that results in all browsers running in quirks mode.

I apologize for the inconsistent doctypes out there. The recommended doctype is:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">I have updated setup.txt and help center faq to match this doctype. Take a look at this page (http://en.wikipedia.org/wiki/Quirks_mode) to see a nice table showing the various doctypes on different browsers.

sdc
14 Nov 2008, 6:21 AM
Thank you very much, Darell. I find it clearer as is. And it is one less requirement when you create a new GXT app from applicationCreator. :)

By the way, check the "helpful hints" page, you put 4.0 instead of 4.01 ;)

darrellmeyer
14 Nov 2008, 8:11 AM
The helpful hints page is updated to 4.01.