Re: WebObjects 5.4 is out.
Re: WebObjects 5.4 is out.
- Subject: Re: WebObjects 5.4 is out.
- From: Art Isbell <email@hidden>
- Date: Fri, 26 Oct 2007 16:18:08 -1000
I am breaking various rules about not making more than one change
simultaneously by moving from Apple WO tools to Eclipse (3.2.2 - too
timid to move to 3.3.1 yet :-) and from WO 5.3 to 5.4 (Tiger to
Leopard) at the same time. But, hey, go for the gusto!
On Oct 26, 2007, at 10:20 AM, Mike Schrag wrote:
3) lazy tags. <br> <p> <li> all those tags you love to not
close ... WOLips lets you get away with it in non-5.4 mode, but you
should be ashamed of yourself :) Refactor=>reformat will generally
close those for you, but you should be aware that it doesn't REALLY
know what you meant, so it's likely going to semantically change
your page by closing early or wrapping things you didn't intend.
After migrating several WO frameworks and applications from Xcode to
Eclipse and WO 5.3 to 5.4, I found that the WOLips Component Editor
complained about the HTML generated by WO Builder. I found that by
running Edit > Refactor > Reformat on each HTML file with such errors,
the HTML was rewritten to be conformant which eliminated the errors.
However, its treatment of Mike's "lazy tags" wasn't ideal from my
perspective.
For example:
<meta name="generator" content="WebObjects 5.2">
<title>A Title</title>
became
<meta name="generator" content="WebObjects 5.2">
<title>A Title</title>
</meta>
Even worse
<br>
… lots of other tags …
became
<br>
… lots of other tags …
</br>
with the closing </br> tag being way down the page with all the tags
in between indented.
So I manually rewrote the metas:
<meta name="generator" content="WebObjects 5.2" />
and did a workspace-wide search and replace of <br> with <br /> before
reformatting.
Does Component Editor offer this format in some option that I haven't
discovered?
4) There are a couple of HTML tags that break when closed. Like the
<link> tag I think is not allowed to have a close tag? I actually
don't how you do this with the 5.4 parser.
Before reformatting, I did a workspace-wide search for "></" to
search for tags without content. I replaced the search string with " /
>" which rewrote these tags as <tag options />. Note that this
search pattern doesn't always match just tags without content, so you
can't do an automatic search and replace.
I was able to rewrite link tags with no complaints:
<link rel="stylesheet" href="http://www.foo.com/bar.css" type="text/
css" charset="utf-8" />
but I could not rewrite a script tag with no contents as:
<script src="http://www.foo.com/bar.js" type="text/
javascript" charset="utf-8" />
<script type="text/javascript" charset="utf-8"> var
searchSection = 'support'; var searchCountry = 'us';
</script>
The error on the second script statement: <script> start tag is not
found.
Instead, I had to use this format:
<script src="http://www.foo.com/bar.js" type="text/
javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8"> var
searchSection = 'support'; var searchCountry = 'us';
</script>
This smells like a Component Editor bug, but what do I know?
Also, the use of Java generics in the API declarations in the WO 5.4
frameworks may generate lots of warnings in your custom WO 5.3 code.
I like to eliminate all warnings, but to do so, one must try to
understand Java generics. Be prepared to be flummoxed. To be
backward compatible with pre-generics Java, compromises in the
generics implementation had to be made. These compromises make
eliminating these compiler warnings by changing one's code difficult
in some cases. Java 1.5 has added the
'@SuppressWarnings("unchecked")' directive to tell the compiler to
shut the &*^% up. You should probably get familiar with the various
@SuppressWarnings directives if you want to eliminate compiler
warnings when all else fails.
I hope to survive the Xcode -> Eclipse and WO 5.3 -> 5.4 migration
pain in one big lump rather than stringing it out over two successive
migrations. I think I see a light at the end of the tunnnel, but
maybe it's just a huge locomotive heading my way.
Aloha,
Art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden