Monday, April 11, 2011

Build a website in jQuery alone ?

Hi, I am new to jQuery.

Is it possible to create a website, such as an online quiz, with jQuery and HTML alone?

From stackoverflow
  • I am sure it is possible, but I don't think it is a great idea. Everything would need to be stored in the web pages. Including all data (answers, questions, and alternatives).

    As an excercise to get to know jQuery it may be a good start though.

  • Sure, this is possible. Your biggest challenge will probably be saving state between requests, but you could accomplish this with something like jQuery Session. And, I don't think you will be able to persist data outside of the client (e.g., saving data for a 3rd party to view) unless you have a server-side language that is storing your data.

  • I guess in theory you can.

    For a website to be more than a static set of pages it has to do something useful. Pages by themselves can only process the input the user gives with not much else. So a static page could do calculations like latitude and longitude distances because that can be self-contained.

    For a website to be truly useful it has to interact with something else: a server back end or some other provider of input. Now that could be your server or you could consume Web services to do I guess quite a lot.

    Ultimately jQuery is just Javascript so there's no reason you need anything other than it and HTML (plus, I assume, CSS). Not sur ehow useful it'll be though.

    Boris Pavlović : JavaScript can be used for server-side programming, too: http://en.wikipedia.org/wiki/Server-side_JavaScript
    annakata : "Ultimately HTML is just Javascript" - baffled
    Neil Aitken : The first part of this answer is useful, but i'm confused by the "HTML is just Javascript" statement
    cletus : I meant jQuery. Fixed.
    Neil Aitken : @cletus. ah all becomes clear :)
  • TiddlyWiki is a great example of what can be done in javascript alone. And therefore it is entirely feasible that you can build all sorts of apps using jQuery on top of javascript.

    None of that however means it's necessarily a good idea - but I guess that all depends on the context of what you are trying to do.

    Edit: What about this as a demonstration of what can be done in pure client-side javascript - an MSX emulator: http://jsmsxdemo.googlepages.com/jsmsx.html

  • Nobody has mentioned the dramatic problems of SEO, accessibility, and noscript support you'd be getting yourself into.

    Technically doable in the same way that jumping off a cliff is.

0 comments:

Post a Comment