Archive for August, 2005

AJAX Work

August 24th, 2005 No Comments

So I’ve been reading up on the various AJAX kits out there, and so far it looks like CPAINT is probably the most stable and tested one out there. It has both an ASP and a PHP version, meaning I can use it for both sides of the fence in web development.

According to the manual (that you can find faster in the distribution than you can on their website), it’s as simple as:

<?php
require_once(”cpaint v2/cpaint.inc.php”);
$cp = new cpaint():
$cp->register(’calculate_tax’);
$cp->start();
$cp->return_data();
function calculate_tax($sales_amount) {
global $cp;
$cp->set_data($sales_amount * 0.075);
}
?>

Assuming the input on the web form was “1″, this would return an XML response of:

<ajaxresponse>1.075</ajaxresponse>

What does this mean to you, the average reader? Not much, I suppose, unless you’re a PHP programmer and know even a little bit about XML. This XML is returned to the JavaScript running in the web browser, meaning you can click that “calculate” button, and it will NOT load a new page, but will instead execute the PHP function on the backend, and use the results to change something on the form - in this case, the “Tax” amount.

Why not reload the page and have it transmit the information that way? Well, the main two reasons for using AJAX is control and ease of use of the final product. If the buttons all change things instantly (or nearly so) on a web page, wouldn’t you rather that, than wait on the page to reload each time you clicked it?

This could be really useful for shopping cart applications, database interfaces, workflow managers, and can be even used to create javascript-based operating system! There’s even a potential for real-time chat and content management interfaces with a website, so that you can chat with your colleague(s) about what needs to be changed, AS you change it with the content manager’s AJAX interface.

More advanced PHP programmers might ask, “How do I calculate or pass multiple values to the JavaScript?” The answer is provided a little later in the CPAINT documentation. Instead of creating an array, you would create objects that represent XML data nodes, then add the data to the nodes. This will result in an XML return with multiple values, allowing the DOM walker to pick up all the necessary information. Here’s the example from their documentation:

<?php
require_once(”cpaint v2/cpaint.inc.php”);
$cp = new cpaint():
$cp->register(’multi_calc’);
$cp->start();
$cp->return_data();
function multi_calc($num1, $num2) {
global $cp;
$add_result = $num1 + $num2;
$subtr_result = $num1 - $num2;
$multi_result = $num1 * $num2;
$div_result = $num1 / $num2;
$add_result_node =& $cp->add_node(”add”);
$subtr_result_node =& $cp->add_node(”subtr”);
$multi_result_node =& $cp->add_node(”multi”);
$div_result_node =& $cp->add_node(”div”);
$add_result_node->set_data($add_result);
$subtr_result_node->set_data($subtr_result);
$multi_result_node->set_data($multi_result);
$div_result_node->set_data($div_result):
}
?>

This might return:

<ajaxResult>
<add>6</add>
<subtr>-2</subtr>
<multi>8</multi>
<div>0.5</div>
</ajaxResult>

First, I’ll apologize for the ugliness of that code - WordPress insists it creates proper XHTML, yet decides to close the paragraph WITHIN the code block, breaking the page in most browsers.

Second, I cannot express how simple that code is, and how much work it REALLY does. It creates several objects, and generates an XML response based on those objects. You can have a completely static-looking webform that will validate the information in a language you know (PHP), and pass along any errors in an XML context, so that the JavaScript can display those errors on the page. That means, no annoying pop-up dialog saying “Please enter a valid email address” or somesuch.

A really cool thing is that, in theory, CPAINT can handle binary data. That is, you could create a backend script that generates an image, on the fly, and returns it via XML. Even better - you could, in theory, create an entirely web-based SVG application that allows the user to create vector graphics, effectively on the fly, all the while storing every stroke, object and parameter into a database behind the backend. A useful application of this might be an “avatar” creator that allows the user to change aspects of the image without reloading the page. A user would click on “add mustache” and the image is reloaded, without reloading the page, mustache added.

That’s all for now, I’ll probably write more a little later.

Gen Con Indy 2005

August 23rd, 2005 No Comments

Slashdot has an excellent article on Gen Con Indy 2005.

There’s only one mention of White Wolf, and that’s mainly about the launch of mage. They do mention the relaunch from a couple of years ago in the same paragraph. I’m not sure if I like the Atlantis back story, but it looks like the game will definitely follow along with the changes to vampire and werewolf.

There’s quite a bit covered, but most of it comes from WotC. I’m interested in Ebberon, but only because the sasquatch keeps bugging me to play and/or run a campaign of it. It DOES look neat from that “things that should not mix, but ARE mixing” point of view.

The Form Assembly

August 23rd, 2005 No Comments

:mrgreen:

I’m a geek, and I like new toys. The Form Assembly is a suite of toys designed to simplify web form creation and to make the actual submission of form data as seamless as possible.

It does this by using AJAX, or Asynchronous JavaScript and XML.

AJAX lets a programmer or web developer turn a web page (and just a SINGLE web page) into a fully-functional application. A good example of AJAX and how it works is GMail. If you’re on a modern and supported browser, you’ll notice that interactivity throughout most of GMail doesn’t load a new page, but instead does things like create a reply box with just a click. That’s AJAX at work.

AJAX can also be used as a data-entry tool. That is, you can have the “next” button on a form just display another piece of the form on the same page, while the backend behind the site is happily saving the information from the first form to a database.

teh blog

August 23rd, 2005 No Comments

Well, here we go. I’ve decided to setup a wordpress blog for personal stuff, and things I find neat.

If you want to be on the blog roll or links, please let me know.

VST Blogs Starting

August 22nd, 2005 No Comments

Hopefully in the next couple of days, all of the VST’s will have created an account on this site, and requested a blog category for their Domain’s Mortals Venue.

If you have the access, you can click the “site admin” link on the right side bar to access the ability to make new posts, publish them, and edit old posts.

You may also create your own categories, but please be mindful of whether or not a new category is needed or not – a new category for one post is overkill – especially if the post can fit in another category just as well.

Enjoy, and try not to break anything!

State of the Region

August 20th, 2005 No Comments

So I’ve sent in three reports as ARST Mortals, and what have I produced besides this?

Well, first of all, my first report was for two weeks of dis-orientation.

Conspiracy

Our first plotkit involves a conspiracy, right here in the South Central region. Some individuals believe no one, including your characters, can think for themselves, and plan to make sure you don’t have to.

Strangeness

Camden, Arkansas has experienced some strange behaviour as of late. People disappearing, or simply quitting their jobs of fifteen years for no apparent reason. Some are blaming the Poison Springs nearby. Some are blaming the recent changes to the water system. And yet more claim to have seen a strange creature or mutant in the woods, hunting the animals.

News

APRIL 22, 2005
CAMDEN, AR

During a Lyrid Meteor Shower of unprecedented activity, a relatively small impact occurred in the Poison Springs National Park. Park services were able to contain the resulting fire, but are concerned for the dead, but apparently unharmed, wildlife in the area. The area has been quarantined by the Department of Energy’s NEST team due to abnormally high radiation levels. Containment is expected to be completed sometime in November of this year. Until then, park officials have asked the visitors do not attempt to go near even the quarantine line. The NEST team lead, Jared Walters, has stated that deadly force has been allowed, but will be reserved as a last resort.

Are you reading?

August 19th, 2005 No Comments

http://www.google.com/search?q=salley+vickers

1. Go here.
2. Pass it on.

1.~How did you meet pen_dragon? ICC 2003, I believe. Toreador meeting. Yes, I’m a geek.
2.~What would you do if you had never met glass_spider? Hmm.. Probably hate him for the rest of his life and mine. :) 3.~What do you honestly think of sea_cucumber? One of the coolest people I know. I think I might have scared away any chance of a real friendship, tho.
4.~Would or did loganvobis and poweroftiga go out? Hm. I don’t think so.
5.~Have you ever liked ladyfate? Yes, always have. She’s not afraid to tell you what you need to hear.
6.~If sandra_e died tomorrow, what is one thing that you would need him/her to know? That I’m sorry if I ever did anything that hurt her feelings.
7.~Would otopico and eamclaren make a good couple? Weirdly enough, it’s possible.
8.~Describe texasfanboy in 3 words: Hair, Funny, Game
9.~Do you think darkzen is hot? Hell yeah!
10.~Would sandra_e and cat333 make a lovely couple? Hell yeah!
11.~What do you think of when you see poweroftiga? Fun if I swung that way.
12.~Tell me something humiliating about eamclaren: Er.. She looks really good in all that gangrel make-up!?
13.~Do you know any of dannika’s family members? Nope
14.~What’s gracedescending’s favorite color? No idea…
15.~On a scale of 1-10 how cute is deramani? Heh.. 9.
16.~What would you do if kyrthira just professed their undying love for you? Panic..
17.~What language does loganvobis speak? English
18.~Who is teegarden going out with? perkyshai
19.~Is thetoken a boy or a girl? Man, baby. All man.
20.~Would wowieann and kyrthira make a good couple? Hell yeah!
21.~Who do you think onyx_sunfire83 would be great with from this list? No comment. :D 22.~When was the last time you talked to darkzen? New Orleans, March
23.~What is ladyfate’s favorite band? I don’t know, but I could make a lot of guesses…
24.~Does otopico have any siblings? Not that I’m aware of
25.~Would you ever date dannika? Yep
26.~Would you ever date texasfanboy? No offense, but no.
27.~Is onyx_sunfire83 single? I believe so.
28.~What is gracedescending’s last name? Not saying.
29.~What is wowieann’s middle name? Don’t know
30~What is sea_cucumber’s fantasy? Not me? heh.
31.~Where does thetoken live? California, last I checked
32.~Would you make out with pen_dragon? Not likely
33.~Are glass_spider and dannika best friends? I doubt they’ve even met each other
34.~Does texasfanboy like gracedescending? I doubt they’ve even met each other
35.~How did you meet wowieann? I met her at a VLARP in BCS, Texas a few years ago
36.~Is darkzen older than you? I don’t think so, but he might be
37.~Is cat333 the sexiest person alive? If not, she’s definitely one of

homophobia meme

August 11th, 2005 12 Comments

Repost this if you believe that homophobia is wrong.

There’s this meme going around, with some rather insightful statements concerning the abuse of someone because of their sexual preferences/differences from the “norm”.

I don’t believe homophobia is wrong. I believe acting on that fear and harming another human being is wrong.

Sometimes, people can’t help their fears - rational or otherwise.

However, that’s no excuse for violence.