Posts Tagged ‘xml’

Needed in (X)HTML 5 – An extension to the Meta Tag

Posted in (X)HTML 5 on February 2nd, 2010 by Navarr – View Comments

I was thinking today, while reading an article about redirect – that there is currently no way to accurately and semantically tell a user/bot that a web page is located somewhere else when you only have access to static (X)HTML files.  However, there is a workaround a lot of people use that dampens usability, and there is an attribute whose name would seem to imply that a way to do it should be possible.

By this of course, I’m referring to <meta http-equiv="" />.

Currently, people wanting to relocate their web pages rely on an older value to this tag that seems to have been originally designed for moving one person from one page to another in a set increment of time:

<meta http-equiv="refresh" content="0;URL=http://domain.tld/location" />

This doesn’t appear to be what this value should be used for, and has very negative consequences for search engines and parsers.  Instead, don’t you think we should be using http-equiv to its full potential?

To this, I propose the addition of <meta http-equiv="location" />, to properly match the HTTP Header for redirection.

I think there should be two ways to use this:

<meta http-equiv="location" content="http://domain.tld/location" /> and

<meta http-equiv="location" content="301;http://domain.tld/location" />.

Obviously, the second example gives us both a *three digit* HTTP Code, and the URL for redirection.  Since HTTP codes are only three numbers (though in the future may be greater digits) there still should not be any problem.

Why I now Prefer JSON to RSS/XML

Posted in JSON, XML on November 26th, 2009 by Navarr – View Comments

This might mainly be a “call-out” to Dave Winer, since he is continually attempting to push RSS for all sorts of data that should be inherited around the web – although, he has stated before that he likes JSON – I think – My memory is not so good, even my girlfriend has been complaining about it.

Either way, I’m just going to take a small amount of time here to list why I no longer like XML and RSS for portable data.

It’s too low-level.

XML and RSS are a markup language, of course.  It’s very low-level code, and is generally a pain to parse in any language.  Which is why I prefer JSON.

It’s high-level code.

JSON is a very simple object – It’s basically an array of data.  Here is some XML vs. JSON:

XML

<data>

    <user id="876232">

        <name>User Name</name>

        <screenName>User</screenName>

    </user>

</data>

JSON

"user":["id":876232,"name":"User Name","screenName":"User"]

Even though you can get similar results by making id its own tag in the XML, its still difficult to parse.  Where as with JSON, the data is already formatted and easily accessible.  Especially in my favorite language, PHP.

// For Json

    $json = json_decode($data,TRUE); // Decodes JSON and makes it a true array

    $id = $json["user"]["id"];

    $name = $json["user"]["name"];

// For XML

    $xml = new SimpleXML($data);

    $id = $xml->user["id"];

    $name = $xml->user->name;

The two are very close, but in the end JSON is more simplistic – because its such a high-level language.

Google Voice in Outlook

Posted in Google Voice, Outlook, 子猫ちゃん GV OMS on November 25th, 2009 by Navarr – View Comments

If you’re a regular reader to my blog, I’m sure you read yesterday’s post about how Google Voice could gain a head in the business world.  At that time, my dream of connecting Google Voice and Outlook via OMS was far from completion, with the only work I’d managed to accomplish being a simple reading over of the related technologies.

Well, late last night a certain gear clicked in my brain, and I spent the entire night awake and coding PHP on a local XAMPP server.  But my end result was fruitful – I finished successfully coding an Outlook Mobile Service that allows the delivery of SMS through the Google Voice system.

Here is a video showing it off:

I’m not yet prepared to release the source code for this, though.  (Messy, Messy, Mess! as Double D would say).  There’s a lot in my mind about it, it took a lot of work and I’m not ready to see forks and duplicate services pop up.  (Sorry guys =S).  Be on the look out for follow up posts that describe some of the technologies I had to learn to make this possible.

Oh, also – If you’d like; Help sponsor this project (I can’t afford to make it public ATM) with either Free (VERIFIED) SSL Hosting for a subdomain of a domain I own [contact me], or the money to make it public using my current host ($62.40/yr) [donate through my host].  I would be most appreciative if you could offer either of these to get this thing up and running!

What I wished Template Code Looked Like

Posted in Uncategorized on October 30th, 2008 by Navarr – View Comments

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:tpl="http://www.smarty.net/v/3"><tpl:strip>
    <head>
        <title><tpl:var name="siteName" default="My Website" /> | <tpl:var name="pageTitle" default="Page Title" /></title>
        <tpl:createTag name="link">
            <tpl:property name="rel">stylesheet</tpl:property>
            <tpl:property name="type">text/css</tpl:property>
            <tpl:property name="href"><tpl:var name="cssDir" />/default.css</tpl:property>
        </tpl:createTag>
        <tpl:createTag name="link" rel="stylesheet" type="text/css">
            <tpl:property name="href"><tpl:var name="cssDir" />/christmass.css</tpl:property>
        </tpl:createTag>
    </head>
    <body></body>
</tpl:strip></html>

About the Author (part 1)

Posted in Uncategorized on January 5th, 2008 by Navarr – View Comments

There are some people reading this tech blog of mine, so, I guess I should introduce who I am, eh?  Considering that most people reading this are people I’ve never talked to before, or some of the people that know me online.

My name is Navarr Barnier.  I’m a sixteen year old student at Klein Collins High School in Houston, Texas.  I work in PHP, (X)HTML, XML, CSS, and am starting to get familiar with JavaScript.  I considering myself a Web Developer.  I can’t really do anything with layouts, but code and backend, they are my friends.

Recently, I’ve started being more active in the Web Design and Development Community.  I’ve joined the mailing lists for Microformats, became a member of the DataPortability Google (and Facebook) group, Joined the APML Facebook group, and started the process of getting a spot in the HTML5 W3C working group.

I hate the terms, but I love the concepts of Web 2.0, Web 3.0, the Semantic Web.  The internet is truly moving in a good direction.  We are truly entering the Information Technology age.

Those are the basics.  When I post Part 2, I’ll cover over what www.gtaero.net is as well as its future.

Why HTML should become a dead language

Posted in Uncategorized on January 3rd, 2008 by Navarr – View Comments

Go ahead, take a gander around the Internet.  Lets see who is using HTML, and who is using XHTML.

  • XHTML
    • Blogger [Served as HTML]
    • Opera [Served as XML]
    • FireFox (Mozilla) [Served as HTML]
    • Facebook [Served as HTML]
    • MySpace [Served as HTML]
    • Twitter [Served as HTML]
    • W3C [Served as HTML]
  • HTML
    • Microsoft
    • Yahoo!
    • Apple
    • Google
    • WHATWG

As you can see, the "newer" websites are serving in XHTML.  A few of them Transitional (mainly websites where users can input HTML), however, a large number of them are marked as XHTML 1.0 Strict using the W3C DTD.

On to my main point, HTML should NOT receive an update.  The primary reason people want it to, is because it is FAMILIAR to designers and developers.  However, HTML is very lax on how it is interpreted, a little too lax in my personal opinion.

An Example.  <input type="text" disabled>.  The tag does not end.  Its interpreted as a single tag, and disabled means that its disabled.  I, myself, find this to be horrible, horrible code.  In XHTML, all tags must end, and all properties must have a value.  Which is easier to program, an HTML or an XHTML parser?

Probably the XHTML.  HTML was not designed to be parsed, and is really quite a pain to attempt to parse using such things like Regex, considering how lax of a language it is.

In my own personal opinion, HTML should become a dead language.  Some people hold on to it, let them.  Let them continue making their websites in Archaic HTML 4.  But do we really need to run an update to it?  No.  We should, move to XHTML.  XML has already proven to be a very dependable language.  Its used in such popular applications like Jabber, and Twitter, and is used commonly with AJAX, which is the height of the "Web 2.0" Revolution.

So why are we trying to revise it?  Why can’t we adopt a stricter set of rules so that they can better be implemented?  In my personal opinion, work on HTML should be halted, and moved to XHTML.  I still believe that the W3C and WHATWG should work together on a new version of XHTML.  XMLEvents and XForms should adopt the magnificent features that Web Forms 2.0 has created.  Again, this is my personal opinion.

EDIT: Added What Some sites are served as.  Its actually pretty depressing.

The Purpose of CSS in the Semantic Web

Posted in Uncategorized on January 3rd, 2008 by Navarr – View Comments

The Term Web x.x is overused like the bottom of a shoe, and because of such a term, its scoffed at, laughed at, and generally made fun of on any tech site or twitter you can find.  However, the term does have some importance attached to it.

"Web 2.0" would best be defined as the Internet for Design.  Web 2.0 cares more about the Design side of pages.  The Fancy fonts used, the rounded borders, the interactivity (AJAX!).  That is definitely what Web 2.0 is all about.

"Web 3.0" is all about Semantics.  The important part is that the code can be extracted via a machine or script or something.  Here, standards take importance.  XML, Microformats; we have to have standards that dictate how to write our code so that a program like Operator can pull the relevant information from it.

Now, once we have a code like that, CSS becomes VERY important.  We need to use CSS to position our elements and colour them to make them look useful to the viewer, not just the machine, while still having machine readable code.

You see what I’m getting at?  If you still don’t understand, try opening a random XML or RSS file (without a CSS, XSL, or XSLT file) in Opera.  That’s actually perfect rendering of an XML file, and that’s what it would be to any ordinary user.

Thankfully, Microformats were designed with Human Readability in mind, so they will properly work (bare minimum) with the HTML that is used with them, but, obviously, CSS is important to make it look like something nice.

So, now you know, the importance of CSS in the Semantic Web. ;)

Important Links:

XHTML2 vs. HTML5

Posted in Uncategorized on January 3rd, 2008 by Navarr – View Comments

What the hell is up with this fanboy war?  The web design community has already started getting used to XHTML, but now the WHATWG group wants the continued update of HTML?  Isn’t that a step backwards?

HTML was wild, unordered, and controlled by the browser vendors (at least from what I’ve seen), however, XHTML was started and controlled by the W3C group, making sure that it gets properly implemented, however, the WHATWG group doesn’t like it.  They want to stay with their old fashioned <b> tags.

I admit, web designers from the 90s have gotten used to the old style HTML tags, and its still what they’re teaching in school, but that is no reason to stay with it.  Technology changes over time, this is the same for any tech profession, the data will change, and then you’ll have to learn something new.  This isn’t just the case for tech jobs, but jobs that use computers.  Microsoft publishes a new Operating System, your company updates, and you need to re-learn it.

XHTML1 supports backwards compatibility with HTML for the old authors who are still getting used to it, and so that browsers can still render old code, XHTML2 doesn’t, but all browsers should properly implement both.  But by creating HTML5 and "XHTML5", WHATWG is requiring browser vendors to include yet another set of standards into browsers in order to properly display the internet.

Personally, I have yet to find a website that uses HTML5.  Most websites have already started using XHTML, and so I truly believe that implementing a new version of HTML is a step backwards.

If the WHATWG group wants to continue their efforts (like their wonderful work with Web Forms 2.0), I think their best bet would be to join the W3C’s work with CSS and XML Events, and XForms, don’t you?  If the two worked together, instead of fighting about such silly things, then maybe standards could be developed a lot faster, after all, the W3C does seem to be taking a long time to update and recommend standards.  Lets get things done faster, I want to start using XHTML2 and CSS3 already :-p