About Me

Subscribe now!Feeds RSS

Messages

May 2, 2009

XHTML, why not HTML?

XHTML, the standard, was first released back in 2000. Roughly five years later we begin to see major websites revised to use this standard. Even the favorite whipping boy of standards-compliance punditry, Microsoft, presents their primary homepages, msn.com and microsoft.com in XHTML. Standards compliant XHTML sites are still the minority. The reason is simple. When the W3C released the new standard, the rest of the web running on HTML did not cease to function. Nor will the rest of the web, written in various flavors of HTML, cease to function any time soon. Without any pressing need to conform to the new standard, designers continue to use old, familiar methods. These methods will perform in any modern browser, so why bother switching?

These sentiments are similar to ones I experienced. A kind of "if it's not broke, don't fix it" mentality sets in. Whether HTML was "broken" or not is a different argument. To the casual Internet user, their standards are fairly direct. If a site displays without noticeable error and functions to their satisfaction, these standards are met. Whatever additional steps the browser took to make such display possible is irrelevant to most users. This kind of mentality is difficult to overcome in designers accustomed to their old methods.

Technical obstacles to adopting XHTML may be quite steep as well, especially as regards large, existing websites with complex scripting. Yet the time may eventually come where yesterday's "tried and true" HTML is little more than an ancient language, unable to be interpreted by modern electronic devices. Whether one agrees with the direction the W3C takes in the development of HTML is irrelevant, you are just along for the ride. With some perseverance, getting the hang of XHTML is possible. In form, it is not as different from HTML as Japanese is from English. Knowing HTML grants a basic knowledge of the language, it simply becomes a matter of learning a particular dialect. Even an original nay-sayer such as myself managed to do it.

Benefits of XHTML
There are 2 primary benefits to using XHTML. First is the strict nature of valid XHTML documents. "Valid" documents contain no errors. Documents with no errors can be parsed more easily by a browser. Though the time saved is, admittedly, negligible from the human user's point of view, there is a greater efficiency to the browser's performance. Most modern browsers will function well in what's usually referred to as "quirks" mode, where, in the absence of any on-page information about the kind of HTML they are reading, present a "best guess" rendering of a page. The quirks mode will also forgive many errors in the HTML. Modern browsers installed on your home computer have the luxury of size and power to deal with these errors. When browser technology makes the leap to other appliances it may not have the size and power to be so forgiving. This is where the strict, valid documents demanded by the XHTML standard become important.

The second benefit is in the code itself, which is cleaner and more compact than common, "table" based layout in HTML. Though XHTML retains table functionality, the standard makes clear tables are not to be used for page layout or anything other than displaying data in a tabular format. This is generally the primary obstacle most designers have with moving to XHTML. The manner in which many designers have come to rely on to layout and organize their pages is now taboo. Simple visual inspection of XHTML code reveals how light and efficient it is in comparison to a table based HTML layout. XTHML makes use of Cascading Style Sheets (CSS), which, when called externally, remove virtually all styling information from the XHTML document itself. This creates a document focused solely on content.

XHTML makes use of "div" tags to define content areas. How these "divisions" are displayed is controlled by CSS. This is known as CSS-P, or CSS Positioning. Trading in "table" tags for "divs" can be tough. Learning a new way of accomplishing an already familiar task is generally difficult. Like learning to use a different design program or image editor, frustration can be constant. Looking at "divs" as a kind of table cell might be helpful, though they are not entirely equivalent. As required by the XHTML standard, always make sure there is a DOCTYPE definition at the top of the document. This is not only required by the standard, but it will force Internet Explorer 6, currently the most common browser, to enter its "standards compliance" mode. IE6 and Firefox, both operating in standards compliance mode will display XHTML in much the same way. Not identical, but far better than IE6 operating in quirks mode. Learning how to iron out the final differences between displays is the final obstacle and can require a bit of tweaking in the CSS.

Clean code has multiple benefits. It creates a smaller page size which, over time, can save costs associated with transfer usage. Though the size difference may appear small, for someone running a highly trafficked site, even saving a few kilobytes of size can make a big difference. Further, some believe search engines may look more kindly on standards complaint pages. This is only a theory, though. In a general sense, any page modification that makes the content easier to reach and higher in the code is considered wise. Search engines, so it is believed, prefer to reach content quickly, and give greater weight to the first content they encounter. Using XHTML and "div" layout allows designers to accomplish this task more easily.

Conclusions
XHTML is the current standard set by the W3C. The W3C continues development of XHTML, and XHTML 2.0 will replace the current standard in the future. Learning and using XHTML today will help designers prepare for tomorrow. Valid XTHML produces no errors that might slow down a browser, and the code produced is clean and efficient. This saves in file size and helps designers better accomplish their search engine optimization goals. Learning XHTML is primarily about learning a new way to lay out pages. Though frustrating at first, the long term benefits far outweigh any initial inconvenience.

Apr 21, 2009

The new domain of AdU ITM

the old AdU ITM Link http://adamsonitm.com is not available on the net.

the new one is http://adamsonitm.net

Apr 15, 2009

Tutorial - Forum Sites and E-book

May mga instances na hindi mo maintindihan ang lecture ng professor mo sa mga major subjects. For example, ang course mo ay IT at Computer Science kung saan programming and scripting ang mga subjects sa course na ito. Nagiging complicated ang subject kapag wala kang natututunan dahil sa nalilito ka sa subject o sa nag-tuturo.

Ako naman, dalawang paraan lang ang ginagawa ko para hindi ako bumagsak at the same time e maunawaan ko't maintindihan ko ang mga nilelecture sa'min ng prof namin sa major:

1. Mag-tanong. One of the most powerful key for the learners is to observe and to ask. Mas malinaw ang isang lecture ng isang professor kung may nagtatanong. Katulad kong slow learner, hindi ko hinaayaan ang isang lecture na matapos hangga't hindi ko maintindihan. Swerte nga ako nitong mga nagdaang mga First and Second Semester (2008-2009) kasi karamihan naman sa mga naging prof ko ay approachable at mahahaba ang pasensya which is dapat ganoon sila.

2. Be Resourceful. Kung hindi mo nga naman talaga maintindihan ang isang certain topic o lesson sa lecture nyo, why you don't try to ask to others? Like me, member ako ng convergence forums. Natatanong ko sa kanila ang mga bagay na hindi ko naiintindihan about topics in IT. At nasasagot naman nila ito kasi nga ang concept ng convergence forums is to share thoughts, minds and knowledge by simply answering questions. At siyempre, hindi naman ako madamot, kapag may nag-start nang mag-tanong sa isang thread depende sa topic na nalalaman ko naman ang sagot, e sinasagot ko naman ito. At sa forum site, nabui-build up jan ang isang social community ng mga learners at mga masters sa IT.

Pero siyempre, wag mong asahan na masasagot din agad nila yung gusto mong malaman. Instead, try to use Search Engine and type the keywords of the topics you wish to know. Sa t0p ten results, naibibigay sa 'yo ng Search Engine ang recommended site para sa topic na hinahanap mo para pag-aralan mo.

Isa pa, kung mahilig kang mag-basa, maganda rin siguro na puntahan mo ang mga tutorial sites at mga free e-book downloads. Kasi detalyado ang mga tinuturo doon. Or else, sa youtube pwede mo din i-search ang mga topics na gusto mo ding malaman.

Feb 3, 2009

My PHP Days in AdU

Guys, ang next na i-po-post ko dito ay ang mga natutunan ko about PHP sa Adamson. So, kung aware po kayo about PHP e mas lalo naman po ako. Unti-unti kong naiintindihan at nauunawaan kung bakit napaka-halaga ng C++. Kasi, extensive ang kanyang coding sa ibang programming and scripting languages kagaya sa PHP, almost the same din ang nito sa C++ pero iba nga lang ang input-output.

Probably, ipo-post ko po ito if I have a free time.

Jan 11, 2009

A simple nested for statement in PHP

Recently, I read some blogsites and forums about conditional statements in PHP. And i found out that there are some similarities when you are making some codes in C or C++ and in PHP. Now, if you have a strong foundation in C or C++ then it is easy for you to study the PHP scriptings.


Below are some of my sample coding (or scripting) in PHP ab out nested for condition statement.

save it as index.htm | save it as validation.php

Sample Output

This is a sample output. When you copy the index.htm, may i request to please save it in one folder (for formality).








And this is the sample output. Better yet, to do this, you must read or review your subject in Data Structure and Algorithm about how to do this one.