tag:blogger.com,1999:blog-6385110787682833517.comments2023-03-22T08:53:11.889-05:00Webcrossing Rocks!WebXRox Administratorhttp://www.blogger.com/profile/14607226383389012371noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-6385110787682833517.post-80071538525589388802020-01-25T05:10:38.167-06:002020-01-25T05:10:38.167-06:00That gives off an impression of being fabulous any...That gives off an impression of being fabulous anyway i am still not very beyond any doubt that I like it. At any rate will look much more into it and choose by and by! <a href="https://www.libertypartybus.com/" rel="nofollow">Toronto Party Bus Rentals</a><br />Alessa Hallhttps://www.blogger.com/profile/13365320108286568775noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-45742221339962054222020-01-21T04:24:18.200-06:002020-01-21T04:24:18.200-06:00I genuinely believed you would probably have somet...I genuinely believed you would probably have something useful to say. All I hear is a bunch of whining about something that you can fix if you were not too busy looking for attention. After all, I know it was my choice to read.. <a href="https://www.torontobusrentals.com/" rel="nofollow">Toronto Party Bus</a><br />Sarah Jacbhttps://www.blogger.com/profile/04808548257222989033noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-87094665099174150492011-06-07T02:45:08.845-05:002011-06-07T02:45:08.845-05:00Our very first spam comment! I'm so proud.
Do...Our very first spam comment! I'm so proud.<br /><br />Don't follow that link.WebXRox Administratorhttps://www.blogger.com/profile/14607226383389012371noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-9369130913026637012011-05-09T10:10:21.199-05:002011-05-09T10:10:21.199-05:00Doug, you are absolutely correct in your descripti...Doug, you are absolutely correct in your description of setting properties, etc. In fact, I explained that in detail in the two articles leading up to this summary. And I even admitted WCTL is indeed "a bit quirky."<br /><br />But by "beginner" I meant a rank beginner with absolutely no scripting experience. I stand by my recommendation that WCTL is easier to deal with if you are a rank beginner. :)<br /><br />I would love to see an article here by you about why you love SSJS so much!Sue Boettcherhttps://www.blogger.com/profile/04080769039286457456noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-8229521413485858922011-05-09T09:46:06.653-05:002011-05-09T09:46:06.653-05:00Since we're "duking it out" here :) ...Since we're "duking it out" here :) I think I might take issue with your "easy for beginners" assessment.<br /><br />Webcrossing's SSJS (which I love!) is, after all, based on standard JavaScript, so anybody with any scripting experience at all can get started very quickly. <br /><br />WCTL (which I hate!), on the other hand, is completely unique to the Webcrossing platform.<br /><br />Because it's so standards compliant, there is an inherently smaller learning curve in getting into SSJS for people who already script in any way at all.<br /><br />Also, there are a lot of things that are quite awkward to accomplish in WCTL because of the lack of control structures, which are easy in SSJS. For example, let's say you simply want to output the numbers from 1 through 10 and their squares.<br /><br />Here's how you would do it in WCTL:<br /><br />%% set n 1 %%<br />%% while n <= 10 %%<br />%% n %%,%% n*n %%<br><br />%% set n n + 1 %%<br />%% endwhile %%<br /><br />(And you'd better hope you are not continuing to use the "n" variable in your chain of execution because it's impossible to create a local variable in WCTL.)<br /><br />In SSJS you could write this as:<br /><br />for (var n=1; n<=10; n++) response.append (n + ',' + n*n + '<br>');<br /><br />Or if you want to use the "+" shortcut for response.append you could write it this way:<br /><br />for (var n=1; n<=10; n++) {<br />+ n + ',' + n*n + '<br>';<br />}<br /><br />That's basically standard JavaScript.<br /><br />Which is really easier to write and read for a beginner?<br /><br />Another thing conceptually easier in SSJS is getting the value of a property set at a node (e.g. "/someFolder"). <br /><br />One of the joys of Webcrossing's object-oriented database is that you can have properties attached to anything - folders, files, messages, discussions, users, etc. So you want to be able to access these properties easily in your scripts.<br /><br />In WCTL, to (for example) store the value of a property set somewhere in a variable you have to do a strange programming maneuver where you save your current location, go to the location in question, obtain the value, and then return to your current location, like this:<br /><br />%% set currentLocation location %%<br />%% setPath("/someFolder") %%<br />%% set theVar path.someProperty %%<br />%% setPath(currentLocation %%<br /><br />In SSJS this could be as simple as:<br /><br />theVar = Node.lookup("/someFolder").someProperty;<br /><br />There is no need to "change one's location" to look up properties stored in different locations in SSJS. I think that makes it conceptually easier for beginners.<br /><br />And don't get me started with obtaining custom user properties in WCTL via the %% author.someProperty %% technique!<br /><br />Let the duking continue! :)<br /><br />dougDoug Lernerhttps://www.blogger.com/profile/11678300889147244104noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-40518510912166718152011-05-09T09:43:33.664-05:002011-05-09T09:43:33.664-05:00This comment has been removed by the author.Doug Lernerhttps://www.blogger.com/profile/11678300889147244104noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-16019929212080102592011-05-08T22:54:43.283-05:002011-05-08T22:54:43.283-05:00Thanks, I've clarified that above.Thanks, I've clarified that above.Sue Boettcherhttps://www.blogger.com/profile/04080769039286457456noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-24828710238006265172011-05-08T22:49:18.252-05:002011-05-08T22:49:18.252-05:00Slight expansion of one point: Most filters are pa...Slight expansion of one point: Most filters are part of the WCTL infrastructure. If you code one of them in SSJS, it has to be a command. But other filters - notably the email filters - are built in to the SSJS infrastructure, and they can be functions.<br /><br />It's a historical oddity from the way the codebase developed.Michaelhttps://www.blogger.com/profile/07919213123306085381noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-49493040667559247662011-05-08T21:58:15.912-05:002011-05-08T21:58:15.912-05:00Thanks, Doug, for reminding me of that. I've a...Thanks, Doug, for reminding me of that. I've added a note above that there is an exception to the general rule.<br /><br />There are a couple of "gotchas" with that technique, and I think it warrants an entire post of it's own!Sue Boettcherhttps://www.blogger.com/profile/04080769039286457456noreply@blogger.comtag:blogger.com,1999:blog-6385110787682833517.post-28311785375961160992011-05-07T23:28:12.149-05:002011-05-07T23:28:12.149-05:00A couple of comments about "tag-based" a...A couple of comments about "tag-based" and "use with client-side JS". It's not really correct to say every string going into the response buffer must be quoted. And it doesn't have to be a hair-puller to use with client-side JS. WCJS is a lot easier than that.<br /><br />For example, the following is taken FROM INSIDE A WCJS FUNCTION - as is.<br /><br /><br /> // a client-side script to track input characters in the message box<br /> %%<br /> <script language="javascript" type="text/javascript"><br /> function limitText(limitField, limitCount, limitNum) {<br /> if (limitField.value.length > limitNum) {<br /> limitField.value = limitField.value.substring(0, limitNum);<br /> } else {<br /> limitCount.value = limitNum - limitField.value.length;<br /> }<br /> }<br /> </script><br /> %%<br /><br />That goes right into the response buffer AND is a client side JavaScript function to boot. It's used to dynamically count input into a user field.<br /><br />dougDoug Lernerhttps://www.blogger.com/profile/11678300889147244104noreply@blogger.com