Sep 08

Javascript Loves XMLRight at this very moment, I had a thought cross my mind. If I wanted to use Javascript to modify XML on the fly, how in the heck would I make that happen?

I think the answer is E4X, which is short for “ECMAscript for XML”. I tried to explain it in my own words several times, but I decided Wikipedia does it better:

“ECMAScript for XML (E4X) is a programming language extension that adds native XML support to ECMAScript (which includes ActionScript, DMDScript, JavaScript, JScript). It does this by providing access to the XML document in a form that mimics XML syntax. The goal is to provide an alternative to DOM interfaces that uses a simpler syntax for accessing XML documents. It also offers a new way of making XML visible. Before the release of E4X, XML was always accessed at an object level. E4X instead treats XML as a primitive (like characters, integers, and booleans). This implies faster access, better support, and acceptance as a building block (data structure) of a program.”

So, a powerful use, suggested here, would be building a form dynamically like this:

var html = <html/>;
html.head.title = “Hello, World.”;
html.body.form.@name = “hello”;
html.body.form.@action = “test.php”;
html.body.form.@method = “post”;
html.body.form.@onclick = “return foo();”;
html.body.form.input[0] = “”;
html.body.form.input[0].@name = “Submit”;

Pretty slick, I must admit. Anyways, I’m willing to bet we’ll be hearing more about this new technology soon as it gains traction in an area that needs some work.

For more information, see this and this.

Aug 21

JQuery LogoAfter stumbling across this article, I was in awe to see what has recently transpired in the world of Javascript libraries/frameworks.  I had recently fell in love with Yahoo UI, but I was truly surprised to see that jQuery has gained remarkable traction in the market.

According to This Google Trend, it has leaped far ahead of even in raw search volume.  This is a particulary good sign for jQuery.  As search volume increases, so will the number of pages related to jQuery obviously and vice versa.

In my experience, rapidly growing popularity is usually a pretty good sign of success for an open-source project.  If problems exist with the project, usually the overwhelming interest helps to spur on solutions and increase the capability of the product because of the massive interest.  I’ve seen this same trend previously with with CakePHP, an excellent framework alternative for PHP based loosely off of Ruby on Rails.

Regardless, it appears that I will start learning jQuery.  Even if it turns out to lose the “battle”, it can’t help to learn more about advanced javascript without being forced to climb a steep learning curve.

Any truthfully, if this popularity trend continues, I think it’s safe to say jQuery is here to stay. if interested.

Feb 12

bubble-comments.gifCame across a pretty neat little CSS trinket this afternoon on

It provides a very simple, yet powerful way to generate “CSS Speech Bubbles“. It does use a bit of Javascript (25K – Yikes!) which confuses me because that really makes this thing, “Javascript/CSS Speech Bubbles”, doesn’t it?

However, I’m guessing the Javascript was used to make the code cleaner (and probably validate properly).

With that being said, still seems a tad hokey to me, but I suppose the project could nonetheless be useful in some instances. Too bad I don’t really have a use for ‘Speech Bubbles’ right now… maybe someday.

You can see original site here: CSS Speech Bubbles or just download the package directly.

Jan 06

I was recently presented with two projects at work that offered me a good opportunity to delve into the 'scary' world of Javascript WYSIWYG (what you see is what you get) content editors for the web. 

Normally, I try to avoid Javascript like the plague, but lately with the advent of AJAX and Javascript effect packages, I'm feeling a bit more used to it.

In this case, I needed two specific and diverse solutions to a few problems I had.

Problem 1: I needed a way to embed an editable spreadsheet in a web page without any special plug-ins or proprietary Microsoft scripts.  In basic terms: a web spreadsheet application.

SolutionCodeThat, a small venture heralding from the Ukraine offers a powerful, simple, and easy to configure all-in-one solution called CodeThatGrid

The power of this software is it's simple ability to allow any web user access to a simplistic replica of Microsoft Excel.  It closely resembles Microsoft's product in form and function, so there isn't much of a learning curve.  Best of all, it's relatively lightweight size-wise and seems to have a robust feature-set.  Overall, I think it's a great solution for a tough problem. 

Problem 2: I needed a simple yet powerful text editor that would allow a user to post content to the web without the need to know any html or any knowledge beyond Microsoft Word.  In basic terms: an advanced rich text editor.

Solution:  After lot's of research, Moxiecode's TinyMCE seemed to have the easiest to use and most robustly supported Rich Text Editor I could find at this time. 

When fully decked out, this thing looks almost exactly like Microsoft Word… and has almost all of the features.  Some highlights: real-time spell checking, table support, image insertion (even an optional file/image management system), a fully-compliant gzip compressor, and support for PHP, JSP, .NET, and Coldfusion.  It works well and I'm thoroughly impressed by the wide range of plug-ins and options available for the software.

So, remember to check them out if you have a need for some powerful WYSIWYG tools for your next web project.  And no, neither one of these companies paid me for this review.  I truly just like them a lot!

Nov 21

Just a quick hint for all you web developers out there in the world. 

The past week I have been struggling to implement a few draggable items and some accordion action on a project I've been working on at work. 

I found that is still a bit buggy in this department.  I stumbled across another similar effects/utility library that seems to work a lot better, is a bit lighter on file size, and seems to be a tad easier to implement (at least away from a Ruby on Rails platform). 

It's called Rico and it's quite nice.

Check it out if interested.

Nov 06

This week at work I've been struggling with a relatively simple problem that is disturbingly difficult to solve (at least as a humble web developer like myself).

Basically, I need to generate a dynamic, database-driven, menu system that will allow me to make some highly complex (tree-like) decisions based on user decisions.  Ok, stated out like that, it may seem to be a complex problem.. but it's not, I promise.

In more simple terms, I need a drop-down menu system that will allow a user to “drill-down” to the proper final output without having to click on twelve submit buttons and having a lot of constraints on what they can pick depending on what was chosen in the last drop-down.   I'm attempting to mix some, AJAX, and a Pear tree (a PHP plugin which was last updated on 3/17/03 as a beta). 

Let me give a real world example of what I'm trying to do.  You can imagine my problem by thinking about how you would implement a car repair web site.  If you wanted information about your 2002 Ford Mustang's automatic transmission: you would first pick “2002″, which would then fade in a new drop-down with all the valid 2002 car models… so then you pick “Ford”… which would then fade in another new drop-down with all of the valid 2002 Ford models… now you pick Mustang… we get a new drop-down with the different 2002 Ford Mustang models… I think you get the idea.

The real problem is in doing this efficiently, elegantly, and enhancing the experience with a touch of Scriptaculous.  It's tougher than you might guess.  I'll let you know how it ends up!

A special note to Jim: Yes, I know this problem might be easier solved in Rails, but who says a challenge isn't fun?

Oct 28

If you are any sort of a web developer, you should be interested in

Why?  Simply because it's an incredible useful and powerful Javascript library/package that can help you create incredibly rich interfaces and some nice eye candy at the same time. 

I was initially introduced to this amazing product through my former co-worker Jim when he used it extensively in his Ruby on Rails projects (since it's sorta integrated). 

Until recently though, I had never really paid much attention other than thinking it looked pretty cool.  However, while working on some freelance projects this week, I realized how useful a particular bit of (the drag & drop lists) could help me with a problem I've had.  So, I downloaded the PHP package and immediately started using it.

Then end result?  It worked flawlessly and made the project both useful and very good looking!

Thanks Jim.