CSCI321 - Project Diary

Thursday, September 28

css + sprocs + journey trips + tradeshow

I've been fine tuning the css and the layouts of the controls.

feature-wise several sproc's [stored procedures] have been added, for both Shawn's usage and myself.

most of all it's been work on the journey separator, in order to subdivide a date range into separate trips.

in order for this to occur, i've had to learn the nuances of javascript and asp.net as well as more ajax has been used to clean up 'haha' some of the ugly refreshes, such as on tree-view postbacks.

for the tradeshow, and some of the documentation, Andrew has taken upon himself to get the project website up to date and re-design some of it, the promise was made 4 weeks ago, without a site to be seen as yet.

the brochures and business cards have been late in getting to press, as they were initially proposed to be complete by Saturday, now being Thursday morning - and after several changes - they're still not complete.

other work and feature additions that could utilize Andrew are being left undone.

Sunday, September 24

Multiple Unit Display

Well, after a few night coding I have got the php side of map.php accepting multiple devices as args, I am now able to pass this into the javaScript so I could display multiple devices at once. But, there seems to be a timing issue on the javaScript side of things when running the getLastPoint.php, I am only getting one device added, but if I add in a alert(DeviceName) to see if both device's are passed in (they are) I get both device's displayed...

So, I need to look at either making the getLastPoint.php quicker, adding a "sleep" or some other way to get multiple devices displaying.

Shawn

Monday, September 18

its here!

no, not the end of the world. Although the amount of assignments piling up, one could be forgiven for thinking so.

Our very own [for a limited time] WebTrac GC-101. Supplied by AstroTek [there - a plug].

as soon as put the settings into the device, the server added the device to the list, and i was able to track it's position. flawless :)

am quite happy with the ease with which it works. it's a little reward for me, given the intial design to accomodate this little unit - if we were to ever receive it.

Thursday, September 14

(sprocs + PHP) + triggers + (css)

started off the day with more work on css of the website. although i see its power, i dont know that i enjoy its unpredictability.

i got out some of the things i wanted, and they work perfectly under FF - and aren't visible under IE - the layout is the same, and after accomodating for some bugs - the look is very consistent. Although transparency and a few other little quirks don't show up properly under IE.


then i set out and made two examples of mssql usage for shawn - one showing multi argumented stored procedure usage, and another simple query dumps.

i couldn't get it to output xml which is directly being rendered within sql server, will have to talk to shawn about that one tomorrow.

i then did some research into triggers under mssql - i have coded one to detect speeding. i also have a function which sends out email upon request, although have been having assemblies problem within CLR and sending mail directly from SQL server. So that's one thing I have to work out. Once that is done - there's a working reminder of a devices [over]speed.

since this will be a per-device settings - i'll have to work out a way to do the 'check' of profiles more efficiently - as it is an absolute overkill to check every device whenever a point is inserted.

perhaps a simple indexed view (regenerated upon a deviceProfile update) which can be any matching devices who wish to be 'watched' whenever they're speeding - then marry this up with contact details - and send the email away. actually sounds like a good idea - and what i'll probably end up doing.

maybe just for feature sake - add a default speed limit to each device at 110 - and have the user vary it from there.

Wednesday, September 13

(PHP + mssql) + CSS

since it isn't possible to go down the path of ODBC with multi-argument stored procedures, it puts the breaks on multi-db support.

the problem with odbc is that it supports very simple data interaction, with many limitations.

in order to overcome this - mssql php library is the only way to go.

today i've hacked some code together for shawn to hook up multi argumented sprocs and the mssql db that we have.

The original plan was to use ODBC as the abstraction layer in order to support multiple db's.

At the moment there's nothing on the market which will allow us to use more than one database from both ASP.NET and PHP.

One way around this is to write a layer for each db that will be used, and then invoke the functionality, although unfortunately with the amount of work still to be done, and time lost at the beginning of the semester - this simply isn't feasible.



Past two day's I've been playing with more and more css - i hate it more with every hour. Perhaps it's just IE, that I hate more though.

Monday, September 11

php odbc and MSSQL

Well

After many days of trial and error, I have come to the conclusion that it is near impossible to call a stored procedure with multiple args using odbc from php :-(

I am going to try and re-implement some of my php code using mssql and see how this goes.

Shawn

CSS + iTrac + Membership

this weekend worked on the look of the portal - as it looked like a dogs breakfast.

so i had to learn some css - which i now hate.

also i re-structured the navigation in order to make it more intuative, and have implemented it all via site-maps to make it more dynamic

found several bugs with the Membership Provider, and lodged those with Andrew.

i had good success with getting ATLAS [Microsofts implementation of AJAX] working through ISA server, which before wasn't.

Also fixed the problem with the php not working in all directories of the website.

Thursday, September 7

##Tables + Views

last few hours i've been working on researching and creating temporary tables.

these will be generated when a user requests a map. they will contain all the point information in xml.

Shawn will then read through this, and display accordingly.

We decided this was the best method of preparing data - as making the webserver an equivalent thick client - was a excessive in terms of performance and delay of generating the initial map.

so far i've looked at temp tables in sql server.

i have installed mysql, and have commenced re-creating some of the stored procedures.

if all goes well - then both databases should be quite interchangeable.

i haven't gone for oracle due to it's many quirks in administration out of the box. So for now - i'll stick to the mysql and mssql combo.

Jargo

went for a drive today, and noticed that in some instances - if the server doesn't reply - then Jargo sits there waiting for one.

i started to investage of a way to a timeout for the connection, and unfortunately j2me blocks as soon as any IO is done, thus am unable to restart the connection.

the only way around it is to go down to network level and play with it there.

as a work around - i have put a Timer in, and run the sending of points within. When timeout occurs, it 'requests' from the phone to end the connection - and that's the best j2me can do with HTTPCONNECT.

will test it out tomorrow on my second drive to mittagong

Monday, September 4

another nice weekend

i have added the ability to jargo to save settings.

there's now a formal panel whereby users can choose if they:

- want the gps to automatically connect
- want the the sending of co-ordinates to be automatic [given above succeeds]
- interval at which co-ordinates are sent

i also now provide the user with a friendly name of their gps unit

----

the the coveted sending of UUID to the phone - DONE. this has taken me the most.

as i had to extend Jargo and the submit page of the web server.

the workflow is now as follows - the user when adding a device, generates a 'ticket' - which is a word from a list of 14000 that i borrowed from the *nix dictionary file (anything that isn't alpha has been ripped out, as well as anything below 4 characters and longer than 8).

after a user generates this Ticket - it is put away together with a UUID generated for the users device into a table in the db.

this word the user can then enter into Jargo's settings - which proceeds to contact the server and receives the UUID.

This saves the user from entering 30 odd characters which are a combination of hyphens, letters and numbers - nothing worse for a mobile phone user.

---

i then provided a page for users of pda's and laptops - or anyone who has direct access and is able to with ease enter the uuid generated.


----


the following procedures were added tonight:

generateUUIDTicket - used by webserver to get the words

addUUIDTicket - used by webserver to append new tickets/uuid's

----

Database interoperability.

Daniel wants for us to implement the ability to switch between backends. All fine and dandy - but due to our database being 5 weeks late, and everything unraveling very nicely - feature additions like this are hard to come by/achieve in the timeframe given.

nevertheless - i started building a uniform data provider for the portal, which allows each storedProcedure call to go through it.

here I can then control which database is being used, and what is the associated syntax.

for example - all parameters i am loading into a hashtable which i process before execution and depending on the database put in the appropriate tags - such as "@" for MSSQL.

the next step is to install Oracle DB - to give it a go, and I will hopefully finish moving all the controls ' databinding and data calls to this new data layer.

Friday, September 1

map with new GIcons based on Speed

Well

On Wednesday night I said I would look at getting different GIcon's working based on different speeds...DONE.

I have only defined 2 new GIcon's at present, if you are going less then 80km/hr then you get a Green one, otherwise you get a red one (there might be a small bug, as 0 km/hr gets red too). We need to define some speed ranges, or allow the user to define them. I am thinking of just hardwiring it at present...maybe something like this
  • 0->40 = White
  • 40->60 = Green
  • 60->80 = Blue
  • 80->90 = Yellow
  • 90->110 =Orange
  • 110->120 = Red
  • 120->= Black
Anyway, off to get some sleep.

Shawn