![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||||||
| |||||||
|
|
Any solution that is dependent on Javascript for content generation and manipulation will cause problems to those with old browser, text- only browser, or those using screen readers. I wholly acknowledge this fact, but I'm not going to dwell on it further as I feel that this has probably been touched on by various other posters. |
|
By simple HTML editors, I mean things like Notepad, Crimson Editor, HTML-Kit and the like. I'm not a big fan of Dreamweaver and other 'visual' editors, but I'd be the first to admit that I probably need to get over that bias. I like to be able to understand the link between what I'm seeing and the HTML that's being created. |
|
I think your comments about browser bugs is a *very* useful one. Server generated HTML will never be exposed to that. So long as it generates good HTML, it will produce a sensible page. Writing Javascript that is cross-browser compliant is a major pain (this I know!) |
|
Not to diminish your comments, but I think I can summarise them as: 1) Javascript page building results in pages that are not widely accessible |
|
2) Javascript page building is prone to web bugs I think it's important to all readers to be aware of 1) and understand its relevance to their solution (and, most of all, not underestimate that importance) I think that 2) is a good point, but can be solved with an appropriate client-side framework. |
|
Which brings us back to one of your first points, albeit an implicit point: find the right server-side framework. |
|
Great food for thought; thanks! For the record: a white paper is broadly understood to be a relatively short treatise or report aimed to educate people on a certain point or to present a solution to an industry problem. The phrase may be tossed around widely, but I think I was using it in its appropriate context here. |
#12
| |||||
| |||||
|
|
The danger isn't deciding that it is ok to depend on JavaScript. It is *mistakenly* deciding it is ok to depend on JavaScript. I'm not saying it is a bad decision but making a mistake in this area could be costly later. Make sure the boss officially makes this decision because it is basically a decision about investment vs accessibility. |
|
I think your comments about browser bugs is a *very* useful one. Server generated HTML will never be exposed to that. So long as it generates good HTML, it will produce a sensible page. Writing Javascript that is cross-browser compliant is a major pain (this I know!) In general, innerHTML works well and for generating complex bits of page is faster and less buggy than using the standardized DOM methods like document.createElement. |
|
1) Javascript page building results in pages that are not widely accessible They are widely accessible because generally JavaScript is "on" in browsers. They are not *as* widely accessible. This distinction somewhat softens the blow but for a single user that is left out then it makes no difference to that user. |
|
I think that 2) is a good point, but can be solved with an appropriate client-side framework. Don't put too much blind faith in the "appropriate client-side framework". The quality of the available mainstream JavaScript libraries has been called into question here many times. |
|
Which brings us back to one of your first points, albeit an implicit point: find the right server-side framework. client-side or server-side? |

#13
| |||
| |||
|
|
VK, PointedEars, Please don't hijack this thread to bicker about accessibility. |
|
It's abundantly clear that anyone using a UA that does not have Javascript is not going to be able to access pages generated using the model that I outlined in the original post. |
|
I think a more fruitful discussion would focus on other, less obvious aspects, which is why I'm seeking the thoughts of others. |
#14
| |||
| |||
|
|
By simple HTML editors, I mean things like Notepad, Crimson Editor, HTML-Kit and the like. I'm not a big fan of Dreamweaver and other 'visual' editors, but I'd be the first to admit that I probably need to get over that bias. |
#15
| ||||
| ||||
|
|
It's abundantly clear that anyone using a UA that does not have Javascript is not going to be able to access pages generated using the model that I outlined in the original post. They will if you properly design NOSCRIPT redirect and/or warning blocks. |
|
I think a more fruitful discussion would focus on other, less obvious aspects, which is why I'm seeking the thoughts of others. 1) Search recents about Ruby in this group for one (the problem with script inserting script inserting ...) |
|
2) Another one is specific for charsets above US-ASCII in Javascript strings, especially in document.write. Maybe it is not your case. |
|
3) Browser screen update mechanics may make _very_ big delay before any content will get visible unless you are using properly context releases over setTimeout. By now and IMO it is the most common mistake made in Javascript / XHR intensive solutions. |
#16
| |||
| |||
|
|
[snip] It's abundantly clear that anyone using a UA that does not have Javascript is not going to be able to access pages generated using the model that I outlined in the original post. They will if you properly design NOSCRIPT redirect and/or warning blocks. Good point. I was taking a limited view as to what 'access' was. Certainly, they won't be able to gain anything fruitful from the specific page that they've pointed their UA at. However, if I use a NOSCRIPT element, I can ensure that they are informed as to the state of the page and, ideally, directed to a page that provides comparable functionality without the need for Javascript. |
#17
| |||
| |||
|
|
The critical point is that the page is "pre-built" on the server. I've been thinking about an alternative approach, whereby the page is built on the fly with various AJAX calls to the server to pull in the necessary components. In the extreme, I could visualize doing away with Perl generated pages entirely. All pages are HTML, with AJAX calls to the server. The responding scripts would return JSON or XML data which would be interpreted on the client side as required. An advantage to this would be that it would be a lot easier to generate the pages using simple HTML editors. It would be a lot simpler to ensure validity of the HTML (as the final product would always be available to me). I'm interested in people's comments on this approach. Does it provide extra burden on the server? Are there any hidden advantages or disadvantages I may be aware of? Does anyone know of any white papers on this approach? |
#18
| |||
| |||
|
|
It has become quite clear over my time reading comp.lang.javascript that you believe you know the right way to do things At least I can *justify* my design decisions. As can I. But you do not. Instead you are arguing with nebulous business constraints. If you cannot clearly see that business constraints play a role then suppose you were charged with the task of writing interactive video games for the web. The business partners want these to be usable by people with a relatively low barrier. That is, no Flash or Sliverlight or other browser plugins. You are allowed to assume support for HTML, images, cookies, CSS and JavaScript because these are on by default in most browsers. You must support IE6+, FF2+, O9+, S3+. How would you do that so it degrades gracefully without JavaScript support? Just more hot smoke I am therefore going to ignore. If you named *your* business constraints once, one could at least try to evaluate your design decision. |
#19
| |||
| |||
|
|
Thomas 'PointedEars' Lahn wrote: It has become quite clear over my time reading comp.lang.javascript that you believe you know the right way to do things At least I can *justify* my design decisions. As can I. But you do not. Instead you are arguing with nebulous business constraints. If you cannot clearly see that business constraints play a role then suppose you were charged with the task of writing interactive video games for the web. The business partners want these to be usable by people with a relatively low barrier. That is, no Flash or Sliverlight or other browser plugins. You are allowed to assume support for HTML, images, cookies, CSS and JavaScript because these are on by default in most browsers. You must support IE6+, FF2+, O9+, S3+. How would you do that so it degrades gracefully without JavaScript support? Just more hot smoke I am therefore going to ignore. If you named *your* business constraints once, one could at least try to evaluate your design decision. You are ducking the issue. |
|
I am not trying to suggest depending on JavaScript is good in many situations. I am simply trying to determine if you agree that there are some situations where a dependency on JavaScript may be either necessary or acceptable. |
#20
| |||
| |||
|
|
Peter Michaux wrote: Thomas 'PointedEars' Lahn wrote: It has become quite clear over my time reading comp.lang.javascript that you believe you know the right way to do things At least I can *justify* my design decisions. As can I. But you do not. Instead you are arguing with nebulous business constraints. If you cannot clearly see that business constraints play a role then suppose you were charged with the task of writing interactive video games for the web. The business partners want these to be usable by people with a relatively low barrier. That is, no Flash or Sliverlight or other browser plugins. You are allowed to assume support for HTML, images, cookies, CSS and JavaScript because these are on by default in most browsers. You must support IE6+, FF2+, O9+, S3+. How would you do that so it degrades gracefully without JavaScript support? Just more hot smoke I am therefore going to ignore. If you named *your* business constraints once, one could at least try to evaluate your design decision. You are ducking the issue. No. You are, hiding behind names when it is high time to put your money on the table. |
|
I am not trying to suggest depending on JavaScript is good in many situations. I am simply trying to determine if you agree that there are some situations where a dependency on JavaScript may be either necessary or acceptable. Knowing me to suggest frequently to use scripting to generate specific elements that only work *with* client-side scripting, however to try to void these, you could have known that already: I know that there are certain special features in a Web application that are not possible to implement without support for client-side scripting. However, that does not mean client-side scripting needs to be a requirement for the entire application nor that it is acceptable if it was defined as a requirement for that. A good example are popup windows: It is OK if there is no popup window on a hyperlink if client-side scripting is unavailable; it is not OK if nothing happens then or the user is bothered with an error message (that they are unlikely to understand). Regarding your approach this means: It is OK if you use client-side scripting and XHR to fill your document; it is not OK if your document remains empty if one of them is not sufficiently supported. As there is an alternative, conventional way to transport the information from the server to the client. |
![]() |
| Thread Tools | |
| Display Modes | |
| |