tag:blogger.com,1999:blog-63851107876828335172024-02-19T00:48:50.151-06:00Webcrossing Rocks!Join us for a grand tour of Webcrossing - it's our favorite platform for web application development, and we're dying to tell you why we think so.WebXRox Administratorhttp://www.blogger.com/profile/14607226383389012371noreply@blogger.comBlogger85125tag:blogger.com,1999:blog-6385110787682833517.post-44582564518771082862013-03-19T11:00:00.000-05:002013-03-20T08:42:16.519-05:00Why Webcrossing Server-side JavaScript (SSJS) is the scripting language you should choose<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><b><span class="Apple-style-span" style="font-family: arial;">Server-side JavaScript (SSJS) vs Web Crossing Template Language (WCTL)</span></b></span><br />
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">Webcrossing's Server-side JavaScript (SSJS) is based on standard JavaScript, so anybody with any scripting experience at all can get started very quickly. Beginners also will find SSJS easy-going because there are so many JavaScript tutorials and references available. (*1), (*2)</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">As <b>w3schools</b>, the go-to-place for web standards and scripting help states, "</span><span class="Apple-style-span" style="color: black; line-height: normal;"><span class="Apple-style-span" style="font-family: arial;">JavaScript is </span><i><span class="Apple-style-span" style="font-family: arial;">THE</span></i><span class="Apple-style-span" style="font-family: arial;"> scripting language of the Web. </span></span><span class="Apple-style-span" style="color: black; line-height: normal;"><span class="Apple-style-span" style="font-family: arial;">JavaScript is used in billions of Web pages to add functionality, validate forms, communicate with the server, and much more. J</span></span><span class="Apple-style-span" style="color: black; line-height: normal;"><span class="Apple-style-span" style="font-family: arial;">avaScript is easy to learn. You will enjoy it." (*2)</span></span><span class="Apple-style-span" style="font-family: arial;"><br />
<br />
Webcrossing also has an older scripting language called Web Crossing Template Language (WCTL). WCTL is completely unique to the Webcrossing platform, and rather awkward to use. In this post I'll give a few examples of why SSJS is preferable to WCTL for new development, and why it is also generally easier to use, read and learn.</span></span><span class="Apple-style-span" style="font-family: arial;"><br />
</span><br />
<div>
<span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">While this is true, many of the out-of-the-box scripts (or "templates" as they are sometimes called in Webcrossing lingo) go way back, before SSJS was created, and are still written in WCTL. Until WCTL-based scripts are completely replaced, developers often encounter WCTL sections of existing code, so they should have some familiarity with the WCTL syntax. Hopefully WCTL will disappear over time and Webcrossing developers will be able to avoid two learning curves.</span></span><span class="Apple-style-span" style="font-family: arial;"><br />
</span><br />
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">However, if you are creating a completely new Web 2.0 application from scratch, you can blessedly ignore WCTL altogether and just concentrate on object-oriented server-side scripting using SSJS.<br />
<br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><b>SSJS has all the control structures WCTL lacks</b><br />
<br />
There are many things which are quite awkward to accomplish in WCTL, because of the lack of standard control structures. Those same tasks are quite easy in SSJS. </span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">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 />
</span></span><br />
<blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% set n 1 %%</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% while n <= 10 %%</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% n %%,%% n*n %%<br></span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% set n n + 1 %%</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% endwhile %%</span></span></blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">(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 more simply as:<br />
</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"></span></span><br />
<blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">for (var n=1; n<=10; n++) response.append (n + ',' + n*n + '<br>');</span></span></blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">Or if you want to use the SSJS "+" shortcut for response.append you could write it this way:<br />
<blockquote>
for (var n=1; n<=10; n++) {<br />
+ n + ',' + n*n + '<br>';<br />
}</blockquote>
SSJS uses response.append() to build the "response buffer" (the page being dynamically created to serve to client browsers) instead of client-side document.write(). Otherwise, this example looks like ordinary JavaScript.</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">While WCTL only has while loops, SSJS has all the control structures of standard JavaScript, including while loops, for loops (both incremented and for/in loops for associative arrays) and do/while loops.</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">SSJS also has switch statements, which are not available in WCTL. </span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">Other basics missing from WCTL, all present in SSJS, include:</span></span></div>
<div>
<ul>
<li><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">local variables, </span></li>
<li><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">functions with parameters, </span></li>
<li><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">labels, </span></li>
<li><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">arrays, </span></li>
<li><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">objects and </span></li>
<li><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">numbers. </span></li>
</ul>
<span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">(In WCTL you can perform limited integer arithmetic using strings as numbers, but the number 1 is equal to the string "1" because strings are WCTL's only data type).</span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><b>Setting/accessing stored node and user properties</b></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">Because of the way Webcrossing interacts with its native object-oriented database, there are no separate SQL databases to set up, and no tables or database schemas to design.</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">One of the great joys of Webcrossing's object-oriented database is that you can directly attach properties to any node - folders, files, messages, discussions, etc., and also to users. </span></span><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">Webcrossing lets you just add properties and use them whenever and wherever you like.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">Given this inherent simplicity, you want to be able to set and access these properties easily in your scripts. </span></span><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">This process is conceptually much easier in SSJS than it is in WCTL.</span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;"><br />
</span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">Let's compare the two. </span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;"><br />
</span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">Suppose you have a root level folder /someFolder. To that folder, you want to attach a property called "color" and set its value to "blue." Remember, we don't need to first create a field in a record in a table anywhere, as would be required with an SQL-based system. We can just "do it."</span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: arial;"><span class="Apple-style-span" style="line-height: 18px;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">In WCTL, however, this is awkward compared to "just doing it" in SSJS. In WCTL </span></span><span class="Apple-style-span" style="color: #333333; font-family: arial; line-height: 18px;">you have to perform a strange programming maneuver where you first save your current location, then go to the location in question, set the value, and finally return to your current location, like this:</span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"></span></span><br />
<blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% set currentLocation location %%</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% setPath("/someFolder") %%</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% set path.color "blue" %%</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">%% setPath(currentLocation) %%</span></span></blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">This does get old rather quickly.<br />
<br />
In SSJS this could be written as simply as:<br />
</span></span><br />
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"></span></span><br />
<blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">Node.lookup("/someFolder").color = "blue";</span></span></blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">I think this is clearly conceptually easier for beginners than the WCTL version, is definitely easier in daily scripting practice, and is also much easier to read.<br />
<br />
For setting user properties, it is similarly awkward in WCTL and direct in SSJS. The SSJS version is as simple as:</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"></span></span><br />
<blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">User.lookup("doug").color = "blue";</span></span></blockquote>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><b>Conclusion</b></span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
I think it's obvious that SSJS is the preferred way to get started for (1) standards compliance, (2) clarity, (3) ease-of-use, (4) available structures, (5) available data types, (6) easiest access to nodes and users in the database and (7) easiest for beginners to learn, with vast learning resources available.<br />
<br />
doug</span></span></div>
</div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">(*1) I learned JavaScript originally through what is still my favorite reference: "JavaScript, The Definitive Guide" by David Flanagan. This is part of the well-regarded O'Reilly series. The book gets revised regularly to keep things up-to-date. If you are completely new to JavaScript, even reading just the first four chapters will open up a world of knowledge to you. And all the core JavaScript objects and their methods (strings, dates, etc.) are in their own easy-to-find sections. </span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;"><br />
</span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial;">(*2) Online, w3schools has a great JavaScript tutorial at http://www.w3schools.com/js/default.asp. </span></span></div>
<div>
<span class="Apple-style-span" style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><br />
</span></div>
</div>
Doug Lernerhttp://www.blogger.com/profile/11678300889147244104noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-67771472316163276822011-10-06T02:32:00.002-05:002013-03-19T14:36:54.882-05:00Steve Jobs, 1955-2011<div class="separator" style="clear: both; text-align: center;">
As remembered on Apple's home page,</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyCTDeem-b9rN7nyvC8pA1L08DXnpQuzZennVzyaHdPc0xUyUxlZCp45w0empowNS-rI98alTcxWGKZWzROlhyphenhyphen3Z6dGmNW5uNck1qKLLLpThZM3eM6cMH2d3hZCQyaybWeZyomOeN3fks/s1600/Screen+shot+2011-10-06+at+6.20.46+AM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyCTDeem-b9rN7nyvC8pA1L08DXnpQuzZennVzyaHdPc0xUyUxlZCp45w0empowNS-rI98alTcxWGKZWzROlhyphenhyphen3Z6dGmNW5uNck1qKLLLpThZM3eM6cMH2d3hZCQyaybWeZyomOeN3fks/s400/Screen+shot+2011-10-06+at+6.20.46+AM.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
...and by boingboing.net</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgT2b-9u4R1v_giMLwszPPAfJpRbcMfcPaQhV-YeDB_hBAjqvgKDaNXZtKjKz_Q25FEknqXHWcOoDDf9mYLkjweuIaAPZ5cZKYIZMGT-kofa6yJOKhTEA6gGnkgDEKkFTk7L3e9gMScw/s1600/Screen+shot+2011-10-06+at+6.57.03+AM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgT2b-9u4R1v_giMLwszPPAfJpRbcMfcPaQhV-YeDB_hBAjqvgKDaNXZtKjKz_Q25FEknqXHWcOoDDf9mYLkjweuIaAPZ5cZKYIZMGT-kofa6yJOKhTEA6gGnkgDEKkFTk7L3e9gMScw/s400/Screen+shot+2011-10-06+at+6.57.03+AM.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You may leave other found tributes or your own in the comments. Farewell, Steve.</div>
<span id="goog_1400481987"></span><span id="goog_1400481988"></span>Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-56069436931759075732011-08-08T07:04:00.000-05:002011-08-08T07:04:09.528-05:00Funday Monday - Who was the Wild Child?<span class="Apple-style-span" style="font-family: inherit; font-size: large;"><a href="http://www.bbc.co.uk/news/magazine-14215171">Who was Peter the Wild Boy?</a></span><br />
<br />
<br />
<div class="p1"><b>From feral child to "human pet" at court in Georgian England, Peter the Wild Boy caused a sensation. And new analysis of his portraits may have solved the mystery of his unusual characteristics.</b></div><div class="p1"><b><br />
</b></div><div class="separator" style="clear: both; text-align: center;"><a href="http://news.bbcimg.co.uk/media/images/54396000/jpg/_54396161_annotated_portrait_464_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://news.bbcimg.co.uk/media/images/54396000/jpg/_54396161_annotated_portrait_464_2.jpg" width="250" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: left;"> </div><div class="p1"><span class="Apple-style-span" style="font-size: x-small;">New analysis of this portrait suggests Peter had a rare genetic condition known as Pitt-Hopkins Syndrome, indicated by:</span></div><ol class="ol1"><li class="li2"><span class="Apple-style-span" style="font-size: x-small;">His short stature</span></li>
<li class="li2"><span class="Apple-style-span" style="font-size: x-small;">Lustrous mop of thick curly hair</span></li>
<li class="li2"><span class="Apple-style-span" style="font-size: x-small;">Hooded eyelids</span></li>
<li class="li2"><span class="Apple-style-span" style="font-size: x-small;">Cupid's bow mouth, with a pronounced curve to the upper lip</span></li>
<li class="li2"><span class="Apple-style-span" style="font-size: x-small;">He disliked clothes, but was wrestled daily into a green suit</span></li>
<li class="li2"><span class="Apple-style-span" style="font-size: x-small;">Pictured holding acorns and oak leaves - symbolic of living wild in the woods - and some fingers on his left hand (not seen) were fused</span></li>
</ol><br />
<blockquote><b><br />
</b></blockquote>WebXRox Administratorhttp://www.blogger.com/profile/14607226383389012371noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-22083036485672646282011-08-02T09:00:00.001-05:002011-08-02T09:00:02.934-05:00Building a Conversation with 500 Students<span style="color: #336666; font-size: 14px; font-weight: bold;">This article appeared as a <i>Syllabus</i> "Case Study", July 2001, page 10. Even after all these years, I find that it still holds up. It was exciting to create a multi-directional Socratic dialogue with a class of 500 students - using Webcrossing software for the dialogue backbone freed me to focus on the students.<br />
<span style="color: black;"><br />
</span></span>FACE-TO-FACE WITH VIRTUAL COMMUNITIES <br />
<span style="color: #336666; font-size: 14px; font-weight: bold;"><span style="color: black;"></span><span style="color: black;">Building a Conversation with 500 Students<br />
</span></span><span style="color: black; font-size: 14px; font-weight: bold;"><i>Syllabus</i> "Case Study", July 2001, page 10</span><br />
<span style="color: #336666; font-size: 14px; font-weight: bold;"><span style="color: black;"><br />
</span></span>Americ Azevedo has 500 students in his Introduction to Computers course at the <st1:placetype st="on">University</st1:placetype> of <st1:placename st="on">California</st1:placename>, <st1:place st="on"><st1:city st="on">Berkeley</st1:city></st1:place>. Despite that, his teaching philosophy embodies the principles of the Socratic method. What makes this apparent contradiction possible is discussion software, a technology that enables him to “teach” and interact with his students outside of class in a flexible, dynamic way. Discussion software connects him, his students, and the TAs for the course, and allows them to communicate much more directly and frequently than they otherwise could.<br />
<br />
<div class="MsoBodyText">Azevedo, who has taught courses in computers and human/computer interaction at several institutions, has always believed that the Socratic method is right approach to teaching. In courses with smaller enrollments, he has usually relied upon open-ended questions and in-class discussion while simultaneously tinkering with online discussion formats to supplement the ongoing Socratic dialogue. However, faced with the prospect of teaching hundreds of students in a large lecture hall three days a week for 50 minutes, Azevedo knew that in-class discussion would be nearly impossible and that he’d have to rely on online discussions to achieve his goals.<br />
<br />
</div><div class="MsoBodyText">The immediate benefit of using discussion software has been an increase in participation by his students and a chance for him to get to know some of them quite well. “I can call up a list of all of their contributions to the course and see what they’re like quite easily.” Says Azevedo. “Through the use of the software I get a chance to hear the ideas and concerns of a large number of students. It also allows the shy students to participate as actively as the more outgoing ones.”<br />
<br />
</div><div class="MsoBodyText">Flexibility was one of his primary concerns. “Most of the software that exists for course management is content-centered,” notes Azevedo. “It locks you into specific topics and doesn’t allow discussions to grow naturally.” Because it had many of the features he was looking for, Azevedo decided to try Webcrossing in the course. “What like about Webcrossing is that it’s discussion-centered and allows students to generate new topics, or threads, if they want to. It is really an experiment in developing a pattern language, a new way of submitting thoughts.”<br />
<br />
</div><div class="MsoBodyText">Azevedo’s class site had topics that he’s generated, where he can post course information, posit questions, and link to other useful sites. It also includes many student-generated threads. In addition, the course is supported by the full array of UC Berkeley’s technology tools. For instance, through the Berkeley Internet Broadcasting Network, Azevedo has captured streaming video of all of his lectures. Students can link to these from the class site. Coupled with dynamic lecture notes, PowerPoint slides, and online assignments, the site is a rich resource for both discussion and study. “With these resources in place,” he notes, “we could expand the enrollment of the course to a distance learning situation with twice or four times as many students.”<br />
<br />
</div><div class="MsoBodyText">E-mail is a part of Azevedo’s package as well. He is experimenting with the use of e-mail to communicate with his students, posting information about upcoming lectures to a listserv. Based on student responses, he can tailor the lecture to address the material they need specific help with, and skip what they’ve already absorbed. This has led to some interesting student-contributed material. “I asked them to define some terms that are used in the computer industry,” he says. “The students generated some very interesting metaphors that I used in lecture.”<br />
<br />
</div><div class="MsoBodyText">Azevedo’s Introduction to Computers also has a lab requirement. “With 18 sections of labs 4 hours a week, we’re using all the available lab space,” he says. In the future, he hopes to use discussion software to enhance the laboratory experience, allowing the students in each lab section to communicate with each other and with the TA on projects. He’s also planning to experiment with a CyberLab that would replace some of the lab sections.<br />
<br />
</div><div class="MsoBodyText">According to Azevedo, discussion software can enhance not only large lecture courses, but smaller enrollment courses as well. “When I used it with small classes, it generated a lot of excitement,” he notes. “There was more personal engagement than you get with a large course. My students generated hundreds of pages of text, and the themes just grew and expanded organically.”<br />
<br />
</div><div class="MsoBodyText">In his large course, Azevedo has found that students don’t necessarily participate as much, but he has been surprised by the level of response at times. “I started a debate about participation credits: should students get credit for participating in these large lecture courses? This produced a raging debate on Webcrossing. It was a level of expression that you would normally never get in a large class. Students contributed ideas about how the course should be graded, some of which I incorporated into the course.”<br />
<br />
</div><div class="MsoBodyText">He adds, “My co-teachers, Nicholas Cravotta, quickly adopted the new environment. For instance, he was able to give quick public feedback to a discussion topic led by student-generated questions. Normally, students would never get this kind of feedback in a large class.”<br />
<br />
</div>Americ Azevedohttp://www.blogger.com/profile/08144977848626720350noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-79367547117489857002011-07-31T22:44:00.000-05:002011-07-31T22:44:19.012-05:00Early Funday Morning Lolcat<a href="http://icanhascheezburger.com/2011/07/31/funny-pictures-it-aint-just-for-dogs-anymore/?utm_source=embed&utm_medium=web&utm_campaign=sharewidget"><img alt="funny pictures - It ain't just for dogs anymore." class="event-item-lol-image" height="512px" src="http://icanhascheezburger.files.wordpress.com/2011/07/funny-pictures-it-aint-just-for-dogs-anymore.jpg" title="funny pictures - It ain't just for dogs anymore." width="378px" /></a><br />
see more <a href="http://icanhascheezburger.com/?utm_source=embed&utm_medium=web&utm_campaign=sharewidget">Lolcats and funny pictures</a>, and check out our <a href="http://memebase.com/category/socially-awkward-penguin/">Socially Awkward Penguin lolz!</a>Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-29629357749886333972011-07-29T10:21:00.000-05:002011-07-29T10:21:46.421-05:00Debugging with log filesThe easiest way to debug with Webcrossing is to just print values to the screen:<br />
<br />
<tt>myvar: %% myvar %%<br></tt><br />
<br />
or<br />
<br />
<tt>+ 'myvar: ' + myvar + '<br>';</tt><br />
<br />
But sometimes - especially inside filters - it isn't possible (well, not practical) to do this. Or maybe you are trying to catch an elusive bug on a production server and printing to the screen is not an option. In that case, you need to write a log file with the values in it which you can examine after processing.<br />
<br />
Let's use a debug file called, well, "debugFile".<br />
<br />
In WCTL, the syntax is like this:<br />
<br />
<tt>%% "debugFile".fileWrite( "myMacro ran" & crlf ) %%</tt><br />
<br />
or<br />
<br />
<tt>%% "debugFile".fileWrite( "myVar:" & myVar & crlf ) %%</tt><br />
<br />
In SSJS, it looks like this:<br />
<br />
<tt>"debugFile".fileAppend( "myMacro ran" + '\r\n' );</tt><br />
<br />
or<br />
<br />
<tt>"debugFile".fileAppend( "myVar:" + myVar + '\r\n' );</tt><br />
<br />
You can add timestamps too if you intend to leave the debug code in for a while.<br />
<br />
When you're ready to look at it, the debugFile file is in the /system directory on your server (if viewing from FTP) or the /webx directory (if viewing from the server's operating system itself).Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-91357750481023336292011-07-28T09:00:00.000-05:002011-07-28T09:00:05.193-05:00Debugging SSJS - What the heck am I looking at?If you have an error in a WCTL script file, the error and its location will be written into the webx.log file, a warning message will appear on the cache reset screen, and as Sue has pointed out the existence of the error - if not its provenance - is often made obvious when your site appearance goes pear-shaped. Errors in SSJS syntax can be a little more difficult to track down, if for no other reason than JS is more frequently used for backend-type functions where nothing gets written to the screen directly. If you have an error in a filter, for example, the only sign of it may be that the filter doesn't give the expected results.<br />
<br />
One way to deal with this is to put all the significant pieces of your code inside a try/catch structure and write an exception handler. That's certainly best-practice for production code, but during development the Webcrossing server will provide you with a wealth of information, really an embarrassment of riches, for any uncaught exception in your JS code.<br />
<br />
All you have to do is look in your /system folder for files named in the format of logJsErrorN.html (where N is an integer). One gets written whenever an exception is thrown. It's an HTML file, it can run to be upwards of 3000 lines, and there will rarely be a time when anything past the first couple of dozen lines will be of use to you. Here's an example:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjblxwHXvjBEN9MPJFKR13mcjjv7nZPzDgmtLhMuYqHNs2guH5YAbfwLlTeJMDk1gucey-LjtvMJxSCWfdb1GWNCbei_IXqNiLmpKsL465CRvINQUdlEFKTG9_uqEc71SWJ2_ndv14P44c/s1600/Screen+shot+2011-07-27+at+7.26.26+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjblxwHXvjBEN9MPJFKR13mcjjv7nZPzDgmtLhMuYqHNs2guH5YAbfwLlTeJMDk1gucey-LjtvMJxSCWfdb1GWNCbei_IXqNiLmpKsL465CRvINQUdlEFKTG9_uqEc71SWJ2_ndv14P44c/s640/Screen+shot+2011-07-27+at+7.26.26+PM.jpg" width="640" /></a></div><br />
The heading gives you a timestamp for the exception, tells you the name of the routine that failed, and the type of exception it threw. Then the next section gives the values of the routine's arguments and any local variables when the exception occurred. In the next section is listed the exact line of the function where the exception occurred - so it's worthwhile to keep your code clean and well-blocked. The last likely-to-be-useful line is the stack trace, showing you exactly how you got to where the exception was thrown.<br />
<br />
Now, the next 2000-odd lines are an enumeration of every single object in the execution context at the moment of the exception: every global, every function, every built-in method and property. I'm sure there are circumstances where this information can be useful, but I've never run into one!Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-1310763726076444762011-07-27T09:00:00.001-05:002011-07-27T09:00:00.262-05:00Dealing with compile errors and the dreaded Square ToolbarSo let's say you're happily developing along with Webcrossing and after your latest cache reset you happen to notice that your toolbar has gone from this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXNVdVNm0woDsfFRNrs5RxDe0A-iQz_Vlnv8ziY15CgZ30zsX-gNwg7HZWH9amBxcVUyqiJ3Xc-ExU4OLtJjvNbDMRR1jhKutv0LH2uUY3TsOR4h41_O878ZepM5ULfS3-f1vOr-IaA-Fq/s1600/Screen+Shot+2011-07-26+at+11.44.13+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXNVdVNm0woDsfFRNrs5RxDe0A-iQz_Vlnv8ziY15CgZ30zsX-gNwg7HZWH9amBxcVUyqiJ3Xc-ExU4OLtJjvNbDMRR1jhKutv0LH2uUY3TsOR4h41_O878ZepM5ULfS3-f1vOr-IaA-Fq/s1600/Screen+Shot+2011-07-26+at+11.44.13+AM.png" /></a></div><br />
to this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-_McFjoWQD-7h6VTzG3AiA2yF-ohtLmWGeM-lqdeHjav2yo8BJo3y8rvCEYSG1YhtV0QGLGP_pEgH_oIZrvgNJwE0FmKyB4J5Wq7ZkFOPbD0LRQ9NYFgZ9WuROU_NiOQTzH_JQYddoIDx/s1600/Screen+Shot+2011-07-26+at+11.46.48+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-_McFjoWQD-7h6VTzG3AiA2yF-ohtLmWGeM-lqdeHjav2yo8BJo3y8rvCEYSG1YhtV0QGLGP_pEgH_oIZrvgNJwE0FmKyB4J5Wq7ZkFOPbD0LRQ9NYFgZ9WuROU_NiOQTzH_JQYddoIDx/s1600/Screen+Shot+2011-07-26+at+11.46.48+AM.png" /></a></div><br />
Congratulations! You've just encountered the dreaded Square Toolbar. Often there is a lot more than that amiss, but sometimes the Square Toolbar is the most obvious thing wrong. What it means is that you've got a compile error - somewhere in your code you likely have a missing or an extra WCTL <tt>%%</tt>, or a missing or extra SSJS curly brace <tt>{ }</tt>. Or perhaps your SSJS functions are not surrounded by the requisite <tt>%%'s.</tt><br />
<br />
Technically, what has happened is that the script version of the toolbar, either a custom one or one of the toolbar plugins, is failing to load because of your compile error, so the square toolbar is coming directly from the code in the binary - a fallback, if you will.<br />
<br />
The first thing to do is to check <tt>webx.log</tt>. The exact compile error should be listed there, with at least some clue about what is wrong in what macro or function. Usually from that you can figure out what to fix. Rarely, though, especially if you have two offsetting errors (two separate extra <tt>%%</tt>'s, for example, in different places), you will find there is no actual complile error.<br />
<br />
What to do then? The most logical place to look, of course, is the file or files you've just updated. Often a quick glance is all it takes to find the error. But sometimes it's not all that obvious what's wrong. Maybe someone else just handed something off to you and you're not at all sure what they just did, or where to start looking. If you have any suspicions at all, it's worth trying to turn off those suspicious template files by renaming them (say, <tt>myfile.auto</tt> becomes <tt>myfile.autoOFF</tt>). If your error goes away when you reset the cache, you know where to look.<br />
<br />
But sometimes you simply have no clue at all.<br />
<br />
Then you have to resort to the brute force method. It's ugly, but it works. First, you need to identify the file the error is in, and secondly, where it is in the file. To do this, create a small text file with only this in it:<br />
<tt><br />
%% macro hello %%<br />
Hello, world!<br />
%% endmacro %%<br />
</tt><br />
Name it with a name which will ensure it loads alphabetically BEFORE any of your other template files, something like <tt>aaaaaaHello.auto</tt>. Put it in your templates directory and reset the cache. Then, in the browser location bar, call your macro hello:<br />
<br />
<tt>http://yoursite.com?hello</tt><br />
<br />
You should see "Hello, world!" on the screen. Good. (If not, your problem is probably in webx.tpl itself, or perhaps one of the handful of template files that load unconditionally before anything else. If you encounter this, the log file <tt>webxIncludes.log</tt>, which is rewritten after each cache reset, can be helpful to show you what's loading and in what order.)<br />
<br />
If all was well with your <tt>aaaaaaHello.auto</tt> file, rename it so that it loads after some of your template files, maybe <tt>mmmmmmHello.auto</tt>. Test again. If you see "Hello, world!", you'll know that everything alphabetically up to your <tt>mmmmmmmHello.auto</tt> file is OK, no errors. Your error is in one of the other files further down alphabetically. Otherwise, your error is somewhere before. Rename your file again and try again, until you narrow down a single file with the error. Rename that suspect file so it doesn't load, as described above. Test again, and you shouldn't have an error.<br />
<br />
Now that you've identified the problem file, you've got to find the exact function or macro with the error. If it's not obvious looking at the file, remove your small text file with <tt>macro hello</tt> in it, and copy <tt>macro hello</tt> into the middle of the problem file. Test again. If all is well, your error is further down the file. Keep moving <tt>macro hello</tt> until you identify exactly which function or macro is causing trouble. If you can't find it by eyeballing it at that point, remove chunks of code from the function or macro in logical blocks (like an entire "if" structure, etc.) so that the removal itself doesn't cause a complile error. Eventually you will find the chunk of code that is causing issues and from there, you can fix it.<br />
<br />
Whew. And I bet you've still got hair left!Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-55178366117590788582011-07-26T09:00:00.001-05:002011-07-26T09:00:01.176-05:00Creating Attachments ManuallyIn a Webcrossing standard install, the forms to add a folder, discussion, or message all have a field to attach a file. Attached files show as hotlinks when the node is displayed. (There's also a configuration option to show images inline rather than as a download.)<br />
<br />
While there are commands in both WCTL and SSJS to add an attachment to a node, the command takes as an argument an already-existing attachment on another node. One might reasonably ask, how do you script the creation of a new attachment from scratch? It's far from unusual to have to home-brew your node-creation process; sometimes a spec is odd enough that not even with the use of the pre- and post- filters can you shim the program's default behavior. There are scripting commands that directly replicate every part of the node-creation process, except for this one.<br />
<br />
Fortunately, it only takes a little extra work. What's really going on is that when attachments are uploaded, they get saved with a MIME wrapper. That sounds like voodoo, but in truth all it means is that a couple of lines of plaintext are prepended to the file's binary content. The content of that header will be familiar to anyone who's ever perused the full headers on an email message. It might look something like this:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Content-Disposition: form-data; name="enclosure0"; filename="IMG_0002heads.jpg"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Content-Type: image/jpeg</span><br />
<br />
<span class="Apple-style-span" style="font-family: inherit;">This information gets sent by the browser when the upload is transmitted, and it's used to determine how the file should be handled by other clients.</span><br />
<br />
<span class="Apple-style-span" style="font-family: inherit;">The first step to capturing this is to make sure that your <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><form></span> element includes the attribute </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">enctype="multipart/form-data".</span> Leave that off, and only the file names will be uploaded, and you'll be snatching yourself bald trying to figure out why. But once you do that, all you need is to include this SSJS in your processing routine:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">var z = form["inputName"];</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">var h = Mime.formHeader("inputName");</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">var attach = new ByteBuffer();</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">attach.append( h );</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">attach.crlf();</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">attach.crlf();</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">attach.append( z );</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">if (z.length > 0) var attachmentLocation = location.nodeAddAttachment( attach );</span><br />
<br />
This code takes the upload from an file input field whose name is "inputName" and extracts the MIME wrapper, then concatenates it with the binary data to make a well-formed attachment. And that's all there is to it.Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-58094323905999551642011-07-25T13:26:00.002-05:002011-07-25T13:26:09.799-05:00Funday: Go, Gus, Go!<iframe width="425" height="349" src="http://www.youtube.com/embed/zt7rXE9vhNY" frameborder="0" allowfullscreen></iframe>Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-76311522729077297302011-07-25T12:40:00.001-05:002011-07-25T12:40:54.004-05:00Funday: What we have here is a failure to communicate<iframe width="560" height="349" src="http://www.youtube.com/embed/pTstzR4gwAw" frameborder="0" allowfullscreen></iframe>Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-53045408377671271362011-07-22T10:15:00.000-05:002011-07-22T10:15:19.549-05:00Webcrossing SubscriptionsWebcrossing Community allows registered users to "subscribe" to various folders and discussions. What this means is that the software will track which messages they've read and show them only the new messages. What happens after that depends on the type of subscription the user signs up for.<br />
<br />
You can allow users to do any (or none!) of the following:<br />
<ul><li><b>Subscribe by web</b> - users either go to the Message Center for a list of their new messages, or click Check Subscriptions in the toolbar on any page. Each time Check Subscriptions is clicked, the users will be taken directly to the next new message on their list without having to return to the Message Center in between.<br />
<br />
This is really an amazing "power tool" that many sites don't understand and subsequently turn off. It allows somebody to instantly view all the new material on the site (in the areas they're interested in) without clicking around or being inundated by email notifications.</li>
<li><b><span class="Apple-style-span" style="font-weight: normal;"><b>S</b></span>ubscribe to email for individual posts</b> - users receive whole posts in email</li>
<li><b><span class="Apple-style-span" style="font-weight: normal;"><b>S</b></span>ubscribe to email notification for individual posts</b> - users receive links back to the forum and notification that a post has been made, but must visit the forum to read the new messages. Users will not receive further notification until they have visited the forum and read the unread messages. This prevents spamming people with notification messages before they are ready to visit.</li>
<li><b><span class="Apple-style-span" style="font-weight: normal;"><b>S</b></span>ubscribe to email digests</b> - users receive an email digest of all new posts, arranged by discussion, emailed at the time of their choice. The interesting thing about this is that digests don't come at some time determined by the site owner or whenever there is enough material, but instead at the time the user chooses. You an get 24 digests a day if you want - one an hour. Or just one a day. Or just one a week.</li>
</ul><div align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfnmQbhy1nd30A737ENFKc0FcTroNiqM5ojZUxg7hX239vARRi_DwClUg4mA_mwbIF0nJhcGfSY-XaHAHeffJvrlJdBJSUvO8Jmq9aGwC0TeCl1Bd3Dz8hnz3unncyRZ1Op8xoWEvNieXN/s1600/Screen+shot+2011-07-08+at+12.09.27+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfnmQbhy1nd30A737ENFKc0FcTroNiqM5ojZUxg7hX239vARRi_DwClUg4mA_mwbIF0nJhcGfSY-XaHAHeffJvrlJdBJSUvO8Jmq9aGwC0TeCl1Bd3Dz8hnz3unncyRZ1Op8xoWEvNieXN/s640/Screen+shot+2011-07-08+at+12.09.27+PM.png" width="640" /></a></div><br />
<br />
Users can subscribe to everything, nothing, or any combination of subscription methods - to the entire site, or to just a subset of areas that interest them. You could subscribe by "check messages" to the Dogs folder and by email digest to the Cats folder. The only limitation is that full notifications vs. individual post notifications is a sitewide setting for the user.<br />
<br />
Subscriptions are definitely a "power feature" of Webcrossing Community. Webcrossing Neighbors has some additional subscription features by virtue of its social networking emphasis.Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-80178443290068439932011-07-20T10:13:00.000-05:002011-07-20T10:13:26.350-05:00My Favorite Commands - Filter userChangeFilterPostThis command is a personal favorite of mine, not just because it's uniquely useful but because it was the first major piece of code that I wrote in the binary all by my lonesome. :-)<br />
<br />
This SSJS filter gives you a real-time hook into any change of a user record, in much the same way that the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">*editFilterPre</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">-Post</span> give you a real-time hook into changes of nodes in the folder/discussion/message hierarchy. When is this useful? Well, originally it was implemented to keep an external authentication database in sync with Webcrossing's database. For various reasons the client needed to be able to change user data from either direction so we wrote this filter so that it would fire whenever a user changed any field in their preferences or any other field in the user record was changed by a system process.<br />
<br />
The filter also proved useful in a realtime forensics situation where a client suspected unauthorized access; with a <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">userChangeFilterPost</span> filter configured to send alerts it was possible to watch events as they unfolded rather than spelunking the logs afterwards.<br />
<br />
The filter works simply: when it fires, two special globals are defined: <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">changedUserId</span> is the userId that was changed and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">changedFieldName</span> is the name of the property that was altered; that includes both the built-in and custom properties. So the basic syntax is<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">var theUser = User.open(changedUserId);</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">theUser[changedFieldName]</span><br />
<br />
to access the altered property. (Note the brackets syntax; <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">theUser.changedFieldName</span> treats the variable as a string literal which is not what you want.)<br />
<br />
Like always, the User.open should be inside a try/catch structure because if the user has been deleted by some other process, it will throw an exception and halt processing.Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-48714475886293210702011-07-18T07:35:00.000-05:002011-07-18T07:35:45.624-05:00Funday Monday: everybody into the pool!<div class="separator" style="clear: both; text-align: center;"><a href="http://www.boingboing.net/2011/07/16/watercat_v1.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="http://www.boingboing.net/2011/07/16/watercat_v1.gif" width="320" /></a></div>Credit Xeni Jardin, <a href="http://www.boingboing.net/2011/07/16/summertime-caturday.html">BoingBoing.net</a>.Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-58538506025571529532011-07-15T09:00:00.000-05:002011-07-15T09:00:16.610-05:00My Favorite Commands: Image manipulationWay back in the dark ages when Webcrossing was "just" a message board, its developers came up with the radical idea of allowing users to upload little pictures to go with their user accounts. Wacky, right?<br />
<br />
As an outgrowth of that, Webcrossing has a small but powerful set of image manipulation commands, so that users need not be limited to uploading files of only certain sizes or dimensions. Using these commands you can post-process any JPEG or GIF uploads to fit whatever requirements you choose to establish. The commands are:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">image.imageCropToJpeg(top, left, width, height, quality)</span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">top</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">left</span> define the upper left corner of the portion of the image to crop, based on 0,0 as the upper left corner of the image. <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">width</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">height</span> are in pixels and define the size of the portion to crop, and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">quality</span> is a percentage defining the compression and hence quality of the JPEG the command returns.<br />
<br />
i<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">mage.imageResizeToJpeg(percent, quality)</span><br />
<br />
This command proportionally resizes your image proportionally. <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">percent</span> is the percent to scale (which can be larger than 100).<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">image.imageResizeWHJpeg(width, height, quality)</span><br />
<br />
This command allows you to resize to a specific width and height (in pixels), and can be non-proportional.<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">image.imageRotateToJpeg(degreesCounterclockwise, quality)</span><br />
<br />
This command rotates the image counterclockwise. To rotate clockwise, use 360-[clockwise rotation].<br />
<br />
All of these commands return the altered image as a stream of binary data which you can save directly to file. The parameter <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">image</span> is the binary data of the original file, and getting that may not always be completely obvious. Here's a little helper function that will extract the binary data from an attachment. This function can also be used to get the data of a file attached to an incoming email message.<br />
<br />
<br />
<pre>%% function getImageData(enclosureLoc) {
var image = Stored.lookup(enclosureLoc);
if (image.storedIsDocument && image.documentIsImage) {
return Mime.getBody(image.documentData);
} else {
return "";
}
} %%
</pre><div><br />
</div>Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-2071513322655856822011-07-13T10:44:00.000-05:002011-07-13T10:44:56.204-05:00Creating Email Lists in Webcrossing<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMzrg6m724-3r9AxDFHivgH0lw_LyUDBnB1IIVVvChTYLBCSOB_X_ni1HzbhkGouUcyvqskwfg5rvgB9b3S2Q509oBVz473WANVg75A2agehNGHOtDQW1qWK1n06bxj_HuIoxDIWBMBOo/s1600/%255B11-07-08+122420_889%255D+Safari+Site+Name+-+Edit+Folder.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMzrg6m724-3r9AxDFHivgH0lw_LyUDBnB1IIVVvChTYLBCSOB_X_ni1HzbhkGouUcyvqskwfg5rvgB9b3S2Q509oBVz473WANVg75A2agehNGHOtDQW1qWK1n06bxj_HuIoxDIWBMBOo/s640/%255B11-07-08+122420_889%255D+Safari+Site+Name+-+Edit+Folder.png" width="352" /></a>Building on the concept of email subscriptions, Webcrossing allows you to create email lists - archived on the web and fully searchable.<br />
<br />
First, turn on full-email subscriptions as an option. This means users who subscribe by this method will receive a copy of each post by email - as you can see, this is already half of the equation. Now you just need to enable post-by-email. Now create a folder you want to hold your email archives. In the folder settings, there is an option to "make this folder an email list." That's all you need to do. Anybody who is subscribed by email can reply back and it will be posted on the web, filed appropriately in the correct discussion in the correct folder.<br />
<br />
There is a page of settings (image at right) where you can tweak various aspects of your list, like what the reply address is, or add any special headers you want added. <br />
<br />
You can also mirror external email lists or copy all posts from your list to some other address (such as another external list).<br />
<br />
There is also a "Mailing List Administration" plug-in to make managing your user lists easier.<br />
<br />
All in all, it's quite handy, and quite flexible.Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-64069048865226755582011-07-12T09:00:00.000-05:002011-07-12T09:00:11.825-05:00Webcrossing QuirksWe've talked about WCTL before, about how it is a fast, easy language which is great for UI, but that it's a little, well, quirky.<br />
<br />
There are a few quirks in Webcrossing itself, just kind of goofy "what were they thinking" settings. Quirky, but a little cute, like a slightly cross-eyed Siamese kitten is quirky. The answer, of course, to what they were thinking is that in most cases some customer way back when paid to have that setting added. It made sense then, to them, but not to anybody since then.<br />
<br />
I want to emphasize to anyone reading this that except for #1, these are all <i>OPTIONS</i>. They are not turned on by default and an administrator has to explicitly turn them on before the server will function that way. Just to be clear that Webcrossing is not <i>totally</i> whacko.<br />
<br />
Here are some staff favorites:<br />
<ol><li><b>Shut down server link</b>. Remember, you need shell access to a terminal to start Webcrossing. So why would you want a "Shut down server" link in the control panel? Once you shut it down that way, you can't start it up again that way. Right now, it is two or three links from the bottom of the page so is more difficult to click accidentally. But I am old enough to remember it being right above the "Return to site" button, and I have clicked it accidentally more than once.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKCedwjR-Wd6Oq-KVim6ialbP93AFCD19zHnbvnru0SENo4w_lG3FHXabNtpItpdkr5i5AKxigCDsqzdM5DsEi7fMwKA41pV3y004kAYhnUTEOSH5B2EFD3AtVKh_u0JrALYp8d4e5bIpY/s1600/Screen+shot+2011-07-08+at+12.35.47+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKCedwjR-Wd6Oq-KVim6ialbP93AFCD19zHnbvnru0SENo4w_lG3FHXabNtpItpdkr5i5AKxigCDsqzdM5DsEi7fMwKA41pV3y004kAYhnUTEOSH5B2EFD3AtVKh_u0JrALYp8d4e5bIpY/s1600/Screen+shot+2011-07-08+at+12.35.47+PM.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div></li>
<li><b>Provisional users have full access before their email addresses are validated. </b>You can set the site to require that people respond to an email validation challenge. Before they respond, you can give them read-only access, moderated access, or full (participant) access. <b> </b>Why would you turn on provisional users and give them full access before you were sure their email address was valid? What's the point?<br />
<br />
<div align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieTS2n0STtGR8GUaU_4ygAjQKIn_96U14k60gvVj5y-SXK4BadWMerEs8t42Pq6EcVsBHIlhlIaG_a_KCGpTmZMUG9oErEpgmZX3UpXTXqtgMx-WRxm0FavNrwEAxIQNKWS_S-OModwSP2/s1600/Screen+shot+2011-07-08+at+12.46.43+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieTS2n0STtGR8GUaU_4ygAjQKIn_96U14k60gvVj5y-SXK4BadWMerEs8t42Pq6EcVsBHIlhlIaG_a_KCGpTmZMUG9oErEpgmZX3UpXTXqtgMx-WRxm0FavNrwEAxIQNKWS_S-OModwSP2/s320/Screen+shot+2011-07-08+at+12.46.43+PM.png" width="320" /></a></div><br />
</li>
<li><b>Registered users can edit or delete anyone's posts, not just their own. </b> Excuse me? Edit someone else's post if I'm not an administrator? <i>DELETE</i> someone else's post? I guess if you were building a wiki this might be useful, but in the ordinary course of forum management I can just imagine the havoc this could wreak :)<br />
<br />
<div align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNxmRWTpINmy9c2HuPpOfN2vaKxeMeul19V_0GWOuIORbJQDe1v1zaO9JtLyZAfx43iIKcOHJ6FyFLApzfqndnvFOSbq7RiI79XGISSqOFWOIQyBU8mI78YXAoQGrzr_eXxApRMACrfjX/s1600/Screen+shot+2011-07-08+at+12.31.49+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNxmRWTpINmy9c2HuPpOfN2vaKxeMeul19V_0GWOuIORbJQDe1v1zaO9JtLyZAfx43iIKcOHJ6FyFLApzfqndnvFOSbq7RiI79XGISSqOFWOIQyBU8mI78YXAoQGrzr_eXxApRMACrfjX/s400/Screen+shot+2011-07-08+at+12.31.49+PM.png" width="400" /></a></div><br />
</li>
<li>And, the more bizarre sibling of #3, <b>Guest users can edit or delete anyone's posts, not just their own. </b> You don't believe me? Here it is, right next to all the more reasonable settings like "guests can post messages" and "guests can add discussions." I dare you to turn this one on on <i>your</i> forum. ;-)<br />
<br />
<div align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbs7gZ3evixft6bEbG4DvLc10jcfB833U6A1H108hqoH9UDzDkqPI1NpQ9FhiA0KCnNSX7kOuG8yYDhc8kjNLGS2OSTp1asrwHVjAFK2Sq4PtoKCvhXiO6V3XuMPaiX-k0mQeLBPu_T3Cr/s1600/Screen+shot+2011-07-08+at+12.32.19+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbs7gZ3evixft6bEbG4DvLc10jcfB833U6A1H108hqoH9UDzDkqPI1NpQ9FhiA0KCnNSX7kOuG8yYDhc8kjNLGS2OSTp1asrwHVjAFK2Sq4PtoKCvhXiO6V3XuMPaiX-k0mQeLBPu_T3Cr/s400/Screen+shot+2011-07-08+at+12.32.19+PM.png" width="400" /></a></div></li>
</ol>Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-43773211949823707312011-07-11T12:49:00.003-05:002011-07-11T12:50:23.892-05:00Funday Monday, A Moment Of Awwww....Kitteh versus currycomb:<br />
<br />
<iframe width="560" height="349" src="http://www.youtube.com/embed/voBSgt3nkoc?rel=0" frameborder="0" allowfullscreen></iframe>Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-5064667232433034062011-07-07T09:00:00.002-05:002011-07-07T09:00:10.836-05:00Passing clientside data to the server with AJAXSue wrote <a href="http://webxrox.blogspot.com/2011/05/writing-client-side-javascript-inside.html">a post</a> about mixing clientside and serverside Javascript in Webcrossing. I want to touch briefly on a related topic, which is passing data back and forth between client- and server-side. It can get confusing, especially when you're writing in essentially the same language throughout, to remember what context you're in and what you have access to and what you don't.<br />
<br />
Where things can get really wacky is when you're using AJAX calls to change the contents of the browser window without a page refresh. Specifically, you have to remember that any local server-side variables you may have set outside of the AJAX'd content won't be there once you make an AJAX request. Here's a simple example, where I'll use WCTL to make it a bit easier to separate client from server.<br />
<br />
First, let's assume your page has the following AJAX call on it. (This example uses jQuery, the Javascript framework with which I'm most familiar.)<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">function whenYouClick() {</span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> $.get("/someNewContent",,function(newText) {</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> $('#newContentGoesHere').html(newText);</span><br />
<div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> });</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">};</span></div><div><br />
</div><div>If you're not familiar with jQuery, just take my word for it that this code will call the WCTL macro or WCJS command "<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">someNewContent</span>", and whatever it returns will replace the current contents of the DOM element with ID "<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">newContentGoesHere</span>".</div><div><br />
</div><div>Now, let's move down into the body of the page...</div><div><br />
</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">%% set initValue 25 %%</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><div id="newContentGoesHere"></span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">%% use someNewContent %%</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></div></span></div><div><br />
</div><div>And then, separate from this page macro, you have this macro:</div><div><br />
</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">%% macro someNewContent %%</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">%% set returnVal 2*initVal %%</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">%% returnVal %%</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">%% endmacro %%</span></div><div><br />
</div><div>It should be obvious what will happen when you first load this entire page. <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">someNewContent</span> will execute and evaluate to "50" which will become the content of the div. But now, what happens if the clientside function <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">whenYouClick()</span> makes the AJAX call? <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">someNewContent</span> will execute again, but outside of the context of the entire page, that local variable <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">initVal</span> is not defined. <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">returnVal</span> will be 0.</div><div><br />
</div><div>As long as you keep it straight in your head which data is available where, this problem is not difficult to avoid. Here are two common approaches:</div><div><ul><li>You can store needed data in session variables. If you used <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">session.initVal</span> instead of the local variable, it would still be available inside the AJAX call (with some caveats that affect guest users who, depending on system settings, may not have a unique session).</li>
<li>Alternatively, you can pass the data as arguments in your clientside function (or put it inside a DOM element where your clientside code can retrieve it) and then through to your AJAX call. Once your AJAX code is executing, any arguments you pass will be part of the form object.</li>
</ul>This is a very brief look at a rather challenging topic, but I hope it gives you some idea of the issues involved.</div>Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-70795961658236767302011-07-06T11:19:00.000-05:002011-07-06T11:19:12.103-05:00To Thread or Not to ThreadWithin the realm of message boards, there are a couple of different ways to organize the messages. Many people don't realize this, but it can make all the difference in the world in how people interact on your message boards. Some people have a strong preference for one or the other, but either will work. Each has its strengths and weaknesses. Even if you prefer one style, the needs of your community may dictate that you at least consider the other style.<br />
<br />
There are two basic ways to view message board posts: threaded and conversational.<br />
<br />
<b>Conversational (Linear, Chronological) View</b><br />
<br />
In conversational view, also known as linear or chronological view, posts are placed in chronological order, one after the other. This organizational method is good for a group of regular participants engaged in free-flowing, deep conversation. For example, this might work well with a health-related community in which there are groups for various illnesses and members are providing support to one another. It's harder to reply to individual messages, and more difficult to find "the answer" out of the bunch, however, so if you need to be able to find needles in haystacks, you might be better off with a threaded organizational structure. Conversational mode is more of a many-to-many discussion.<br />
<br />
<b>Threaded View</b><br />
<br />
In threaded forums, the posts are arranged like an outline, with one post immediately following the one to which it is replying. Threaded organization works well in situations where people need to be able to find a particular piece of information in a hurry, such as in technical support forums. Threaded organization fosters multiple small one-to-one conversations rather than one group discussion.<br />
<br />
<b>A Comparison</b><br />
<br />
While threaded conversations might seem more organizationally intuitive, forums generally get more participation when they use conversational mode. This is because people tend to find conversations straightforward and easy to follow.<br />
<br />
If you have not experienced both modes, I would encourage you to do so, to get a feel for which one you prefer. Quite frankly, I have a strong bias toward conversational mode. Threading works well for newsgroups and other non-Web-based applications, but I feel that it's more difficult to use it on the Web.<br />
<br />
<b>Webcrossing Settings</b><br />
<br />
Whatever you decide is best for your community, Webcrossing's got you covered. In the Control Panel > Discussions page, you can choose from:<br />
<br />
<ul><li>Default to threaded, but user can choose conversational in their preferences</li>
<li>Default to conversational, but user can choose threaded in their preferences</li>
<li>Mandate threaded</li>
<li>Mandate conversational</li>
</ul><br />
And whatever you choose can be overridden for an individual discussion on the Edit Discussion page, even in mid-discussion.<br />
<br />
My favorite combination of settings is to set the actual discussions for conversational view (mandate it), and then in the "Tabular Message View" settings, turn on the option to show replies. This puts links between the message and the message being replied to. At the bottom of the message being replied to is a list of all the replies. At the top of each reply is a link back to the one it was a reply to. In that way, you can still enjoy the advantages of conversational view while still being able to follow threads if necessary.<br />
<br />
Feel free to experiment!Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-70487006739862351742011-07-05T06:49:00.001-05:002011-07-28T11:34:30.901-05:00Code snippet: What's up, DOCTYPE?In a previous post I mentioned using AJAX to call server-side functions and write dynamic content to the page. Here I introduce an easy workaround for one of the places where Webcrossing trips over its own flexibility.<br />
<br />
There's a system setting to include a DOCTYPE in every page response for compliance with W3C standards. But once defined, this happens automatically for every request, including those which are not intended to be a full page of HTML, such as the response to an AJAX call. In order to avoid breaking your page, use this simple clientside Javascript function to remove the DOCTYPE:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">function removeDoctype( txt ) {</span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">return txt.replace(/<!DOCTYPE[^>]+>/g, "");</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">}</span><br />
<br />
Implemented with a jQuery AJAX call, it looks like this:<br />
<br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$.get("/someNewContent",,function(newText) {</span></span><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></span><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> $('#newContentGoesHere').html(</span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">removeDoctype(</span><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">newText));</span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> });</span></span><br />
<br />
A colleague of mine likes to say, "Every so often a programmer will determine that the best solution for a problem is a regular expression. Now she has two problems."Michaelhttp://www.blogger.com/profile/07919213123306085381noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-56568059161235365472011-07-03T11:36:00.002-05:002011-07-03T11:46:51.408-05:00WebCrossing Theme DevelopmentThe challenge of Webcrossing at this point in time from an educational implementation perspective is the theme development possibilities. Our organization lacks the skill set to truly customize the appearance of Webcrossing to meet the aesthetic expectations of our users. We have tested Joomla, Moodle and Drupla and I still keep coming back to Webcrossing for a number of features that are either poorly designed in the other platforms or do not exist. There could be a whole new market for Webcrossing if it had third party development sites that users could easily access like:<div><br /></div><div>http://www.rockettheme.com/</div><div><br /></div><div>http://www.shape5.com/</div><div><br /></div><div>Any feedback would be appreciated.</div><div><br /><div><br /></div></div>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-71279934082903041802011-07-01T09:00:00.000-05:002011-07-01T09:00:03.805-05:005 Tips to Prevent FlamesSome amount of disagreement among community members is probably inevitable. Just as in face-to-face communities, sometimes people get on each other's nerves. Rather than hoping against hope that it won't happen in your community, it's better to plan for problems from the outset and have a strategy in place for dealing with them.<br />
<br />
<b>What You Can Do</b><br />
<br />
You can minimize the unpleasantness -- and help douse the flames when it happens -- with a judicious application of software tools and common-sense people skills. Here are five strategies you can use:<br />
<br />
<b>1. Choose software that allows you to deal with -- and prevent -- problems</b>. One approach is to use moderation, which is when some or all posts are read and approved by a moderator before they go live. Reading every single post is obviously time-consuming for your community staff, but some software allows you to specify a list of objectionable words, and then it queues for moderation only posts that contain those words. Webcrossing allows you to set a different objectionable word list for each folder, if you wish.<br />
<br />
Another tactic is to deny problem users access to some or all of your site, or to withdraw certain privileges. These users can either be denied access completely (you delete their existing user name, and they can't register again), or they can be denied access to a given area within the site (since they're logged in, the software knows who they are and can be programmed to not let them into certain areas). Or you can set it so they can read posts but not post anything themselves. You may not need these tools often, but when you do, they can be lifesavers. You can do this with Access Lists with Webcrossing.<br />
<br />
A third approach puts the responsibility in the hands of the users by giving them filtering tools that allow them to block postings from people whom they find difficult. Webcrossing provides a "bozo filter" if you use the default Tabular Message View.<br />
<br />
<b>2. Write a watertight "terms of service" document.</b> Require your participants to agree to the document when they register. It doesn't have to be legalistic and scary, nor should it discourage the discussion of issues. But it should specify that attacks on individuals are not permitted. The advantage of having something in writing is that if someone gets unruly and you need to take action, you have an existing document that you can direct them to, and your enforcement actions won't seem arbitrary. Webcrossing's Register Plus plugin allows you to require agreement to your Terms of Service in order to register.<br />
<br />
<b>3. Plan a "seeding" period</b>. It's amazing how many new sites skip this step. But it can be crucial for setting the stage and settings expectations for behavior. Before you open your community, invite a couple dozen people to come in behind the scenes. These should be experienced message board participants and people whom you can count on to help you get some interesting conversation going. Besides simply making it seem like "somebody's home" when the public arrives, these folks will set the stage for what will come when the doors open, including being role models for your users-to-come about what kind of behavior is usual and expected.<br />
<br />
<b>4. Use facilitators to shape the discussion.</b> Faciliators can model civil disagreement and discussion and deal with problems when they arise. They can deal with your participants via private e-mail and encourage them to work out their issues with each other without making your community an unpleasant place to be. When all else fails, they can use the software tools available to them, as outlined in strategy #1, above. A good facilitator is worth his or her weight in gold!<br />
<br />
<b>5. Resign yourself to the fact that you're never going to please everyone.</b> Taking action when things get out of hand is sometimes the only way to prevent your community from self-destructing; your "good" users will usually appreciate your taking action against people who are causing trouble. Otherwise, the positive contributors will get disgusted and may start to spend their time elsewhere. But at the same time, when a facilitator acts with a "cop hat" on, he or she is going to raise the ire of those in your community who have problems with authority, no matter who is wearing the hat. You may get complaints about First Amendment rights and censorship. The trick is to not take it personally and remember that for both you and your participants, everything online feels more intense than it would offline. Thus, if you can encourage people to take a "time out" of a few days to get perspective, it's likely to help a great deal.<br />
<br />
Using a combination of Webcrossing tools and good facilitation, you can minimize the flames in your community.Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-54858032017914900302011-06-29T09:00:00.001-05:002011-06-29T09:00:09.078-05:00Sorting Items in FoldersOK, you've got your forum set up, and have several folders full of discussions, blogs, and other folder items. You may decide you want things in a certain order, or that you always want the most recently-created items to appear at the top of the list.<br />
<br />
Fortunately, Webcrossing has a couple of different tools to determine the order of items in a folder.<br />
<br />
First, in the Control Panel > Folders page, you can set some defaults:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuGb0xzU5zTsJ4CmIL4pnTmVcLskcBmQDlL8LxrGhLSsKPqsfdT1uymlkRYmDE8cCs5YNKqqEx5DouamFZr38-B704e1SeTcWQsH549PDvjn3qP1DmDkP41fT-eItrJNCBgLbN9GLDP9b7/s1600/Screen+shot+2011-06-25+at+12.51.09+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuGb0xzU5zTsJ4CmIL4pnTmVcLskcBmQDlL8LxrGhLSsKPqsfdT1uymlkRYmDE8cCs5YNKqqEx5DouamFZr38-B704e1SeTcWQsH549PDvjn3qP1DmDkP41fT-eItrJNCBgLbN9GLDP9b7/s640/Screen+shot+2011-06-25+at+12.51.09+PM.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"></div><div>But there may be some specific items you always want to be in a certain position, like at the top, or maybe an Archives folder at the bottom.</div><div><br />
</div><div>To make this happen, you need to set a sort sequence number for the item in question. Go to the Edit page (edit folder > basic folder appearance and hidden files, edit discussion, edit whatever :) ) and find the blank to set a sort sequence number. By default, for folders and objects derived from folders (blogs, brainstorm folders, etc.), the sort sequence number is 100000. For discussions and objects derived from discussions it is 0.</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBRBwlOnRqCjUIJDTMhs35RZ9VYLpkugVZrjVEogpfLwuuni7RTdg12nqoYzRFvwNopyV913niRKlr6y07-RmGLu0Smg6gZr1igOTDqeRyVZusnUbbzBG9h2tsst_4tIfy2dlP8UoLj728/s1600/Screen+shot+2011-06-25+at+1.05.58+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="30" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBRBwlOnRqCjUIJDTMhs35RZ9VYLpkugVZrjVEogpfLwuuni7RTdg12nqoYzRFvwNopyV913niRKlr6y07-RmGLu0Smg6gZr1igOTDqeRyVZusnUbbzBG9h2tsst_4tIfy2dlP8UoLj728/s400/Screen+shot+2011-06-25+at+1.05.58+PM.png" width="400" /></a></div><div><br />
</div><div>So to set something to appear at the bottom, set a negative sort sequence number below 0. To set something to appear at the top (or several somethings to appear at the top), set a sort sequence number above 100000.</div><div><br />
</div><div>All items with the same sort sequence number (in other words all folders and folder-derived items in a group, and all discussions and discussion-derived objects in a group) will sort in a separate little group using the default sort setting you chose in the Control Panel.</div><div><br />
</div><div>If you have a number of items you want in a particular position, or if, say, you want one folder to sort alphabetically and another to sort in a particular custom order you set, go to the Edit Folder page in for the folder containing the items you want to sort, and find the "Other Folder Settings" pulldown menu. There, you'll find an option for "Sorting for Items in this Folder".</div><div><br />
</div><div>That page will allow you to move items up and down in sequence until you get them in just the order you want. There are handy presets for Alphabetical, etc. so you don't have to alphabetize them manually.</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCUMmPbye2hwjqmD2LO_Z3eKUNsNvDW073yYQQEdOYYQmPw3alQTD8ZEG6gQogV3wibC-OIUyQOzihrTNKXIoTkInQ95ggYENl-2phpoHzRnGA3HaPJ4GU-73UrwtPUQDhtsaRmkpMHs5-/s1600/Screen+shot+2011-06-25+at+1.08.02+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="584" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCUMmPbye2hwjqmD2LO_Z3eKUNsNvDW073yYQQEdOYYQmPw3alQTD8ZEG6gQogV3wibC-OIUyQOzihrTNKXIoTkInQ95ggYENl-2phpoHzRnGA3HaPJ4GU-73UrwtPUQDhtsaRmkpMHs5-/s640/Screen+shot+2011-06-25+at+1.08.02+PM.png" width="640" /></a></div><div><br />
</div><div>The important part to realize is that the way this works under the hood is to set sort sequence numbers for everything in the folder, ordered in such a way that things sort the way you want them to. You can see them in the screenshot above, 99990, 99980, etc. So when you have sorted a folder using this tool, and you add new items, those new items will all have the default sort sequence numbers of 100000 or 0. Thus, new folders will sort at the top of the list in a little group using the Control Panel default order. New discussions will sort at the bottom of the list in a little group using the Control Panel default order. You can go back at any time and re-set the custom sort to make the new items sort according to your desired order.</div><div><br />
</div><div>Thus, it's probably best to save the custom sort order for folders where new items are not added frequently. For folders with a lot of activity, set the Control Panel default to whatever works best for those folders, and use the Edit option to set an individual sort sequence number for one or two items in those folders you want to make stick to the top or bottom of the list.</div><div><br />
</div><div>As you can see, this mechanism is way more powerful than a simple "sticky" radio button on a single discussion.</div>Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0tag:blogger.com,1999:blog-6385110787682833517.post-13729815260129574002011-06-28T09:00:00.000-05:002011-06-28T09:00:07.026-05:00WCMS Host Permissions (WCMS Part 8)So far in our series on the WCMS (Webcrossing Customization Management Suite), we've covered Themes, Components, Extensions, User and Folder Items, the Localization Manager, and the Developer Tools. In this, the final installment, we'll discuss how you can control whether non-sysops have access to the WCMS.<br />
<br />
At the very bottom of the suite of WCMS tools and menus is a link which says "WCMS Host Permissions."<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvo4Qk_GIO2iBS6L1Z2xwjIxzZ0uygvabqGS4D7IK32jEZa9KWPqfLvpn0AF2RYCyRa-Mfp2Hsc_wBF3U29ZyBIGJdkXP35kgTGArD2FLH7TYhBe1aQWWaKmoUEG0Hcethd_FWQv6Q-Qkr/s1600/Screen+shot+2011-06-18+at+1.49.02+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="62" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvo4Qk_GIO2iBS6L1Z2xwjIxzZ0uygvabqGS4D7IK32jEZa9KWPqfLvpn0AF2RYCyRa-Mfp2Hsc_wBF3U29ZyBIGJdkXP35kgTGArD2FLH7TYhBe1aQWWaKmoUEG0Hcethd_FWQv6Q-Qkr/s400/Screen+shot+2011-06-18+at+1.49.02+PM.png" width="400" /></a></div><br />
That link leads to a page that looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqGk8BvpLwOKtdDXr1hGg2BnTr5IGmJrNqyMaFHcua49ObdWWchmipWjiYXXtAiX_94fK4GPVV_Ss3xlSTjVctNQqB4MyCZ4I1CKz8wvbbR-gHeUAuXlweaQNl3vMZb9kMEyS-TX6EMOHw/s1600/Screen+shot+2011-06-18+at+1.49.11+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="164" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqGk8BvpLwOKtdDXr1hGg2BnTr5IGmJrNqyMaFHcua49ObdWWchmipWjiYXXtAiX_94fK4GPVV_Ss3xlSTjVctNQqB4MyCZ4I1CKz8wvbbR-gHeUAuXlweaQNl3vMZb9kMEyS-TX6EMOHw/s400/Screen+shot+2011-06-18+at+1.49.11+PM.png" width="400" /></a></div><br />
First, decide whether you want to let your Host users access the WCMS. Many site owners feel that letting Hosts into the WCMS is asking for trouble. Other sites may have a situation where there are one or more very knowledgeable Hosts that can be trusted with WCMS settings.<br />
<br />
If you <em>don't want any</em> of your Hosts to use the WCMS, check the box and fill in <tt>none</tt> into the blank asking for the group name. Submit the form, and you're done. <br />
<br />
If you want <em>all</em> of your Hosts to be able to use the WCMS, DEcheck the box and submit the form, and you're done too.<br />
<br />
However, you can also allow just some of your Hosts to use the WCMS. This is how to set that up: If you check the box, the system will use a user group to control Host access to the WCMS tools. So the first thing you'll need to do is create a user group manually the normal way, being sure to set an access list <em>on the user group</em> to disallow Hosts from editing it (adding or removing themselves or others from the group). Once you've done that, come back here and fill in the name of your user group.<br />
<br />
Then, decide if it's simpler to have a list of people you want to <em>exclude</em> from the WCMS functions, or to exclude everybody except a few people you want to <em>allow</em> to use the WCMS functions. Set the radio button appropriately.<br />
<br />
Voila. Only the Hosts in your user group (or all hosts except the Hosts in your user group) will have access to the WCMS.<br />
<br />
It's worth remembering that <em>none</em> of these settings have a thing to do with either sysop or superhosts. Sysop and superhosts can always do everything, everywhere. So this only applies to Host users as defined in an access list. Furthermore, since Hosts can't enter the Control Panel, this only applies to folder-level WCMS pages.<br />
<br />
You can apply your host permission settings sitewide, or if you need even more granular control, you can apply them in any folder, using a form almost identical to that above.<br />
<br />
And that completes our tour of the WCMS. I hope you've enjoyed getting a taste of what's available under the hood of Webcrossing - most of it not requiring scripting at all!Sue Boettcherhttp://www.blogger.com/profile/04080769039286457456noreply@blogger.com0