Web Programming Languages

Status Summary

Status SummaryStatus DetailsRawbw PortingDONE

  • NEW: Go language. Done: Table, Images, Fread, Fwrite, Source. Next: Fedit.
  • Go: Db access, common, links.
  • Database: Ruby, Java
  • Upload to rawbw and see how much of it runs there. Then Mission, Ohlone.
  • Mission installation is messed up.
    • PHP works only if I delete the .htaccess file.
    • Perl, Python, and Ruby do not work due to lack of CGI support.
    • C++, C#, and Java do not work due to lack of compiler support.
    • Ajax etc. work only partially.
  • Install Ruby MySQL (Laptop), Java MySQL (both)
  • There are index.html files in each directory, but also index.foo files: php, python, perl, ruby.
  • Does not show up well on phone - the * bumps to the next line, and the content div bumps down
  • Use web fonts for titles and headings
  • Menu buttons should be bigger/taller on phone

Status Details

Status SummaryStatus DetailsRawbw PortingDONE

To do:

  • Put passwords etc. in a separate directory (only neccessary if posting to Github)
  • Upload to rawbw and see how much of it runs there.
    • Upload to Mission College server
    • Upload to Ohlone College server

Database

  • Laptop: FAILED Install Ruby MySQL
  • Both: Install Java MySQL Connector

Low Priority / Later:

  • Put server status on all DB pages if possible
  • Put credentials in a separate non-accessible file.
  • It might be possible to put all the JSON and XML handlers in one big handler and execute different code based on the "response" field.
  • Sidebars could all be done in JavaScript instead of foo language.
  • Source code page could omit the sidebars for greater visibility
  • Delete individual entries from the MySQL database? Maybe not.
  • Delete individual entries from the data file? Maybe not.
  • Allow login, sessions, cookies? Shopping?
  • It may be possible to do Groovy with CGI files like we use for Java
  • TRIED Make buttons bigger on mobile. Responsive? Menus?
  • More extensive explanations of everything
  • IDEA Database search
  • IDEA Groovy
  • Try creating a mimic mysqli class - not exactly, but an abstraction that lets us use both underneath. There are only 4 different functions, 2 on DBH, and 2 on QRESULT:
    • mysql_query() vs dbh->query()
    • mysql_num_rows vs. qresult->num_rows()
    • mysql_fetch_assoc vs. $qresult->fetch_assoc()
    • mysql_error() vs. dbh->error()

Keep in mind:

  • C++ and C# database files need to be compiled with SQL option: makp-sql or makd-sql
  • Validation: latitude (number), longitude (number), state (length)

Porting to Mixed-up.com status

Status SummaryStatus DetailsRawbw PortingDONE

Language Problems
PHP * [FIXED] Does not allow array shortcut syntax []
* [FIXED] Does not have mysqli installed. Replaced with mysql equivalents.
* [FIXED] ASCII table uses JSON and is not a complete page.
Perl
DONE
(worked fine)
Python * [FIXED] Version 2.5.2 does not support {} string formatting
* [FIXED] File write crashes on submit.>
* [FIXED] To fix: table, images, file*, source.
* [FIXED] Change path from /usr/bin/python to /usr/local/bin/python (acutally used evn)
* The MySQLdb module is not installed.
* Database read crashed on load.
* Database write crashes on load.
Ruby * Not installed.
* [FIXED] Need to put an error message on all those pages.
* All pages crash on load.
JavaScript
DONE
(worked fine)
Ajax Same problems as PHP :
* [FIXED] Does not allow array shortcut syntax []
* [FIXED] Does not have mysqli installed. Replaced with mysql equivalents.
* [FIXED] ASCII table uses JSON and is not a complete page.
C++
DONE
* [FIXED] All binaries need to be re-compiled.
* [FIXED] string.stoi does not exist. Use atoi(string.c_str())
* [FIXED] string.stof does not exist. Use atof(string.c_str())
* [FIXED] fstream.open(string) does not exist. Use fstream.open(string.c_str())
* [FIXED] std::begin() and std::end() are part of C++11. No replacement. Need to sort by hand.
* [FIXED] File write does not work.
Java
DONE
* [FIXED] All binaries need to be re-compiled.
* [FIXED] Directory listings are out of order. Use manual sort.
Other [FIXED] Change all .pl, .py, .rb, and .cgi to executable
[FIXED] Change all connection routines and passwords.
[FIXED] Had to initialize the database.
[FIXED] .htaccess files needed to remove Options statements
[FIXED] Home page has extra headers and changed margins.

Done:

