www.webdeveloper.com
Page 3 of 11 FirstFirst 12345 ... LastLast
Results 31 to 45 of 152

Thread: XHTML -- Still Relevant?

  1. #31
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,687
    Ajax is fun; it allows me to read from multiple files.

    Now, correct me if I'm wrong, but doesn't AJAX work better with XHTML files than with HTML files because XHTML is, well, XML?

  2. #32
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    There's no advantage I'm aware of.

    Plus, the data transmitted using ajax may not even be XML. These days, JSON is more common. Or ready-to-use HTML fragments might be transmitted as well.
    Last edited by Jeff Mott; 04-01-2012 at 12:12 AM.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  3. #33
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,687

    Talking

    Oh, come ON guys! Give me a reason to cling to my beloved XHTML. PLEASE!

  4. #34
    Join Date
    Aug 2007
    Posts
    3,767
    Quote Originally Posted by Mr Initial Man View Post
    Oh, come ON guys! Give me a reason to cling to my beloved XHTML. PLEASE!
    Well, going back to almost the first comment, did you ever actually serve a page as XHTML?
    Great wit and madness are near allied, and fine a line their bounds divide.

  5. #35
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Jeff Mott View Post
    There's no advantage I'm aware of.

    Plus, the data transmitted using ajax may not even be XML. These days, JSON is more common. Or ready-to-use HTML fragments might be transmitted as well.
    Yep. I can only think of one site/application that actually pushes XML around in its AJAX requests: MS Dynamics CRM, and presumably the upcoming GP web client. But, there are reasons it's sensible to use SOAP services there. For most applications it's more sensible to use JSON or HTML.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  6. #36
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,687
    Quote Originally Posted by Declan1991 View Post
    Well, going back to almost the first comment, did you ever actually serve a page as XHTML?
    Yes, a few. One was a page used for updating the team information for a fantasy basketball league--it was XHTML+SVG, as it helped arrange the map.

  7. #37
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,923
    I prefer serving up JSON these days for AJAX requests/responses, as it's a breeze to work with in PHP, and 99% of the time I don't have any need for whatever XML might bring to the plate that cannot easily be handled by a JSON structure.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  8. #38
    Join Date
    Feb 2011
    Location
    Chuluota, Florida
    Posts
    144
    I love the HTML5 doctype. Much easier to remember when typing out a page by hand than having to insert a boilerplate for one of the other doctypes.
    ----------------------------------------------------------------------------------------------
    WYSIWYG editors will never beat my hand written code!!!! Learn to do it in notepad and learn how to actually control your website! Current Project http://www.jmcanineservices.com

  9. #39
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Mr Initial Man View Post
    Yes, a few. One was a page used for updating the team information for a fantasy basketball league--it was XHTML+SVG, as it helped arrange the map.
    Well, what prevents you from doing the same with the HTML5 doctype?


    Quote Originally Posted by NogDog View Post
    I prefer serving up JSON these days for AJAX requests/responses, as it's a breeze to work with in PHP, and 99% of the time I don't have any need for whatever XML might bring to the plate that cannot easily be handled by a JSON structure.
    Object typing seems a bit clumsy to me with JSON -- not to mention, there isn't a standard way to do it. JSON.stringify() certainly doesn't perserve object type in any way. In many cases, x != JSON.parse(JSON.stringify(x));

    And this can be sovled to some extent either by customizing your stringify and parse methods, or by JSONP at the expense of security. But, XML provides a standard way to identify object types. You may still have to write some custom code to serialize and deserialize an object; but if you're sharing that object with another application (or developer), which is the real power of XML, you don't have to worry much about application security or communicating any custom mechanism for object serialization and deserialization: it's all standard, almost every language on the planet has native(ish) methods for dealing with XML in a sensible way.

    Also bear in mind, some IDE's (at least one that I can think of), can completely hide the details for you. Visual Studio allows you to create SOAP services as if they're just public methods. And it allows you to connect to SOAP services as if they're just objects with methods attached to them. You expose and access remote methods just like any other object.

    But in many cases, JSON (or JSONP) are probably far better solutions than XML/SOAP.
    Last edited by svidgen; 04-01-2012 at 04:33 PM.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  10. #40
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,687
    Um... the fact that I had an SVG diagram right in the page as part of the markup?

  11. #41
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  12. #42
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,687
    Besides, when I switched my doctype over to HTML5, the validator barfed. It doesn't like <meta> elements, it doesn't like my <link> elements...

    Read the barftastic barfage yourself.

  13. #43
    Join Date
    Nov 2002
    Posts
    2,632
    Quote Originally Posted by Mr Initial Man View Post
    Besides, when I switched my doctype over to HTML5, the validator barfed. It doesn't like <meta> elements, it doesn't like my <link> elements...

    Read the barftastic barfage yourself.
    It doesn't like non-HTML 5 code since that's what you are validating against.

  14. #44
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Well, not that you shouldn't try to align your pages with the spec, but remember that validation is relatively meaningless. Most big sites don't even bother trying to adhere:

    http://validator.w3.org/check?uri=go...Inline&group=0

    It's a pretty badge. Other than that, as long as the mainstream browsers can render your site, and you're not using any meaningless tags, you're good. That's really the goal -- to instruct you on using tags and structure that are meaningful to your audience. And validation serves as a guide, but it's not like browser vendors are going to stop rendering pages or supporting tags b/c the validator thinks they're wrong.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  15. #45
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,687
    Meanwhile, using the XHTML doctype, my page validates just fine:

    The validation of XHTML 1.0

    BTW, here's the page in question: http://mrinitialman.com/Books/HTML/C...lue_Types.html It's part of my HTML book.
    Last edited by Mr Initial Man; 04-01-2012 at 05:31 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles