I found the insights Roger pointed out here to be helpful.
Roger, please keep up the insightful comments.
IMHO, if the insights show poor programming practices to avoid, it may
be better received if that is not expressly mentioned and instead the
tone would focus on "instead of doing A which will cause B, try doing
C".
--Gershon
On Jan 7, 2009, at 7:15 AM, Roger wrote:
>
> Combining two inept frameworks has a very predictable result. It
> would make sense to learn how to use the underlying technologies (e.g.
> HTML, browser scripting.)
>
> At first glance, it looks absolutely awful in FF3. Seemingly
> everything overflows its boundaries.
>
> As for the source, you should understand that these frameworks are not
> written by competent developers. Here is some feedback that should
> illuminate the inherent futility of this approach:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> Why? This is the most useless doctype there is endlessly perpetuated
> by copy and paste. This document could never be served successfully
> as XHTML, so why label it as such?
>
> <script type="text/javascript">
> //<![CDATA[
>
> This one shows up a lot as well. It is pure gobbledygook. This
> document can never be served as XHTML (because of this and other
> problems) and the extra characters are a complete waste when served as
> HTML.
>
> var theForm = document.forms['mainForm'];
>
> Why the mix of dot and bracket notation?
>
> if (!theForm) {
> theForm = document.mainForm;
> }
>
> This makes no sense. If it isn't in the document.forms collection, it
> isn't going to be present as a property of the document object. Often
> the latter method is used on the Web, but is not the best practice.
> The former method will work for everything, so you can get rid of this
> clause.
>
> function __doPostBack(eventTarget, eventArgument) {
> if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
> theForm.__EVENTTARGET.value = eventTarget;
> theForm.__EVENTARGUMENT.value = eventArgument;
> theForm.submit();
> }
> }
>
> This is setting up the infamous .NET script-dependent form submissions
> (the most obvious of the design blunders.)
>
> <script type="text/javascript">
>
> The above problem is averted in this next block.
>
> var ct_img_expanded = 'http://www.binaryrefinery.com/main/images/
> outlinedown.gif';
> var ct_img_collapsed = 'http://www.binaryrefinery.com/main/images/
> outlinearrow.gif';
> (new Image(15,15)).src = ct_img_expanded; // caching
> (new Image(15,15)).src = ct_img_collapsed; // caching
>
> That is an ineffectual attempt to preload images, which is a bad idea
> in the first place.
>
> if (document.getElementById && document.getElementById(htmlNode) !=
> null) {
>
> You can leave off the loose comparison to null (which is bad form.) A
> null value type converts to false in ECMAScript implementations.
> document.getElementById(imgNode).src=ct_img_expanded;
>
> document.getElementById(htmlNode).className='categoryListExpanded';
> }
>
> This is very inefficient. Store references to these elements instead
> of calling gEBI repeatedly.
>
> // Iterate into this nodes childNodes
> if (node.hasChildNodes) {
>
> This is a method. Is this meant to be some bizarre object inference?
>
> var hi_cn;
> for (hi_cn=0;hi_cn<node.childNodes.length;hi_cn++) {
> highlightWord(node.childNodes[hi_cn],word);
> }
> }
>
>
> window.onload = googleSearchHighlight;
>
> Not a good idea for a mashup like this.
>
> <script type="text/javascript" language="javascript">
>
> Yet another prelude to a script block. The language attribute is
> deprecated.
>
> <td id="siteTitleRight" align=right><img src="images/
> mvp.jpg"> <img src="images/winnerbcs.jpg"> </td>
>
> Tables for layout, the entity is missing its trailing semicolon and
> BTW what exactly did this win?
>
> <div id="headerLinks">
> <a href="default.aspx">Home</a> | <a
> href="/main/richardjones.htm"
> target=_new>About Me</a> | <a href="SyndicationService.asmx/
> GetRss">Syndication</a> | <a href="Login.aspx">Sign In</a> | <a
> target="_blank" href="http://settings.messenger.live.com/Conversation/
> [email protected]&mkt=en-
> GB"><img style="border-style: none;" src="http://
> messenger.services.live.com/users/
> [email protected]/presenceimage?mkt=en-GB"
> width="16" height="16"/>Im</a>
> </div>
>
> Div-itis. Semantically, this is a an unordered list. The target
> attribute doesn't belong and "_blank" is always a bad idea. Saved you
> a Google search on that topic:
>
> http://www.trilithium.com/johan/2005/03/target-blank/
>
> the excellent IUI library built by   <a title="http://
> joehewitt.com/" href="http://www.binaryrefinery.com/main/ct.ashx?
> id=a70700ba-ba8b-4237-90ea-d4b0866a80cf&url=http%3a%2f
> %2fjoehewitt.com%2f"" target="_blank">
>
> For some reason you think IUI is excellent, but how are you qualified
> to judge? And again with the "_blank" target.
>
> <a class="permalinkStyle" rel="bookmark" href="http://
> www.binaryrefinery.com/main/PermaLink,guid,a70700ba-ba8b-4237-90ea-d4b0866a80cf.aspx
>
> ">
>
> How is that a bookmark?
>
>     
>
> Huh?
>
> |
>
> Ditto.
>
> <br clear="all">
>
> Deprecated. Use CSS.
>
> <a onClick="return webpartToggleExpansionStatus('onthispage');"
> class="webpartToggleLink" href="#">
>
> Inaccessible without script.
>
> That's enough. I see a calendar script of some sort coming up in the
> source, but it is unclear whether it is the widget you mentioned.
> Tried to go back and look, but the server was down.
>
> HTH (though someone is sure to label it as "unhelpful.") Best of luck
> with whatever you are trying to do here.
>
> On Jan 6, 6:24 pm, Richard Jones <[email protected]> wrote:
>> I just changed the URL for the link above.
>>
>> just goto
>>
>> http://www.binaryrefinery.com
>>
>> Thanks
>>
>> On 6 Jan, 11:09, Richard Jones <[email protected]> wrote:
>>
>>> I've recently completed building a calendar control using IUI and
>>> a .Net middle tier.
>>
>>> I've found that IUI and ASP.Net can co-exist quite nicely. However
>>> I've kept most of the front end, in straight HTML with a whole
>>> bunch
>>> of JavaScript and my AJAX pages (i.e the bits supplying the data)
>>> in .Net.
>>
>>> Its work in progress but have a look at an example Calendar control
>>> that I have been putting together.
>>
>>> http://www.binaryrefinery.com/main/PermaLink,guid,ffb1be9a-a058-4e06-
>>> ...
>>
>>> I've got everything inside a Visual Studio project and this approach
>>> seems to work really well.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---