Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24

Thread: What is AJAX... the big picture

  1. #16
    Join Date
    Dec 2013
    Well no, you are not getting your hopes too high. All of the technology exists to accomplish your goals.

    In general, you would use 'events' to trigger reading or writing on the server. These events are either user triggered(clicking on a button, for instance) or time-based(interval timer).

    I suspect that when you say 'device', you may be trying to communicate with an embedded webserver which usually have limited capabilities as far as server-side scripting. So, you would need to understand the commands that are needed to perform various operations on the server and simply use those commands (probably CGI type) within your Javascript/AJAX code. If you are targeting standard PC based servers like Apache or IIS, then you will have all sorts of PHP, ASP commands available on the server.

  2. #17
    Join Date
    Jun 2004
    Tampa, Florida
    OK! So as the devil is in the details, let me now consider some of those server side requirements. As it turns out my background has been in the world of automation, including remote control and data acquisition, and has also been very tied to the intel world. Everything from little embedded machines with 386ex CPUs, and no OS (unless I wrote one) to modern windows machines. So just to cut my learning curve I likely would be working with a PC based server. Unfortunately my background has also left me with a lot of tunnel vision, having worked mostly with custom applications.

    So as you can likely tell, I'm trying to mentally navigate replacing parts of such systems, where everything is a custom app, to systems where the custom work is concentrated where its really needed. So now that I'm seeing where browser based control panel displays can interact with a server side database via AJAX, I assume that whether it is done via timed poling or events, I could both pull and push data from and to that database, correct? So if that's true, and the database can be PC based, it remains now for me to first consider what database would be best, and to educate myself as to what server side apps and coding would need to be done, to complete the data flow between to that database. Next I'd be looking at the PC apps that would do the device communication, using the database as a kind of middle-man data pool.

    on that last point, I still have a lot of education to catch up on, especially about database interaction. Heck, the last time I wrote code to directly interface with a database it was a Microsoft ACcess database, and I'm reasonably sure I'd be better off these days working with something my mySQL or maybe postgGess?

    But there I'm getting ahead of myself... I'm intentionally working backwards, from a javascript based control panel to database interaction via AJAX. So the next question to ask is how much "from scratch" server side work is needed to go between the web server and and the database. Here I'm hoping, in the same spirit of getting away from re-inventing wheels, that this functionality is already available as an extension of some PC based databases? It would be nice to think that for simple things like pulling/pushing numerical or boolean values would be more about configuration and mapping then scratch building code. But again, maybe my hopes are too high there?

    I'm definitely not allergic to coding or even working with languages new to me, I just know I've re-invented way too many wheels in my life. As a now out of work programmer and electronics guy whose skills are constantly becoming obsolete or at least dated, this kind of assist in understanding newer technology I can put to use right "out of the box" is very much appreciated.

  3. #18
    Join Date
    Dec 2013
    We all need to learn new technology on a regular basis or we soon fall behind. I would suggest that you learn more about Javascript, HTML and PHP technologies. There are many excellent tuturials online for free that you can go through. One that I particularly like is the W3C schools -> http://www.w3schools.com

    They have tons and tons of good material and tutorials in many different areas. You just need to take the initiative to learn from them All you need is a PC and time (you said you were out of work...well, you just found something to occupy your time:-). Best wishes to you as you dig in and learn.

  4. #19
    Join Date
    Jun 2004
    Tampa, Florida
    Thanks! Well Javascript, HTML, and CSS were things I had become reasonably proficient in, and it sounds like the newer tools and browser evolution have made dealing with the different DOMs easier. So I hopefully have a head start there, and I do intend to dig in a lot more in the coming months. Thanks for the link too. It doesn't seem to have an AJAX area, but I'll find something.

    As you can surely understand though, I've been bitten enough times by bad assumptions. So now I start by explaining the goals and functionality I want to achieve, and ask ahead of time what tools to explore to get there. You know how it is!!! These days one can easily talk themselves into believing some new technology (AJAX in this case) will help them toward a goal, only to find out I'm barking up the wrong tree. :-)

  5. #20
    Join Date
    Dec 2013
    I am not sure why you think W3schools does not have an AJAX tutorial. I found it quite easily and it is excellent -> http://www.w3schools.com/ajax/default.asp

  6. #21
    Join Date
    Jun 2004
    Tampa, Florida
    I found it. Tunnel vision. :-\

    Question... is Ajax functionality obtained from a standard library, like a JS file, that you have to link your pages to in order to use, and if so where should I get it, and is it free, open source, or a commercial product?

  7. #22
    Join Date
    Dec 2013
    AJAX functionality is primarily included in the ECMAScript language and executed by the JS engine in the browser so it is free. In your case, the primary function needed is "XMLHttpRequest". That will allow you to Get and Post data to/from the server as needed. Do some research on that function to understand how it executes in your JS.

  8. #23
    Join Date
    Jan 2014
    Calgary, Canada
    AAJAX is a technique for creating fast and dynamic web pages.

    AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

    Classic web pages, (which do not use AJAX) must reload the entire page if the content should change.

    Examples of applications using AJAX: Google Maps, Gmail, Youtube, and Facebook tabs.

  9. #24
    Join Date
    Jun 2004
    Tampa, Florida
    Well I'm very interested in the the part about being able to exchange data with a server, because it means a database could become a link between software communicating with real devices, and updates to a web page. But I don't understand the continued references to classic web pages needing to re-load pages to update regions. Again, despite the fact that this code is so old it only works in IE now, I did throw it together over a dozen years ago. It simulates a control panel for an electric utility substation, and illustrates the ability to update numerical values without reloading the page, and even change the breaker graphic (just blinking currently) when you click, without re-loading.


    That was done way back when IE was version 4, and so was the early Mozilla (Netscape) browser. And really, I had seem more sophisticated programmers use ordinary javascript to run much more complex animations, swapping out all kinds of page content without re-loading the page.

    The probalem, of course, is that every new browser version would break the code, because the DOM kept changing. So maybe the main thing with AJAX is that it will work with ANY browser, on any DOM? If not, its not a huge improvement really.

    Now the part about exchanging data directly with a server... THAT is VERY interesting!! :-)
    Randy (PeterPan)
    * * *
    * *
    ... Second Star to the Right, and Straight on Till Morning!
    * * *

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.14677 seconds
  • Memory Usage 2,942KB
  • Queries Executed 15 (?)
More Information
Template Usage (35):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (9)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (75):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates