Saturday, March 12, 2011

Moving past WYSIWYG

One thing that I have always loved about owning a domain is the ability to host multiple services at one address. For instance, I could have my blog address at one subdomain, a file server at another, and maybe throw in a tumblr or soup account for fun. At the moment, the only service that I currently have running at this domain is a blog and a catchall email address, which have now just realized hasn't been checked since I created it. Hmm. Anyway. The advantage to having these subdomains is that while they make your site slightly more complicated (which can be easily rectified with a know-how of when to put what links when), they add significant customization options.

While it may not be 100% evident that I'm using Blogger right now (seeing as I've removed the navbar and the only hint is a tiny bit of text at the bottom of each page), it is very much my preferred blogging engine. I'd go with WordPress, but as I've said previously WordPress.com tends to put a price on a lot of basic features that Blogger gives to me for free (thank you, Google Business Model). A nice feature of Blogger is that not only do they let me publish my blog to a specific domain, but they let me specify a missing file server as well. This means that if I request a page to my domain that doesn't exist as per my blogger account, Blogger will defer to the missing file server to see if any other files exist on that specific file path. I'm planning on setting one up soon, just as soon as I finish coding some other stuff first.

What exactly does this give me? Well, for one, it transcends the limitations of a WYSIWYG-nature site like Blogger. WYSIWYG, short for What You See Is What You Get, basically means that I can be sure that the blog post that I am typing right now will indeed appear on my site as these exact words, in the format that I have specified using the toolbar above this text box. Unfortunately, this also means that I can't program in any sort of dynamic content into my site. Let's take a simple PHP script as an example:


What you're currently looking at is not WYSIWYG. If it were, that's exactly what you'd see if you were to query that PHP script from a webserver. Instead, what we simply see is two friendly words: hello world!

Of course, WYSIWYG works in the majority of simple situations. Ironically, WYSIWYG is practically nonexistent on the web; although I am currently typing this post in a text box, there's a script that's going to be called when I hit the "post" button that will automagically format all of this text into the proper HTML equivalents. You're simply viewing this text like this because your browser is interpreting the HTML tags around everything I type and is translating it into something that looks much more attractive to your eyes. Try viewing the source to this page (usually found in the Edit menu, search around on Google to find the appropriate function in your browser). That is what this site really looks like. Hurting your eyes? Try looking at it for hours on end; the code you're seeing is the sweat and blood of many web developers' hard work.

No comments:

Post a Comment