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

Android Development Training – Building Your First App

Understand basic XML compontents of Android user interface

– AndroidManifest.xml – I think this is the first xml to run before the main_layout.xml files
– fragment_main.xml – main view layout, viewgroup that holds views
– strings.xml – xml document that holds layout string object
– R.id.something something – resource file that holds references to your apps resource object.

Is the viewgroup container that holds the elements you see on screen ie; buttons, text fields?

Yes the viewgroup is a container that holds the elements you see on screen like buttons and text fields. It appears that these elements are referred to as views.

initial ultimate goal – create a button that calls a java resourse.

After having no luck opening my app in the AVD (android virtual device) and on my tablet I decided to start from scratch. The app would install but would not open automatically nor display an icon anywhere in the launcher. I decided to go into the android SDK manager and install Android 4.4.2 API 19 Kitkat SDK rather than 4.4W (wear stupid) or L 20 api preview.

This time I created a new project and chose activity and fragment rather than blank activity. The tutorials directed me to choose blank activity however not fragment_main.xml was included when creating the project.

It appears that eclipse and Android need to be properly updated to fix the lack of frangment_main.xml and activity_main.xml

I tried with the windows version and got the same result. I think I will just have to accept the fact that I will be creating my own fragment and main xml layouts

After speaking with a developer at Bitter, I decided it best I downloaded the Android studio. He suggested that the tutorial written online are already geared for the new Android Studio. I did the initial tutorial and I was able to get the app running on my tablet and virtual device.

Saturday August 08 2015.

Activities are the java component of an android app. The XML layout could be considered the swing aspect of the application. Viewgroups can be considered the containers and views can be considered the components. Like swing, the view or component has to call the activity.

Q: Where do we define the activity or in other words; how do we point to the java file that we are going to use?

A: The newActivity.java is declared in the AndroidManifest.xml as an <activity> element within the <application> element

Q: How do we activate the new Activity?

A: android:onClick=”sendMessage”/> call the sendMessage() method in the MainActivity.java file.

Q: How does it know to call the sendMessage() method in the MainActivity.java?

A: I’m guessing because MainActivity is set as the context in the LinearLayout element at the line tools:context=”com.example.firstproject.MainActivity”

 

Posted in Uncategorized | Leave a comment