Training, Open Source Programming Languages

This is page http://www.wellho.net/mouth/1739_Bat ... -Nag-.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Bath, Snake or Nag?

If you're running a web application through a number of phases , you've a choice of three ways of keeping information from one page to the next (keywords - sessions, shopping carts!).

You can use a bathtub - each time history (data) is entered, it gets added to a collection which gets passed back and forth every time between the browser and the server, until you can have a lot of data sloshing around, rather like you have with water in a bath if you move, ever so gently, up and down at the same speed as the natural motion of the waves; a series of small movements lead to some quite dramatic larger movements.

A snake is a single piece of information being passed back and forth - I could use the analogy of the ball in a tennis rally if you prefer - and that piece of information is a unique identifier which gives a key into a database or a file name on the server.

And a nag is someone - a browser - who keep coming back with "it's me again".

Let me translate each of those into a technology / protocol method. The Bathtub is hidden fields, the snake is a single hidden field with data being stored on the server in a session, and the nag is a cookie based session. The problem with a snake or a tennis rally is that once you've broken it, you can't get back and carry on with same rally or reptile so in web terms, you can't break away from a series of pages and then come back and expect to carry on - you have to start anew. And since the Bath is based on the snake, this limitation applies there too.

Which leave you with the "nag" - the cookie. Now we sometimes get a bit short with a nag, just like we're sometimes less that thrilled to accept certain cookies - but nagging can be a very effective way of getting things done, can't it?
(written 2008-08-06, updated 2008-08-07)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
H301 - PHP - Sticky fields and session
  [1766] Diagrams to show you how - Tomcat, Java, PHP - (2008-08-22)
  [1911] Remember Me - PHP - (2008-11-28)
  [2416] Automating access to a page obscured behind a holding page - (2009-09-23)
  [2738] What is all this SESSION stuff about? (PHP) - (2010-04-25)
  [3540] Easy session example in PHP - keeping each customers data apart - (2011-12-06)
  [3820] PHP sessions - a best practice teaching example - (2012-07-27)
  [3918] Multiple page web applications - maintaining state - PHP - (2012-11-10)
  [4070] Passing variable between PHP pages - hidden fields, cookies and sessions - (2013-04-26)


Back to
Clean code, jump free (Example in Lua)
Previous and next
or
Horse's mouth home
Forward to
Vertical London
Some other Articles
First class functions in Lua lead to powerful OO facilities
Lua - Table elements v table as a whole
Age Concern
Vertical London
Bath, Snake or Nag?
Clean code, jump free (Example in Lua)
Rules, suggestions, considerations for Lua variable names
Current visitors from around the world - PHP
Finding words and work boundaries (MySQL, Perl, PHP)
All around the world?
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1739_Bat ... -Nag-.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb