Every Business Needs A Website
August 17, 2008 Posted by Al Castle
2comments Categories: Marketing, Puter Stuff, Web Design & Dev, gnash-teeth
Tags: Business Websites, getting online, its not the 70s anymore, the pain
I’m incredibly tense, my shoulder feels like its trying to secede from my body. So here I am searching for massage places in Whatcom County. There’s a ton of smaller businesses (no doubt one person operations), that have no website. At this point I just want to find who’s open on a Sunday, price and driving distance are not concerns right now. I’ve already called a few places, had to listen to their stupid answer machines for a few minutes until they get to the part about what days and hours they’re open. Completely and utterly a waste of my time. Bastards.
Their website only needs a few pieces of information and then I wouldn’t be more tense.
- Hours of operation.
- Address
- Phone number
- Name of business
- Misc fluff - rates, credentials, pictures, blah blah.
A domain can be purchased for about $10 at godaddy.com Bluehost can provide web hosting for $6.95/month. Almost any word processor can save as HTML. Hell write it in plain text for all I care. You publish in the phone book so why not online? Trade a massage for help from one of the geeks or friends, or a family member if you’re too cheap.
Sigh. I’m seriously tense.
Zend Framework: No File Upload
June 8, 2008 Posted by Al Castle
4comments Categories: Puter Stuff, Web Design & Dev, gnash-teeth
Tags: forms, frameworks, php, zend
My latest realization is that even though Zend Framework is version 1.5, it has absolutely no support in Zend_Form for file uploads.
Again, this seems to be a very common requirement for a web application which is not included. This limitation does not appear to be mentioned in the documentation either. I ended up searching through some forums to discover that it’s not implemented yet.
WTF?
Version 1.5 - Framework. Yeah.
Update:
Wil Sinclair of the Zend Framework responded in the comments about the necessity and difficulty of balancing what to include within the framework and the ability to keep it flexible. While I can appreciate this, I have to wonder why include input type password, or what about textarea instead of input type file. Why even create Zend_Form then?
To be clear I am not suggesting that a class be built to support file uploading, processing, saving, renaming and such. Simply that I am surprised that Zend_From does not appear to have support for input type=’file’ in the version 1.0-1.5 release. A web development framework should include the basics at least - Password, Text, Checkbox, Radio, File, Textarea, Submit.
Zend Framework includes plenty of classes for extraneous things like -
Zend_Service: Akismet, Amazon, Audioscrobbler, Delicious, Flickr, Nirvanix, Simpy, StrikeIron and Yahoo!
While I appreciate that these (and others) are included, and will no doubt make use of them as time goes on, surely those should all be secondary to some basics. To me, even (Zend_)PDF creation and (Zend_)Feed processing would be secondary to something as rudimentary as Zend_Form with the ability to select a file by version 1.0.
Not to say I’m not appreciative of the work that’s been done and the flexibility it provides me, I did after all choose it over the other frameworks I’ve mentioned in a previous post. It’s not as if I can’t write my own either, but simply that I find the absence of full disclosure in the documentation as well as the absence of this seemingly basic thing to make me say, WTF?
If I’ve missed it and it’s in a 14pt, bold font, blinking, marquee on the documentation page, then I humbly apologize. If it’s on a wiki or roadmap somewhere then I suggest you move it on over to the documentation pages where I’m looking at usage examples.
I’ll continue to post my grievances and no doubt eventually praise as I muddle through learning how to use this framework, so stay with me.
Zend Framework: First Impressions
June 4, 2008 Posted by Al Castle
4comments Categories: Castle, Puter Stuff, Web Design & Dev, gnash-teeth
Tags: form validation, frameworks, php, zend
I’ve been looking at various frameworks for PHP, including Symfony, CakePHP, CodeIgniter and Zend Framework. In theory these frameworks are supposed to make it easier to write and maintain code, by providing various degrees of structure and built-in libraries and helpers to do everything from sending email to validating user input.
Zend Framework is by far the loosest of all the frameworks, it’s structure is not so rigid and you’re free, to a certain extent to do things how you wish.
After having worked on trying to build some basic blocks which any application would require, I’m finding my hate level for frameworks building. For example the documentation and examples for Zend Framework are poor in my opinion. Being that Zend is the company which runs PHP, I would have expected php.net style user comments for each class. Those comments are where you usually find the real world examples, limitations, pitfalls and tricks.
One of my current woes is after building a registration and login form via Zend_Form I threw in some validation via the addValidator methods along with Zend_Auth to keep track of the logged in user and so on. As I worked I realized that there is no built in validator for checking something as basic as if a value in a database table is unique. In example, user registration - I would like to have the username and email address be unique. All I could find were basic checks for length, alphanumerics, regular expressions and other trivial string checks. Here’s an example of using Zend_Form.
public function loginForm()
{
$form = new Zend_Form();
$form->setAction('/user/login')
->setMethod('post');
// Create and configure username element:
$username = $form->createElement('text', 'username');
$username->class = 'formtext';
$username->setLabel('Username:');
$username->addValidator('alnum')
->addValidator('regex', false, array('/^[a-z]+/’))
->addValidator(’stringLength’, false, array(6, 20))
->setRequired(true)
->addFilter(’StringToLower’);
// Create & configure password element:
$password = $form->createElement(’password’,'password’);
$password->class = ‘formtext’;
$password->setLabel(’Password:’);
$password->addValidator(’StringLength’, false, array(6))
->setRequired(true);
// Add elements to form:
$form->addElement($username)
->addElement($password)
->addElement(’submit’, ‘login’, array(’label’ => ‘Login’));
return $form;
}
Upon posting one would normally do something like the following. isValid runs thru the addValidator checks, building the error messages as necessary.
if( !$registerForm->isValid($_POST))
{
// failed validation - return to register page with error messages
$this->view->registerForm = $registerForm;
return $this->render('register');
}
// form fields validate - database checks
$values = $registerForm->getValues();
While this is helpful I suppose, changing the error messages is an additional step. I found a page showing you how, but forgot to bookmark it as that’s the least of my concerns at this point.
To get back to my woe, how would I then integrate a custom database query as a validator? Well one method, (after much searching) is to write your own validation class(es). Or from other examples I’ve managed to find online (and anything of quality are few & far between), is to not define the validators during the form creation. Instead call each one after the POST, in this way the processing isn’t any different than how I would normally write my OO PHP code.
Something akin to this example.
public function registerAction
{
$request = $this->getRequest();
if ($request->isPost())
{
$errors = array();
$username = $request->getPost('username');
// validate 'username' length
$validator = new Zend_Validate_StringLength(8);
if ($validator->isValid($username)) {
// username is valid - do database query
// database query function goes here
} else {
// user name is invalid; save the reason
foreach ($validator->getMessages() as $messageId => $message) {
$errors['username'] = “Validation failure ‘$messageId’: $message”;
}
}
// make errors array available to your view
$this->view->errors = $errors;
}
}
Perhaps I’m simply expecting too much from this Framework. All the examples I’ve found show you how to use the validators when creating the forms as in my initial example. Why would the writers of the documentation and tutorials not show you a real world example instead? This would have saved me much time searching and some frustration. Again this is where the php.net style documentation which includes user submitted comments and code examples would have benefited me and probably many others.
While I freely admit that the writers of the Zend Framework and maintainers of PHP are far beyond my meager skills, I still have somehow managed to offer insight and improvement on the project with these humble examples and words.
Javascript SEO Value
June 1, 2008 Posted by Al Castle
1 comment so far Categories: Castle, Marketing, SEO, Web Design & Dev
Tags: google, javascript, SEO
It’s long been said that JavaScript had no search engine optimization value. A few months back while running through my web server logs I realized that Google, among a few other search engine bots were indexing files that were only referenced through Javascript.
I created a few tests to determine the extent of this. Each test has its own URL which allows me to determine which was actually called and from where.
[Note: These links are no longer active.]
Test-1: Ability to process basic code. In this test the variable bob if processed will be a complete URL. I explicitly did not call the document.write function. This code was in the index page.
Result: The result of this one was as expected. The URL was never assembled and thus not crawled.
Test-2: Ability to extract a fully qualified URL from a relative, externally referenced, Javascript file in the HTML head tags. The contents of the file as follows.
var taco;
function megataco()
{
// are we good in a function?
taco = 'http://blog.alcastle.com/_gb/search.php?h=listing.js';
if( taco != null )
{
return taco.length;
}
}
megataco();
Result: The externally referenced .js file was pulled and the URL contained within the function was indexed.
Test-3: Ability to crawl a fully qualified URL from the index page.
var cran = 'http://blog.alcastle.com/_gb/search.php?h=index.php&t=literal';
Result: This test is not much different than the second, and likewise the results were the same.
Test-4 Crawling of a relative link from the index page.
EditInPlace.defaults['save_url'] = ‘/tagline_save.php’;
$(’editme’).editInPlace({
auto_adjust: true,
select_text: true
});
Result: The relatively URL here was not crawled.
Conclusion: In looking around at various webmaster forums, I’ve found evidence that some have been aware of this for awhile. My own tests are perhaps half hazard, but they do prove that while the Javascript may not be processed by search bots, some bots can and do extract links from the page source. Providing the links contained within the Javascript are complete URLs, you can expect Google at least to crawl those referenced pages.
bellingham public library audiobooks block ipod users
April 20, 2008 Posted by Al Castle
1 comment so far Categories: Must Listen, OSX, Puter Stuff, Travel, Web Design & Dev, gnash-teeth, iPhone
This evening I finished reading a book and was investigating whether the next book I’d like to read is available from the Whatcom County Library. I notice on their horrifically designed and sluggish website a blurb about audio books, now available. It is with some joy that I follow the link to Northwest Anytime and read more. Then the let down comes crashing down like a Bengal tiger to the groin.
At this time, OverDrive Media files cannot be used on iPods or Mac computers.
Our media titles, provided by OverDrive, Inc., use DRM (Digital Rights Management) protection technology from Microsoft Corporation. Unfortunately the iPod (and Mac) currently support neither DRM-protected Windows Media Audio (.wma) files nor Windows Media Video (.wmv) files.
OverDrive, along with hundreds of online media providers, is hopeful that Apple and Microsoft can reach an agreement that would enable support for Microsoft-based DRM-protected materials on the iPod/Mac.
To review a list of devices that are compatible with OverDrive Media, click here.
You may also want to check device documentation to determine if a device supports DRM-protected Windows Media content.
Reading through their FAQ…dear god. This wonderful software that you are required to use supports everything from Windows 98 on up. Oh, and in case you didn’t catch it, the company/product name for this wonderfully backward media software is called OverDrive. Is this a joke? Someone has to be playing an elaborate joke on me.
OverDrive has this tidbit on its website.
The OverDrive Team is a group of innovative, passionate masterminds who build and distribute technology solutions for the real world.
What twisted dimension did these guys crawl out of? Ok, I’m straying a little here. Back to the Library and its suckiness.
Ah here we go, apparently iPods are far too modern. Lets support the Palm!
Can I use OverDrive Audio Book titles with my Palm device? OverDrive Audio Book titles may be transferred to certain Palm devices with the help of a third party application called Pocket Tunes….
The iPod (& iTouch, iPhone, Shuffle) is decidedly the most prevalent portable music listening device on the market. Why then is the Bellingham Public Library, choosing to use a Windows Media Audio format and DRM solution that locks out the most widely used device for Mac and Windows users?
Yes, I would agree that Windows is what is running on the majority of desktops, but who really listens to audio books at their desktop? In your car and on your mp3 player are the more likely of places. Why the sites main blurb contains this statement.
Transfer audiobooks to your MP3 player or burn selected titles to a CD for listening on the go.
The press release for this service has this mention.
“This service is great for travelers, commuters, and for those who like to listen to books while they exercise,” said Joan Airoldi, Director of Whatcom County Library System. “With so many best-selling titles available, there’s sure to be something for every listener.”
Again, the majority of people are using iPod family products. The release goes onto say,
Beth Farley, Head of Information and Reader’s Services at the Bellingham Public Library, listens to audiobooks when she goes on vacation. “No more piles of CDs to keep track of on the airplane,” she enthuses, “I’ll be able to fit several entire novels on one tiny MP3 player.”
Alright, what the hell? I fly a lot and I’ve never seen anyone with a stack of CDs on a plane. And please tell me Ms Farley what sort of MP3 player do you have? Sounds to me like most bureaucratic organizations and companies, someone out of touch with the market and technology is making the decisions.
I really wish I wasn’t so agitated and it wasn’t so late. Otherwise I’d write a more coherent piece on why not only this is a very poor implementation of great idea, but also on the correct course of action the library, publishers, and most importantly authors should have taken.
More Info On The Black App
April 16, 2008 Posted by Al Castle
add a comment Categories: Castle, Marketing, OSX, Squirrels, TimeWaster, Web Design & Dev, gnash-teeth, iPhone
The Black App - A possible iPhone application of unknown coolness. For more info, you could go to the website. That was a joke.
They Hype::
All the references and blubs are essentially the same, I’m guessing it’s by their own people digging themselves and such. Since they hit dig, twitter and a few other places, it’s been syndicated and quoted all over the place.
No one knows anything though.
The Companies ::
Epic Apps is the company producing this and purchased the “theblackapp.com” domain via proxy in an effort to hide. They’re hosting at Media Temple, Inc. who provides services to big names and high traffic sites.
theblackapp.com was registered for only one year on Mar 31st 08
epicapps.com was also only registered for one year, 7 days later on Apr 6th 08 - redirects to theblackapp.com
epicapps.com ping responses come from godaddy.com though.
The Code ::
Since the web page is really simple there’s nothing to gleam from the markup accept that they are using google analytics. I’m sure they’re collecting a lot of good marketing data.
The registration page, now this is interesting, is posting to theblackapp.wufoo.com
Related ? ::
wufoo.com was registered Jan 16th 06 to Chris Campbell - http://wufoo.com/about/
So three guys with an idea and venture money from Ycombinator started Infinity Box Inc. and built wufoo.
What is wufoo?
Wufoo is an Internet application that helps anybody build amazing online forms. When you design a form with Wufoo, it automatically builds the database, backend and scripts needed to make collecting and understanding your data easy, fast and fun. Because we host everything, all you need is a browser, an Internet connection and a few minutes to build a form and start using it right away.
Chris also has a site called particletree.com, which is hosted and links to mediatemple and their venture backers.
Chris Campbell is too common of a name. I’ve yet to find anything relating him to even owning an iphone. I’ve also yet to dig around about his two other partners. So we’ll prematurely jump to the conclusion that this is probably just a tangent.
Or they were simply hired to setup the whole site. Which could mean that Ycombinator (the venture company) is also working with Epic Apps and recommended wufoo to them.
————
This is all from wee hours digging last night. I did find a few articles about social networking apps for the iPhone, nothing too exciting. As you can tell I’ve lost interest.
Let me know if I’ve got something wrong, you have more information or if Chris actually does own an iPhone.
Unthreaded Editable Tagline
April 15, 2008 Posted by Al Castle
4comments Categories: Castle, Friends, Marketing, Puter Stuff, Squirrels, TimeWaster, Web Design & Dev
For a long time I had a bit of code in my blog header, just beneath the blog title (Unthreaded), that randomly choose and displayed a quote, quip or blurb that I had written. Things like “Castlemonkey Speaks of Lemon Scented Victory” or “Castlemonkey Speaks of hotdogs with no cream cheese” and so on.
Sure to become a bore quickly, I’ve added in some code to make the tagline for this blog editable. By anyone. [Currently I'm not requiring you to identify yourself or login to do so. This may change later.]
Simply click on the text, whatever it may be, as anyone is free to change it, and you should see something like the picture above.
Type in whatever you like and click SAVE. The changes are global and saved to the database, meaning everyone who views the site right after you made that change, will see the new tagline. Until it’s changed again.
Dangerous huh?
Attribution Update: This idea was swiped from my amigo David. You can also see his version at Cranberry.
official iphone & itouch unthreaded blog icon
April 2, 2008 Posted by Al Castle
add a comment Categories: Castle, OSX, Puter Stuff, Techy, Web Design & Dev, iPhone
![]()
tada!
ok no i didn’t create it the icon. it’s from the tango icon gallery and published under the creative commons attribution-share alike license.
from your apple iphone or itouch, visit my blog and then tap the + (plus icon), then “Add to Home Screen”. You’ll now have a quick link to my very unthreaded ramblings marked with this wonderful castlemonkey icon.
———-
To create your own simply upload a png image to your root web directory and name it apple-touch-icon.png. If you’d like this image to also be the bookmark (favicon.ico) for your site, you can easily use one of these sites to turn your apple icon into one.
Tags: tango, icons, creative commons, unthreaded, castlemonkey, iphone, apple-touch-icon.png, favicon.ico
flock buggery & tricks
March 28, 2008 Posted by Al Castle
1 comment so far Categories: OSX, Puter Stuff, Web Design & Dev, gnash-teeth
i should point out, since it took me a minute or two to figure out, that if you host your own blog as i do you need to deal with a bit of oopidity.
most of you probably use a service like wordpress or blogger and the setup is really as simple as the url to your blog, username and password.
if you host your own, its the same questions, but it always fails for some reason. looking at my server logs i see its getting a status 200 which means everyone should be happy, but for some reason not so much.
the key is to enter any url when it asks for your blog url. when it fails to find the api it’s looking for you can simply continue to do the setup manually.
all it really needs to know is where the api is, so in this manual configuration you’d enter something like http://myblog.domain.com/xmlrpc.php
then your username and password.
tada.
Tags: browserwars, social networking, flock
my flock
March 28, 2008 Posted by Al Castle
add a comment Categories: Friends, OSX, Puter Stuff, Web Design & Dev
last week sometime i finally decided to give flock another shot. It’s based off of mozilla - runs on windows, macs and linux. it seems primarily focused with the social networking aspect of the internet and provides many built in tools to keep me up to date on the happenings of my friends and visa versa.
for starters it has a built in wysiwyg blog editor which i’m using now to compose this. i can save a draft, work offline and then upload it to one or more of my saved blog profiles [blogger, typepad, wordpress, et al]. since i tend to travel a lot having the ability to work offline is pretty handy.
it has a built in feed reader which also lets me define the layout (number of columns), allows me to mark posts or comments as viewed, blog about, save, or email a post with a click and so on.
i can easily upload pictures by drag and dropping them into the media sidebar, which ties into facebook, photobucket, youtube, picasa and flickr. since it knows who i am it can pull pictures to view from one of my accounts or about my friends too.
send and receive email with its tie in’s to gmail and yahoo mail without having to switch to my native email app.
perhaps one of the handiest things is just staying on top of what my friends are doing. it ties into twitter and facebook, you can see status, profile changes and even poke someone right from the sidebar.
i still use firefox as my primary browser for web development since it has my most useful extensions installed. but for my socializing and online recreation, flock has my attention.
Blogged with the Flock Browser

