An Interpretive Style of Web Programming Tutorial

An Interpretive Style of Web Programming Tutorial

An Interpretive Style of Web Programming Tutorial

Today’s tutorial is a “blurb” about the personal style of web programming here at this blog. Nothing that is said here is “hard and fast” but there are styles that can be defined, for us, if we were to be “asked” to explain it … thanks for asking. Features of this style, which we think “feels” …

  • interpretive
  • “onions of the 4th dimension”

… in that we think more in a “functional” style rather than an “OOP” (Object Oriented Programming) style, and we think in a “substitutional” (hence, “interpretive”) way rather than a “everything defined in a blueprint, before you start” way for our smaller projects, certainly. Drilling down, we like …

  • we organize user interactivity via HTML and Javascript “event” functionality
  • data that is like a “blob” is stored in a string variable and if it has a “delimiter” …
  • we like using arrays (rarely structures, and rarely with tree like hierarchies, though we are happy to have hierarchy with the organization of any server side database or data source, and query this with SQL) …
  • using Javascript split (and PHP explode method) to convert a string, and use “delimit” systems to convert into arrays (often this is the basis for the core of the whole web application’s architecture and planning)
  • we don’t mind global variables
  • really like Javascript’s replace method (and PHP’s str_replace method)
  • really like concepts like “prefix” and “suffix” and “+” concatenation to, respectively, prepend and append string data to other string data
  • lots of if (and else if and else) scenarios
  • for (i=0; i<ourarray.length; i++) { }
  • while ([condition]) { … i++; }
  • in the spirit of “onions of the 4th dimension” we often replace individual words with HTML select “dropdown” elements as a project becomes more complex, and we do like to use Javascript , and processed via lots of Javascript eval() methodologies to help out with hierarchical data, in particular
  • sometimes a textarea would replace an HTML input type=”text” as an example of approaches to projects becoming more complex
  • sometimes an array would replace a variable as projects become more complex
  • genericity (and portability) is important to us and its expression takes the form of …
    1. Javascript function will replace repeated Javascript code (and PHP function will replace repeated PHP code)
    2. external Javascript will replace repeated Javascript functions
    3. PHP (in HTML iframe elements) or Ajax (and its teaming with jQuery) replaces places in the code needing to access data from server files and/or databases
    4. rarely, in PHP, require[_once] or include[_once] replaces repeated PHP functions
    5. if there is no need for server side participation we try not to involve it (ie. PHP)

When a big project is undertaken, we are much more likely to consider “structures” and an “OOP” style of proceeding … it depends. We think a “modular” style of organization is crucial with larger projects, but can be overkill for smaller projects.

We like to write in …

  • HTML (client side)
  • Javascript (occasionally using jQuery or YUI libraries, and sometimes Ajax) (client side)
  • PHP (server side)
  • MySql (database)

Of course, there are many great “systems” facilitating the organization of programming tasks, out there in the world. Think MVC (Model/View/Controller) as one idea. No doubt all these “systems” have merit, and an ideal one for you could be a mix of lots.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Software, Tutorials and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>