Status SummaryStatus DetailsRawbw PortingDONE

  • PHP (all)
  • Perl except database access
  • Python (all)
  • Ruby (all)
  • JavaScript (all)
  • C++ except database access
  • Add a blank source code button, link, screen.
  • Add source code for the file and SQL data. Put the SQL stuff in the DATA folder.
  • Add useful links to some pages.
  • Add comment lines to show where the "meat" of the code is.
  • Change Perl and PHP source files to arrays (like Python).
  • Change "phpform" to something more suitable throughout
  • JavaScript SQLite access is written but not tested. I have new sample code to work with.
  • Pre-populate the HTML5 local storage (and SQLite) with canned data if the storage area doesn't already exist.
  • JavaScript allows adding empty entries. Fix that.
  • JavaScript should have sample data for local storage too.
  • C++ needs escaping: + to space, %2B to +, etc. I put a sample function at the bottom of the fwrite.cpp file.
  • Change google maps zoom from 10z to 12z
  • Change squiggles ~ to dashes.
  • DONE for PHP, C++, Perl, Python, Ruby. Use includes in every langauge for boilerplate HTML.
  • Laptop:
    • DONE Install Python MySQL
    • DONE Create database tables
    • DONE Re-compile c++ if necessary
  • Create a master "make" file for the C++
  • Content div should be written entirely in headers/footers (move closing tag to footers) or entirely in the main code (move opening tag to the main section). Ruby = ok. Python = ok. Perl = ok. JS = ok. PHP = ok. Only C++ is affected, I guess.
  • Insert an author block in every file (101 files)
  • STARTED New operation: edit (from listing page).
    • DONE FOR PHP file and database
    • DONE for PERL file
    • DONE for Python file and database
    • RUBY
    • JavaScript DB (file is done)
    • C++ is started.
      - Need to loop through input file and write lines to output file.
      - Need to provide old-new feedback.
  • Consolidate CSS into one master file. DBWRITE.TABLE. DBREAD. SOURCE.
  • Favicon - cannot be SVG format, convert to PNG
  • STARTED Change gray button colors
  • QUICK Give credit for the "stone" images
  • Twelves: Jewels, Days of Christmas, Zodiac, Original icons (NO)
  • Move stones and other images into the images directory
  • Move service directory to the top level
  • VALIDATION
    • DONE: PHP, JavaScript, Python, Ruby, Ajax
    • NOT YET: Perl, C++, Java (not built yet)
    • MySQL will silently error out if data is not correct
    • I don't indicate whether or not the MySQL query succeeded
    • YES State form field takes only 2 letters
    • YES Force truncate
    • YES Hint/Placeholder
    • YES Latitude and Longitude must be numbers
  • STARTED for Python Icons for articles
  • QUICK When changing colors, change the order of the languages to put JS and Ajax together.
  • Change the languages to just 2 colors, like the functions.
    • Home is color 1
    • PHP, Perl, Python, and Ruby are color 2
    • JavaScript and Ajax are color 1
    • C++ (and Java) are color 2
  • Change the color scheme for the forms. Each should match its table.
    • DONE Dynamic table = lime
    • File read = teal
    • File write = File edit = red
    • Database read = orange
    • Database write = green
    • Database edit = purple
  • STARTED ASCII table in PHP .. Ajax. Not yet in C++, Java.
  • DUPLICATE Or a different table: ASCII: man ascii and re-format the results
  • Change the number of rows in the multiplication table.
  • Some page titles are incorrect. DBWrite says file write. etc.
  • The More page can get links to Ajax and Java now.
  • QUICK The More page can get links to Ajax and Java now.
  • QUICK Some source code links at the bottom of the page are incorrect.
  • STARTED Some source code links at the bottom of the page are incorrect. OK: PHP, Perl, Python, Ruby, Ajax. JS not used. NOT: Ruby.
  • Make stubs for the non-working modules: DONE Perl DB, C++ DB, NOT YET Java DB
  • Change the directory from which images are read. Similar to what we did for 2x tables.
  • STARTED Added comics. Switch between stone, birth, comics, logos, embroidery.
    DONE for PHP, Perl. Python. Ruby. JavaScript. Ajax. C++.
    TO DO: Java.
  • STATES sort, done in PHP, Perl , Python, Ruby, JavaScript. Ajax. C++.
    TODO: Java.
  • STARTED Whereami does not work for Ajax or home page ... try on server instead
  • STARTED Change the Python formatting to an older way
  • Python directory reads are also not alphabetical.
  • STARTED Common Sidebar for consistency. DONE for Perl, Python, Ruby, JavaScript, C++, Java.
    TODO: PHP, Ajax, JSON.
  • STARTED Table page has redundant menu at the top.
    DONE All except PHP, Webservices.
  • STARTED Create a separate JSON project distinct from Ajax, including its own webservice
    • DONE: Table, Images, Fread, Fedit/x, Fwrite/x, Source, DBread, Dbedit/x. [11]
    • TO DO: DBwrite, DbWritex. [2]
    • TEST: Table, Images, Fread, Dbread, Source.
  • STARTED Single-page application, Ajax
    • Put non-dynamic information (h2, links) in the initial JS file.
    • OR put the tables and forms in the HTML file, and just get the data from Ajax.
  • SPA modifications to reduce data. TRIED for ASCII table.
  • Put the sidebar in a common file for use by all
  • QUICK Copper color: use the new pencil icon on all sites
  • Add the mysqli/mysql switches to Ajax and JSON.
  • Change favicon to orange and teal only
  • XML version. Backend done: all. Front end done: Table. Images, Fread. DBread. Fedit*. DBEdit*.
    TO DO: Front end: Source, *write*, Menu button.
  • Ajax, JSON, XML still have some DB queries with mysqli only. Dbedtix. look for dbh
  • Some URLs that have both dot and hash do not work with whereami.
  • STARTED Try a different sidebar formatting
  • Some location clauses are incorrect, should have ../xml or etc.
  • Perl database access does not work on home computer, not even written yet. Maybe try uploading to mixed-up and try there.
  • STARTED Show where we are - not working for Ajax, home page
    • Need to split up top section from bottom
    • If none match, then choose the top one
    • Ajax just keeps adding stars
  • Laptop: Install Perl MySQL, C++ MySQL
  • Laptop: Try installing Perl MySQL
  • C++ database access: use test.cpp as an example, and publish the revised make file. dbread is done. Still need to do dbwrite and add dbedit.
  • C++ fedit and dbedit show the feedback form even on query only.
  • Clean up unused files - mostly done, but check the sidebar files
  • Post a single version of the Ruby index page that works on both home computer and rawbw by detecting which server we're on. (Probably written in PHP, but maybe it could be done in JavaScript with a raw index.html file.)
  • TRIED Don't do Python DB calls on Mixed-up.com. Check if they are available first.
  • The images.* files now pick up the Dreamweaver _notes file. PHP, Ajax.
    Python, Perl, Ruby, C++, Java done. JS no action needed.
  • STARTED It is possible to do C# with the Mono compiler and virtual machine
    • DONE: Table, File Read, File Write, Source, Images, DB read, db write
    • To DO: File Edit, DB edit (3)
  • STARTED Clean up the code and add comments
  • DONE: ajax, data, cpp, java, js, json, xml, perl, php, python, ruby
  • TO DO: webservices x 3.
  • Ruby, Python, Perl and PHP code could be broken up into functions and add more comments. DONE: PHP, Perl, Python.
  • Perl database write does not check for bad state, longitude, latitude.
  • STARTED Sidebar and indexes
    • DONE Eventually everything should be in ./sidebar.html and scripts/sidebar.js, no other places.
    • DONE Ajax/index.html has a sidebar; so does JSON and XML. But there is a sidebar.php file in each of those directories, which can get read as a JS file. (see js directory)
    • DONE Sidebars for the top level pages are different because they refer to the activities page.
    • DONE Sidebar for the activity page could merge fread/fedit, dbread/dbedit, and add source.
    • DONE HTML files that have a sidebar that could be included by JS:
      • DONE? activities.html
      • DONE? status.html
      • DONE? ajax/index.html
      • DONE? json/index.html
      • DONE? xml/index.html
      • DONE? cpp/index.html
      • DONE? csharp/index.html
      • DONE? java/index.html
      • DONE? groovy/index.html
      • DONE? ruby/index.html
    • DONE? HTML files that use sidebar.php to get a JS file. These need to be converted.
      • js/dbedit.html
      • js/dbread.html
      • js/dbwrite.html
      • js/fedit.html
      • js/fread.html
      • js/fwrite.html
      • js/images.html
      • js/index.html
      • js/source.php
      • js/table.html
  • Ajax calls to EDIT and WRITE should use POST
    • DONE Ajax, JSON, XML
    • TO DO Clean up old commented out code
  • STARTED Ajax calls to EDIT and WRITE should use POST
  • Admin console

    Admin console

    • Main operations:
      • CAN'T Start the MySQL database server if it is not running?
      • DONE Restore the MySQL database to defaults
      • DONE Restore the data file to defaults
    • DONE Admin option to initialize the file and MySQL data to defaults
  • STARTED Page width could increase from 800px to 900px
  • Let me know if the MySQL database server is not running?
  • STARTED New operation: edit (from listing page).
    • Pencil brings up a new form populated with the current data.
    • All-in-one form handles its own submit.
    • Show source for the new fedit and dbedit files
  • Disallow file write (and database write) if there is no data in the form. Done for PHP, Perl, Python, Ruby, JavaScript.
    FIXED C++ and C# draw the feedback on file write.
    FIXED Java crashes on file write. Line 75. Out of bounds 6.
    FIXED Java file read crashes if there is an empty line ||||. Line 47. Out of bounds 0.
    FIXED C++ database read does not work? had rawbw credentials.
    NO? OK now? C# database write crashes.
    FIXED? C++ database write does not work - make sure to compile with SQL script
    FIXED Java fread Fixed, but will not print empty lines at all.
  • STARTED Make generic MySQL connect code that detects server and uses the proper password
    DONE: PHP, Perl, Python, Ruby, Ajax, JSON, XML, C++, C#.
    NO: Java does not have DB functionality
    TO DO: Test all write and edit. DONE: PHP, PErl, Python, Ruby, Ajax+J+X. TO DO: C++, C#.

NO:

  • New operation: delete (from listing page).
  • NO Maybe have a delete option also, on the form, not separate.
  • NO For delete, think about whether to mark it or trash it.
  • MAYBE NOT Provide an admin console to erase the file, edit the file, drop the table, delete entries.
  • JavaScript must re-write the HTML5 local storage with changed line numbers when deleting an entry.
  • Link from images to a larger version.
  • Angular