www.webdeveloper.com
Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29

Thread: "New HTML tags"

  1. #16
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,278
    It doesn't matter how simple you think that you have made things, the costs out weigh any benefit. What you have created is evil and should be removed from the face of the Earth.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  2. #17
    Join Date
    Feb 2012
    Location
    Tallahassee, FL
    Posts
    280
    Quote Originally Posted by Charles View Post
    What you need is some sort of server side pre-processor. And instead of using new tags you could use processing instructions, <? ... ?>. I'd bet that you could do a lot with something like that.
    YEAH! I think you are onto something. You could even use it to define variables and interact with databases....OH! You could even use it to edit cookies and shorten smething like:
    Code:
    <div id="fb-root"></div><jscript>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</jscript><div class="fb-like" data-href="%js%window.location.href%sj%" data-send="true" data-width="450" data-show-faces="true"></div>
    into <?=somevar;?> !!!

    Seriously though, had you done the samething (make the library) in php, I would actually think it was decent. (Well, if you did it WELL)

  3. #18
    Join Date
    Apr 2012
    Posts
    1
    These are very nice tools for using the HTML for creating the design of the site.Thanks for sharing.

  4. #19
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Quote Originally Posted by NoEffinWay View Post
    YEAH! I think you are onto something. You could even use it to define variables and interact with databases....OH! You could even use it to edit cookies and shorten smething like:
    Code:
    <div id="fb-root"></div><jscript>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</jscript><div class="fb-like" data-href="%js%window.location.href%sj%" data-send="true" data-width="450" data-show-faces="true"></div>
    into <?=somevar;?> !!!

    Seriously though, had you done the samething (make the library) in php, I would actually think it was decent. (Well, if you did it WELL)
    Do you mean something like this?

    http://ejohn.org/blog/javascript-micro-templating/

    Thanks for both of your positive feedback!
    Much appreciated

  5. #20
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,278
    No, that--like what you are proposing--runs client side and is very bad. We're proposing something more like: http://www.php.net/ .
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  6. #21
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Thanks Charles!

    Very interesting! Maybe you could specify a bit more, what both of you are thinking of!

    Some kind of PHP that pre-processes <? ... ?> tags and maybe interacts with the database and uses/introduces variables?

    NoEffinWay - can you explain that a bit more?


    Thanks very much!

  7. #22
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    What a pity.
    It seems you both had somewhat of the same idea.

    Maybe one of you could elaborate on it...

    Any other comments on these "new HTML tags"?
    (http://4nf.org/)

  8. #23
    Join Date
    Apr 2012
    Posts
    55
    Although a couple of the posters are being a little cruel in the tone of their jokes, I do agree that this is a good concept with the wrong approach.

    I, also, started down a similar road to this 7 or 8 years ago, but quickly decided it was a dead end. For one thing, pages written this way won't validate. You have two options for validation: create your own DTD with your extended tags defined or process server-side. Of the two, I would choose option 2 for two reasons: (1) option 1 is going to be wrought with browser conflicts, especially among old browsers, "lite" browsers, or browsers that fit special purposes (screen readers, search engine bots, etc). (2) option 1 is an long, uphill battle to get a new DTD recognized -- HTML5 is still being worked on and it's been how many years?

    So I would agree that it should be done server-side, not client-side.

    You could, as suggested, write a PHP library. That would be a great option. However, I think there may be better options than that. An option that sounds good to me is (A) create your own DTD to use server-side, thereby avoiding the problems discussed above and allowing you to create pages the way you already are (B) use Node.js to process your document and (C) send compatible HTML to the client.
    Last edited by nathanwall; 04-18-2012 at 12:55 PM.

  9. #24
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Sorry for the delay and thanks very much for your post Nathanwall!
    It's great to hear you like the idea as such, even though I agree that the approach might not be ripe for the market quite yet. You even researched this yourself that long ago. Yes, my research also goes back to that time.
    I started the first version off in pure JavaScript. It was heavily criticised for relying on JS that heavily...

    You, Charles and NoEffinWay seem to agree that things could be even a bit more server side in PHP.

    At the moment, the architecture is such, that the page with extended tags is being pulled into the DOM, if Ajax is enabled. Otherwise, in a noscript tag, a redirect is performed with the tags also being extended, but obviously no JS functionality. This gives rise to the effect that a short version of the HTML with the abbreviations can be viewed in the browser and by the search engine alike. This results in all the SEO advantages that are possible.
    I have talked to my main client page manager and he says the SEO effects are desirable and seem to work well and without risk. So I don't want to loose them completely.

    I'm easy about the W3C validator, if that's what you mean. At the moment, the tags are only parsed in text nodes (i.e. at the very left of them). They're only text. Therefore they validate, even if the underlying HTML is faulty! I spawned a whole thread on the DTD topic and agree that it is a very cumbersome route. No, not necessary, as these "tags" are text anyway...

    We seem to agree that a PHP library is the minimum route. That would be very safe play. Don't mean to be cheeky but I'm aiming a bit higher than that. One of the biggest advantages of these "text tags" is that they're completely platform independent. You can route them into the mid-tier or even into the back-end. It doesn't matter, whether the user uses PHP or Java, for example. What I'm coding in PHP doesn't marry the user to PHP.
    That should stay that way, if possible...

    Maybe you can explain what you mean by:

    "(B) use Node.js to process your document and (C) send compatible HTML to the client." (as we can skip (A) ) ?

    Maybe Charles or NoEffinWay can explain what further pre-processing can be done in PHP?


    Thanks a million to all of you!

  10. #25
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    arvgta

    Noble effort, but it looks like you try to reinvent the wheel. In fact your wheel is squared.

    HTML is a mark-up language, not a scripting one, so that you can not use the self paradigms of HTML to create a sort of custom HTML "library/framework" without altering its DTD, which is not of a general purpose utility.

    Well, in fact, a "New HTML tags" mark-up language was already invented. Its name is XML.

    So, what you are trying to do is to use a scripting language (JavaScript, PHP... whichever) to translate your custom mark-up language into the standard HTML language. What for? Maybe some present HTML mark ups or tokens are obfuscated or verbose, but that will not make your custom ones easier to handle without a documentation. Further more, if you rely on a different language (JavaScript, PHP, etc) to create another language (HTML) you should presume that the former (or the later, or both) will never change in the near future. Which is not the case.
    Last edited by Kor; 04-25-2012 at 06:53 AM.

  11. #26
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    I don't see the point about making a custom DTD, because the new tags are in text nodes, not in HTML.

    Yes, that's a good point. Maybe I really only want to deliver, what XML doesn't deliver and that is new tags that stand for arbitrarily complex substituions of HTML.

    I'm not too worried about JavaScript or PHP changing as we go along, because I'm only using such basic features...

    Are there any participants who can see the sense in providing tags like these:

    http://4nf.org/htmla.txt

    in bigger style. In a next step, I intend to route them into a database on 4nf.org. The idea then would be to select these tags in "point and click" fashion.

    There's quite obviously not much of a variety of such tags yet, but the database could become really huge.

    What do you think?

  12. #27
    Join Date
    Jun 2009
    Posts
    3
    Just trying to get it....

  13. #28
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    It's easier to explain this way. Have a look at a few of these tags:

    http://4nf.org/new-html-tags/

    We've seen the Facebook Like! already.
    The Current Date! is another example.
    In a next step, I could try to make it self-maintaining in AJAX style, so it updates itself, without adding "weight" to it.

    Other non-trivial services like supplying e.g. the Dow Jones! in real-time would be thinkable, that can maintain themselves. Or main top-story headlines of leading webpages for example.

    This really is only limited by ones imagination.
    Fact is, there's two few tags at the moment to make an integration worthwhile.

    This way, 4nf.org could become a universal server for non-trivial abbreviations, that can be implemented rapidly.
    (Amongst the other advantages of the tool in the field of SEO)

    I haven't even set up a database underneath to power all this yet, which would make further automation of the user experience possible.

  14. #29
    Join Date
    Jan 2011
    Location
    Munich, Germany
    Posts
    237
    Ok, the last posts of mine were very confusing, only dreams of the future.
    Sorry.

    Question:

    As a rule of thumb, it seems you would advise me take as much as possible
    server-side?

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