SQLite3 with Xampp – Quick start

  1. Open command Shell through Xampp
  2. Navigate to directory your working Xampp directory ie C:\Xampp\htdocs
  3. type sqlite3 to start Sqlite command prompt with temporary database or type sqlite3 file.db to open command prompt with an existing database file.

Quick Commands

  • .exit – exits current database
  • .schema – shows database schema (tables)

Source – https://www.sqlite.org/cli.html

Posted in Uncategorized | Leave a comment

The New Boston Ajax Tutorials 1-11

I thought I would take a look at learning Ajax, I’m still not completely sure what specifically defines a program to be Ajax aside from communicating and live updating client side and server side.

What did I learn from the first 11 tutorials?

index.html – When loading the web page automatically load the js in the head and call the method in the body that is used to communicate with the server running php. Add the ui elements to collect input with appropriate ids.

establish communication with server via js – 3 steps.

  1. Create xmlHttp object for communication – this is either an ActiveX object with IE or XMLHttpRequest() with chrome or firefox
  2. Create the process method that uses the xmlHttp object to communicate with the server
  3. Handle the server response depending on the xmlHttp readystate

I ran into a few bugs.

I’m not familiar with XML, I need to understand the response tags better.

When defining the xml version in near the top of foodstore.php there was a space in the string between UTF and -8 that was giving me a parsing error.

My page was not updating automatically, it required a page reload to register any change. Turns out this was caused by a bug in my php code within my xml response tags. The code was obviously hitting a wall but I was not getting an error, perhaps I can kick back events or exceptions.

Posted in Uncategorized | Leave a comment

Agile Framework – Scrum Methodology (Framework)

Tuesday February 23, 2016.

Last night at school I was kinda hit by a thought. By thinking that I should learn PHP before I even begin a project is like keeping myself in a silo. All I need to do is learn the stuff I need from PHP then move on. I would just be wasting time learning useless stuff.

So if I want to write a blog engine what do I need.

User Story: As a developer I want to write a blog engine so I can document my development.

Acceptance criteria:

  • New post button
  • Title field -done 5 min
  • Body text field – done – 5 min
  • Submit Button – done – 5 min

As a developer I want to write a blog engine so I can learn web development.

Acceptance criteria:

  • Must run on server – runs on local host
  • Use database to store posts
    • learn how to connect to database PHP – done – 5 min
    • add entries to database through a web form – done – 45 min
    • retrieve and format entries to be viewed on page
  • Model, view, controller. Model:database, View:HTML and CSS, Controller: PHP

So I imagine the first thing that should happen is the page loads then php goes to the data base to retrieve what should be the first posts on the front page of the blog. All the menus will be lists in the database. For example the sidebar navigation links for learningPHP will be loaded into whatever page is part of theĀ  learningPHP category

Wednesday February 24, 2016.

Yesterday went pretty well.

Today I want better adhearance to the methodology.

  • What are my user stories?
  • Can they be broken down into fine grain user stories?
  • Assign story points to each story.
  • What are the tasks for each user story?
  • Give each task a time value.

User Story: As a developer I want to write a blog engine so I can document my development.

  • As a user I want to create a new post so I can log my work
    • New post button – This is gone
    • Title field -done
    • Body text field – done
    • Submit Button – done
    • Fields required to post available at the bottom of the page.
  • As a users I want me posts to be formatted and presented on the page so they can be easily viewed.
    • retrieve post from data base – done – 10 min
    • program php to generate html body – this needs to be broken down into a finer grain story.
      • learn database data types, length, date
      • database title field must accommodate type and length <h2>
      • database body field must accommodate type and lenght <p>
      • add category field <h3>
        • category field must accommodate type and length
      • add date field

As a developer I want to generate an ERD model of my database so I can begin planning how to program it.

What do I really want? I want to be using the new database method already.

Thursday February 25, 2016.

As a developer I want to diagram out my system so I can get a better scope of the whole project.

Friday February 25, 2016.

As a developer I want to diagram out my system so I can get a better scope of the whole project.

  • ERD diagram of the database model – done 20 min
  • Class diagram of the PHP controller – 20 min
  • Prototype of the HTML CSS
    • title
    • side nav
    • top nav

Same as yesterday because I didn’t do it. OK. Quick brain dump. What do I need to do to make this happen? I’m going to go with the MVC approach. I think I need to learn a bit more PHP. Maybe a temporary add category button. The table should only hold unique instances of categories.

As a user I want to create new categories so I can organize my blog posts.

  • create category button
  • home button
  • create category page
  • CRUD category

Sunday February 28, 2016 – Diagram user Stories

As a developer I want to create a class diagram of how the PHP controller is going to work so I can understand the controller requirements.

  • diagram must include utility class objects
    • CRUD class
  • diagram must include data class objects – consider inheritance and polymorphism
    • post class
    • comment class
    • user class
    • category class
    • tag class

As a developer I want to create a

 

 

Posted in Uncategorized | Leave a comment