Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <3429928.SMqNJtattL@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 18 Dec 2012 23:47:34 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <94d85931-0447-446a-b403-124e797ab4da@i1g2000vbp.googlegroups.com> <+idJTVMLvgzQFwH3@invalid.uk.co.demon.merlyn.invalid> <8npuc8hrra8jqpr8hhaii21clk3t99dfm6@4ax.com> <1912184.9IARt5OQqH@PointedEars.de> <9l91d8tc9rm4k0v1fqguk23lifqkh7g9kv@4ax.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 67 NNTP-Posting-Date: 18 Dec 2012 23:47:35 CET NNTP-Posting-Host: 266c829e.newsspool3.arcor-online.net X-Trace: DXC=DHh6hW9D;=`_0Po7BmQ3]lMcF=Q^Z^V3h4Fo<]lROoRa8kFYBYU3JEom?\VAVDK4U\h X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:17765 Evertjan. wrote: > Gene Wirchenko wrote on 18 dec 2012 in comp.lang.javascript: >> "Evertjan." wrote: >> [snip] >>> Gene did not talk about Javascript engines, but about the environment >>> ["browser"]. He, so he implied, could not imagine the existance of other >>> dimensions. >> >> No. I have not run across JavaScript use outside of a browser so >> I wanted to know how people are using it outside of a browser. I >> could easily imagine a use, but I wanted real data. I find that >> asking works better than guessing. > > Okay, I was teasing you, sorry. “Misunderstanding” would be more like it. > I hope I gave you a fair example of the othere environments. > > ====================== > > One [among many] nice thing about Serverside Javascript is, There is no “Serverside Javascript” as there is no “Javascript”, therefore … > that you can make a function work both clientside and serverside: > > Say you have a function like isEmailAddress(email), you can first test > clienside if a string contains a "valid" email address, and then, after > submission, test it again serverside [to prevent clientside hacking of > your code leading to inadmissible entries to your database]. You will have > to enter the same function definition twice, btw. … this approach will only work *reliably* if the function code uses only features that are common to all relevant versions of all relevant server- side and client-side ECMAScript implementations, and does not use any features that depend on its runtime environment. For example, if the function uses features only supported by Netscape/Mozilla JavaScript (say, built for use on an NES-compatible Web server that uses Rhino 1.7, with generators), then it cannot be used verbatim on the client-side without forfeiting its functionality in software that is not Mozilla-based, such as Microsoft Internet Explorer, or Mozilla- based software that is too old to support JavaScript 1.7, such as Firefox 1.5. Likewise, if the function depends on features native to JScript (say, it was built for use with ASP on IIS, and for some reason depends on Conditional Compilation) or not introduced before a specific version of JScript, then it cannot be used verbatim on the client-side without forfeiting its functionality in software that does not use Microsoft JScript, like Mozilla Firefox, Google Chrome, Opera, and so on, and in versions of Internet Explorer or Windows systems in general that do not support the required JScript version. Understanding these differences is important. It is why “Javascript” is a misnomer; why I created, and why I am continuing to maintain the ECMAScript Support Matrix, . PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann