Welcome
Thursday, November 27, 2008
YAY
My presentation went really well, lots of people turned up!!!
So yeah... holidays now.
Thanks for reading!!!
Monday, November 10, 2008
FINSHED!!!
Though presentation isnt something to be looked forward to. Oh well, it has been a good journey, long and prosperous. Hopefully i shall get a good result, this will be posted as soon as i know! ^^
Friday, October 10, 2008
10/10 Finished Report!
End parts taken out of report:
10/10 Where to from Here
1 Where to From Here
1.1 Application Improvements
1.1.1 Interface
Because the system is only a proof on concept and there were time constraints, there are many improvements that could be made to the application. Grid views were used with one basic data source, this results in a basic data set such as a job record showing only the user id instead of the user name. A better way of doing this would have been to manually loop through and display all of the records with the data needed into a table.
The design and look of the interface was done in a hurry and could have been improved, however this was not part of the core functionality so very little time was spent on this. If more time was given this could have been re-visited and improved, or more time could be spent on other ideas.
1.1.2 Mapping
The mapping works by marking jobs in this design, if the user just wanted to map out only client locations instead of jobs, they cannot do this. Another page could be added just for mapping out clients.
Routing in the proof of concept only shows the street name and the directions (shown in Figure 7.1.1). This is because only the basic function of getting a route is used. It is possible customize the format of the data by looping through the returned route and displaying it. This would allow the job information to be shown under each stop as well as displaying the actual street number.
1.1.3 Searching
The searching of records was one of the original features of the system. By the end of implementation there wasn’t enough time to implement the searching, and a line needed to be drawn for the end of the implementation milestone. Searching was low on the list of important features for functionality. If more time was spent on this application the searching features would be added as it is something that increases the ease of use immensely.
1.2.1 Sorting of Clients and Jobs
The algorithm programmed for sorting the clients (the whole process is explained in section 6.2) is not the most efficient or reliable way of completing the sorting of clients. This is mainly because of the lack of experience on the author’s behalf as well as time constraints not allowing the re-assessment of how the process works. If this were to be improved there would be performance benefits as well as the mapping being more reliable.
Because the mapping is done by using straight line distances it is not very accurate, however the other option was to use Google maps which wasn’t very good for performance and resources. If there was a way of calculating the driving distance quicker and more efficient than using Google, the routing would be more precise.
1.2.2 Mapping Services
At the moment the main functions online mapping services provide are basic mapping. Some of the mapping services provide different features such as 3D views of cities, round routes, small amounts of traffic reports etc. But none provide high detailed traffic reports for around the world. Ideally, for the best route, details about traffic jams, crashes, road works etc would be needed. Because the application implemented only provides mapping of jobs, not on route GPS directions, the traffic details would only be given when the route is made. In future the routes may be used with a GPS at run time so the information would need to be constantly updated.
There is much more potential with mapping services for the future such as routes could be shown in 3D in 360 degree views or the traffic information could be changed and shown minutes after a crash happens.
10/10 Conclusion
Mapping services offer many advantages for all types of mapping in an application. Using Google Maps with the job tracking system allowed the author to easily integrate mapping into the system only by using a few lines of code, without doing this the project scope would have been to large, and a much harder task. The Application Programming Interface provided by Google for mapping was straight forward and provided all of the features needed. Because the JavaScript needed for the mapping is very small it is easy to integrate Microsoft Live Search Maps or Yahoo! Maps by changing the application key and actual map code.
Because the Google Maps API has been around for a few years now there are vast amounts of documentation. This made the research, eventual implementation and problem solving much easier as most problems have been faced by another developer and posted in the forums.
Google Maps provides all of the features needed for this proof of concept application, however there is much potential for the future with better routing and run time traffic conditions, 3D mapping, faster loading times and more detailed satellite imagery.
Because the proof of concept application was implemented using the back end as a web service, there is a lot of room for future expansion on alternative devices using different platforms and languages.
With more development time the job tracking application could be vastly improved by adding a more efficient algorithm for sorting locations, giving the user more detailed routing information, adding traffic details to a route, designing a more appealing interface, showing more detailed information in the grid views and adding search features for better usability.
There are many improvements that could be made, however the main functionality is provided to make this application a proof of concept. The original goal was to provide:
“A system based on job tracking that incorporates mapping to enhance the usability and ease of finding client/job locations. Not only will the user be able to map out one client/job location, they will also be able to combine a list of jobs for the day and get back a map with the most efficient route to take which will cut down travel time.”
This goal was achieved, and the project a success. As well as the success of the implementation, the personal goals were achieved by the author. Programming skills were increased, experience was gained, management skills were improved, time management skills were improved and a new programming language was learnt.
10/10 Problems
1 Reflections on Learning (no figures shown)
All significant problems or issues will be discussed in this section. Problems and reflections are categorised by technical, personal and project management.
1.1 Technical
1.1.1 C Sharp & Programming
Because the authors programming skills were at a very low level when the project was started the C Sharp learning curve was quite high. The first step was taking what was known about a familiar language (specifically Visual Basic.NET) and learning how to do the same in C Sharp.
After the basics were known and the application started, a few problems came up with using lists, static variables and global classes. The normal lists were implemented but it was discovered that each user would be using a different set of data. The author talked to a more experienced C Sharp programmer and got answers to all of the confusing aspects of C Sharp and the problems faced. After understanding how to implement the features needed properly implementation carried on.
1.1.2 Web Service
Once the back end service structure was implemented and fake data inserted into the database it was time to create the web service methods. The adding, deleting and editing methods were easy to implemented and worked straight away. However once the author needed to pass a set of data to the interface a wall was hit. It was realised that the author was using the wrong container for storing data temporarily. A dictionary was being used, when a generic list should have been used. Once the dictionaries were changed to lists the .toArray method could be used to pass the list to the interface. The code for sending and retrieving and looping through the array is shown in section 6.1.1.
After the data was getting to the interface the author had to find a way to read the data out into the classes. After researching and getting nowhere an example of how to do this was provided by a technical supervisor of how they read the data out of the array. This was as simple as just grabbing the data from the array and creating a new instance of the wanted class and passing in each record.
1.1.3 Virtual Machine
Originally the virtual machine being used was given 10 Gigabytes space. This quickly filled up to a point where the author was trying to delete unnecessary data; however this couldn’t be done forever. Eventually when no files would save due to lack of space this issue needed to be dealt with properly. This majorly halted development as nothing could be saved and the author wanted to avoid loosing data. After researching the many ways to extend a virtual machines space it was decided to use an application provided by VMware that converts virtual machines and increases their size. So the virtual machine was copied to a new location with 5 more Gigabytes of hard drive space.
1.1.4 Logging In
At one stage logging in did not work any more. Originally the login authentication was based on active directory, but later on it was decided to use the from the internet option. This is safer to choose at this time because it is easy to create and manage users and roles without the complexity of using active directory. After changing the authentication type logging in still did not work. A long error was given, so one part was researched: "[HttpException]: Failed to start monitoring changes to C:\Inetpub\wwwroot because access is denied". After researching similar problems using the internet and trying many fixes, one for this error worked. This was by changing the IIS ASPNET settings to framework 2.0, a very simple error but an easy setting to forget.
1.1.5 JavaScript
The first mapping done was in the client address forms, which the Subgurim control was used for. Using the control made mapping very easy because the JavaScript was created dynamically behind the scenes. Once the author realised that the Subgurim control did not do the type of routing needed, an alternative way of mapping needed to be used. After asking around, and researching the internet on what other people have done with JavaScript and ASP.NET as well as Google Maps and ASP.NET, the Page.ClientScript.RegisterStartupScript method was used (more on this in section 6.2.6).
Once the method of using JavaScript was selected, the difficulty of making it run came up. At first this method was tried using a button which would trigger the JavaScript, however it still needed to be run straight after all of the other logic so that a list of latitude longitude points could be passed to Google. It was soon realised that the easiest way to run the JavaScript where it was needed was to insert the code for the registerstartupscript exactly where it needed to be inserted. So this was placed after the latitude longitude string is completed allowing the correct data to be passed to Google.
1.1.6 Job Paging
If there are enough jobs to be multiple pages it becomes a problem for checking items on multiple pages, as the state of the previous page is not kept (grid view shown in figure 8.1.1) (not shown here). Due to time constraints the easiest option was to extend the amount of records before paging started. In future however, this would be changed to keep the records selected checked.
1.1.7 Database Constraint
Deleting a client address is more complex than deleting a client or user because of the relationship between that database tables. Because the job table has a relationship with the client ID as well as the client address ID, the address ID can’t cascade delete a job when it is deleted because of an error:
“Introducing FOREIGN KEY constraint 'FK_job_clientAddress' on table 'job' may cause cycles or multiple cascade paths.”
Figure 8.1.
Due to time constraints this was not resolved, but would be fixed if the system were to move on from a proof of concept. The tables concerned are shown in Figure 8.1.2. (not shown here)
1.2 Project management
1.2.1 Travelling Salesman
The travelling salesman problem occurs when the most optimised and efficient route is needed between a very large number of locations. The algorithm needed for this calculation would become slower the larger the locations. There are a few algorithms to deal with this problem, however with current technology it is just not possible to quickly calculate on a large scale.
The author had to face the problem of how the routing was going to be done, and how efficient it was going to be. A small amount of time went into looking at this problem, however for this proof of concept a basic brute force algorithm was chosen for simplicity. This was by looping through each location and finding the nearest position until there are no locations left.
1.2.2 Task Management
Due to lack of experience in many of the fields of this project it was very hard to estimate exactly how long any particular task was going to take. It was decided to assign time limits based on how important a task was, for example the implementation stage was given the highest amount of time because of the author’s lack of confidence in programming. At some points the time given was not enough, but not far out enough to cause a panic. If a task couldn’t be completed by the milestone date a detailed summary of what still needed to be completed was put together and tackled straight away during the next milestone.
1.3 Personal
The only personal problem that majorly impacted this project was time management. This is the authors first long term project so it took some time to get used to consecutively putting time into one thing. The amount of hours needed to spend on the project per week was 30-40, which is a lot compared to the assignments previously completed. This problem was never fully resolved, however by spending time putting together time tables, task lists and recording hours spent per week or on a daily basis this skill was vastly improved.
10/10 Self Evaluation
When I put together the project proposal I had no idea what I was in for, but I did want a challenge, particularly on the programming side of things. Once the proposal was handed in and accepted the research and design begun. After designing the system and starting on some implementation, particularly programming object oriented in C Shap.NET, I realised how much of a challenge the programming was going to be. After getting some syntax help from a friend however my pace of progress picked up.
After I gained confidence in programming the project went smoothly until it was time to create the mapping algorithm. This held me up for a while, but once I found an algorithm for calculating distances and a simple bubble sort all that was left was the sorting of client locations. This in itself took a long time, as well as a lot of trouble shooting and testing.
These two main challenges have left me with much more confidence in my problem solving skills and programming skill, which is what I had hoped for.
I have never before done anything with online mapping, or using an API to integrate maps. I found this area fascinating, especially the potential of what can be done in the future with traffic information. Using a mapping service and implementing an interface with a web service backend really gave me an idea of how you can re-use code and functionality across platforms and benefit from it.
The project as a whole took much longer than planned. I believe that this is because I underestimated how long the majority of tasks would take, and how hard certain tasks would be. This was particularly true with the mapping part which ended up being much more complex than originally thought. The extra time spent ensuring that this process was as good as I could make it was worth it, and in the end works just how I want it to. I learnt that even if you make a project scope right at the beginning and make time frames for tasks a project can take much longer than planned
There are many more improvements that I would make to the system if I had a larger amount of time, but I am perfectly happy just how it is now as a proof of concept as it does what got done what I set out to do.
Sunday, September 28, 2008
28/9 Fixed Problem
Thursday, September 25, 2008
25/9 Report Writing
Was supposed to be finished implementation a while ago now, but after a meeting with supervisor showing the mapping, it was decided that more attention needed to be paid to the reliability of adding jobs to the list to map. So by next monday i would have replaced the selectedindex_changed to just looping through all records and by using a checkbox. This way all clients are added in one go. So i didnt figure out what the problem was, but going around it is quicker.
Monday, September 8, 2008
8/9 Report
So im hoping that because of the research taking so long, the rest will be quicker, mainly because i will be writing about what i did, not research. Also, just thought id mention that i have a systems development assignment due in two weeks and i havent even looked at the assignment sheet, and if we looked at it in class i cant remember. My first statistics test is in two weeks as well... so im going to be busy.
I did decide not to go to wellington though... so that gives me 4 more days to work on the report for when i want it to be finished. At this stage it looks like im behind, but that wont be easy to gauge until ive started on the design part of the report properly and can move quickly vs slow research.
Tomorow i am gonna carry on with the research part and a little of the design part of report, just so it looks like im moving forward more, have systems development in the afternoon as well.
Sunday, September 7, 2008
7/9 Implementation Summary
From now on, i will only be working on my report, tomorow i will post up what i want to complete in the next week.
Monday, September 1, 2008
1/9 Still Research
September
1 Mon
Maths 9-12. Luchtime work on maths. Maths 4-6.
2 Tue
Morning - Start on implementation - design part of report. SYD300 in afternoon.
3 Wed
Carry on with design part of report. Do little bit of implementation. Send what ive doneof report to supervisor. Work on SYD300 assignment.
4 Thu
Finish design part of report, move onto implementation part of report.
5 Fri
SYD300 in morning. Carry on with report, and meet supervisor in afternoon. Do some maths homework.
6 Sat
Maybe take the day off... :D
7 Sun
Maths and finish off bits and pieces of what ive done on report so far.
Thursday, August 28, 2008
28/8 Report Work, Finish Intro & Background
I started on the research part of the report... but didnt get as much done as i hoped, so will be chipping that over the next few days.
Wednesday, August 27, 2008
27/8 Unbound Checkboxes and Logic + Report started
foreach (GridViewRow gvrow in gvJobs.Rows)
{
System.Web.UI.WebControls.CheckBox cbUrgent = (System.Web.UI.WebControls.CheckBox)gvrow.FindControl("cbUrgent");
if (cbUrgent.Checked)
{
LOGIC HERE
}
}
Now i'm gonna add the code to validate that only a couple of boxes have been checked, and the logic to hold the clients selected and add them to the top of the route list. Well after i make coffee..
So todays overall plan is:
27 - Wed
Just work on report, write terms of reference, acknowledgements, basic contents page outline, exec summary, introduction, background.
Instead of starting SYD300 assignment two, i'm gonna start on my maths assignment, mainly because the syd assignment has been pushed out to the 19th instead of the 12th, and maths... is well hard and boring lol. So better get it out of way. I also will hopefully finish this coding swiftly.
Whilst writing the executive summary draft i thought to myself, it would be interesting to see what other people think of mapping services in general and in context to eachother. I found these interesting articles:
http://www.techcrunch.com/2006/04/17/comparing-the-mapping-services/
http://en.wikipedia.org/wiki/Comparison_of_Web_Map_Services
Sigh... so today i didnt finish the coding or all of the report or start on maths, but hey i'm getting somewhere, hopefully i'll catch up on report and start on next part tomorow as well as finish the coding i was sposed to do yesterday.
Hours: 5
Tuesday, August 26, 2008
26/8 Unbound Checkbox for Urgency
_________________________________________________________
Today i didnt quite get the urgent checkbox thing going... Was alot more complicated than i thought because gridviews like to have bound fields. So i went on a huge goose chase to find out how to make a column with unbound fields that you can check. I found one article that made it look really hard... so then i decided id do it the unefficient way and add a checkboxlist and dynamically add jobs to that, then the user can select urgent from there. Then i found out that this was just as hard!!! So i was thinking there must be an easier way!!!! So after googling a bit more i found this link:
http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic25315.aspx
- I didnt realise that you could edit templates that you add as a column. So i learnt something interesting today. Now i have a checkbox column, and have to add the logic which is:
- Testing that the user has only checked 2 jobs
When the user clicks on the MAP button i need to add in the logic for taking those client jobs out of the sorting, sort just those two, then put them at the front of the string i pass to google maps.
I want to do this now, but its getting late and my brain is fighting getting any homework done. So i'll have to put in more hours tommorow to keep up with the schedule i made today.
Hours: 6.5
26/8 New Timeline
_________________________________________________________
26 - Tue
Set Timeline, post layout I want report to be in, add urgency code into mapping page. Have SYD300 today also, so project work will be done in spare morning hours.Get SYD300 assignment2.
27 - Wed
Just work on report, write terms of reference, acknowledgements, basic contents page outline, exec summary, introduction, background. Start SYD300 assignment 2
28 - Thu
Write most of research part of report. This shouldn’t be too big. Start maths assignment. Raiding at night.
29 - Fri
SYD300 in morning. Work on maths during afternoon.
30 - Sat
Carry on with maths / finish maths.
31 - Sun
Bits and pieces on project implementation. Raiding at night.
_________________________________________________________
So this morning i have put together a timeline for between now and the start of October. I am also going to put together a basic outline of what my contents should look like in my report, and finish off some basic coding for making certain jobs urgent. OHH also, something i havent done is a proper conclusion of the implementation part two finished. So shall do that when i get time.
_________________________________________________________
Report Layout version 1.0
1 Executive Summary
2 Introduction
3 Background
4 Research
- Mapping services out there
- Yahoo
- Microsoft
- Google Maps – a further look
- C Sharp – a new language
5 Design
- Identifying Use Cases
- Designing the user interface
- Designing the Database
- Database Diagram
- Data Dictionary
- Designing the class diagrams / backend
- Client – tracking interface
- Service – tracking service
6 Implementation
- Database and stored procedures
- Back end web service
- Interface Backend
- Interface
- Masterpage
- Forms
- Mapping
- Testing
8 Future Development and improvements
9 Personal Evaluation
10 Conclusion
11 Bibliography
Friday, August 22, 2008
22/8 UML & Screenshots
What i still have to do:
Thursday, August 21, 2008
21/8 Last Official Day of Implementation
At the moment i am having a ha-ha funny problem. Ive made it so the user can have a straight line of points and end at the last point, or they can finish where they started, slightly different logic. What i'm getting on both of these is a random address at the end... on bridge street. I deleted all the records to make sure there wasnt a wrong geocode pointing to bridge street... but yeah still finishes on bridge street. Spooky, shall try figure out wtf it is.
After i fix this problem think the next best thing to do is finish some of the validation.
Ended up fixing the problem, but it was through fixing another problem... so never figured out what the 4 bridge street was. Although we later found out that 4 bridge street is just going on rent i think. So i had a problem with have a 1 instead on a 0 in one of the loops for looping through and sorting the records, so what it was doing was leaving on out. Anyways i didnt fully finished the UML diagram, and its getting late. Didnt quite achiece what i wanted today, but tomorow is another day before my meeting.
Monday, August 18, 2008
18/8 YUSSS javascript works!
YUSSS, finally got the javascript going.
_________________________________________________________
Basically what i needed to do was add the key reference in web.config (which i had).
Add code in the page_init part of the aspx.cs file for loading the key into the head part of the page, so that google knows its valid.
Add a button
Add the code behind the button either in page_init or page_load.
code: Click Here!
Think i tried to rush into understanding it too quick, so what i did today was step back and learn different parts of it, such as testing if google maps even worked in basic html on my page, which it did. Then moved on a page.clientscript.register... to see if that worked even with the most basic alert function, which it did. So i didnt see why the google stuff shouldnt work now that i knew how to use a button.
I then came accross a couple of errors from google maps which slowed me down a bit, 'gmap2' is undefined and 'object expected'. I soon figured out that this was because i had commented out the code which set up my app key, which would mean that google wouldnt allow me to have a map.
Tomorow i am going to finish off the part i was stuck at, which is passing the finished lat,lng values from my array that i create into a map.
Hours: 5.5
LINKS
http://www.thescarms.com/dotnet/clientjava2.aspx
http://aspdotnetcodebook.blogspot.com/2008/03/handling-google-maps-api-keys-with.html
http://shepherdweb.com/2006/12/08/handling-google-maps-api-keys-with-aspnet-masterpages-and-webconfig/
Sunday, August 17, 2008
15 & 17 basics
Thursday, August 14, 2008
14/8 Morrree Implementation
_________________________________________________________
14/8 Thursday
_________________________________________________________
Going to figure out the manual way of doing the mapping part. At the moment i'm having an issue with ClientScriptManager.RegisterForEventValidation. Seems to be some problem with having the map, and it doing things client side.
I found this bit of info as to what it is.
"Balance the security benefit of event validation with its performance cost Controls that derive from the System.Web.UI.WebControls and System.Web.UI.HtmlControls classes can validate that an event originated from the user interface that was rendered by the control. This helps prevent the control from responding to spoofed event notification. For example, the DetailsView control can prevent processing of a Delete call (which is not inherently supported in the control) and being manipulated into deleting data. This validation has some performance cost. You can control this behavior using the EnableEventValidation configuration element and the RegisterForEventValidation method. The cost of validation depends on the number of controls on the page, and is in the range of a few percent.
Security Note It is strongly recommended that you do not disable event validation. Before disabling event validation, you should be sure that no postback could be constructed that would have an unintended effect on your application."
http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic30477.aspx
I think its because i'm using subgurim, and with the advanced directions it uses input from the user, which i dont need at all. So i am going to skip this, because i dont need to sort it out, just need to not use the subgurim method that is causing this.
Wednesday, August 13, 2008
13/8 Implementation
13/8 Wednesday
_________________________________________________________
Still working on connecting the stuff i have done. Spent about 2 hours on monday doing it. Will carry on today. I'm hoping to get right into it and work for at least 7 hours today/tonight.
So ive finaly actualy got some exciting stuff done. Ive made all the code for calculating distances, and sorting all client locations. So basically i have a list thats point to point the best route based on straight lines. Pretty noob but the code took me a while to think about, loops within loops.
My next problem is that i only just found out that the API subgurim i'm using doesnt support multi routing.... So i'm going to have to look into custom java code for that. /sigh.
6 hours.
Wednesday, August 6, 2008
6/8 - week
My next milestone is for the 21st this month. So far what i did this week is carry on with the implementation. I have the code fort bubble sorting, holding the records, and the algorithm for calculating distances. Now i just need to combine them all and the routing should be working besides the error checking.
Wednesday, July 30, 2008
30/7 & 31/7 & 3/8 Fixing Stuff
I found a website that has c sharp code for getting the distance between two points.
http://www.codeproject.com/KB/cs/distancebetweenlocations.aspx?msg=2656897#xx2656897xx
So what i'm doing atm is going over the code ive already written for sorting the data into two arrays, and put some code into get map button just to go get the distance and see if this code actually works. The code isnt coming up with any errors so thats a start, so if it all works i'm going to compare the distance result from this to google.
______________________________________
I got the algoithm working and tested it. So it calculates a straight distance, which is obviously different from real time travel.
______________________________________
Now that ive done that part, the next thing is figuring out how to actually sort the data. I could have 5 jobs, and 2 of these jobs could be at the same client. Now, i have to base the mapping on the clients, and the clients can have many jobs. Theres no point in restricting people by jobs that they pick when its just the locations that we really need to map out.
So ive been thinking about how to do this, as this is a problem i have never faced before. ATM i am thinking of creating another class with the client and location details with a list of jobs, and having a list of this created when the user wants to map something out. I'm really gonna have to draw this on paper and realy think about it.
Also the other thing i have to do is come up with a new timeline, or mini sort of milestones to keep me on track.
Wednesday, July 23, 2008
23/7 Going Through List of Things to do
Start 9.30 a.m.
_________________________________________________________
Wow, its really hard to get back into work. Yesterday i went through my physical diary thingy and had a look at lots of things i still need to sort out. So i just want to siv through this list for a bit today, then spend some time looking at that report.
Tuesday, July 22, 2008
22/7 This week.
- Have a really good look at the project report that i have been looking at.
- Finish making the layout i want my report to be in. And what i want in each of these sections.
- Go through my notebook and grab out any questions that needed to be answered.
- Figure out exactly where i was in implementation. (I'm thinking of starting my algorithm again now i have more time and make it better).
22/7 New Timetable
Friday, July 11, 2008
11/7 Starting Again
Hours : 20-30 a week.
Time period: around 8 weeksish at this stage.
Tasks left to do:
Implementation - Finish mapping (algorithm, code commenting, more testing), do report.
The report is going to be the most time consuming part. And i will start looking into other peoples reports so i can make a start on myne along side my implementation.
Wednesday, June 11, 2008
hmmm
Thursday, June 5, 2008
5/6 ZOMG
Start 9.00 a.m.
_________________________________________________________
Hmmmm by today i was supposed to pretty much have had everything done... so much for that idea, i havent even got to figuring out the routing yet. SIGH. well back to the grind. Have project meeting at 1.30 p.m.
_________________________________________________________
Finish ?? 7 hours
_________________________________________________________
Wednesday, June 4, 2008
4/6 Stupid Lack of Space
Start 9.00 a.m.
_________________________________________________________
Basically ive spent all morning and early afternoon trying to increase my virtual machine size... funny how if we set things up initially we can save ourselves hours of wasted time when time is important. IF i get time to write about all of this i will... any ways.
After looking at many posts on how to increase the virtual machine space, i decided there must be a easier way? I came accross an application by VMware called "VMware Converter 3.0.3". This tool allows you to do many things, but mainly you can convert a virtual machine and save it in a new location as a new machine.
I downloaded the tool, but then my comp wouldnt let me install it due to a "error 1327. invalid drive H:\". I was like noooo another problem? Had already spent so long trying to figuer this out. So off to Google i went. I found this post, which said to check my registry and where some files are pointing. So i had a look at the items it told me too, and alas! something was pointing to this stupid H drive. So changed it i did.
Next i moved onto figuring out how to use this new tool. I had to download the sysprep files for server 2003 SP1 for the converter to use. I created a new "convert" and pointed it to my current virtual machine, said where to locate the new one and set the amount of space i wanted on the new machine. I changed it from 8GB to 15GB. Should be enough. So yeah.. spent 6 hours tearing my hair out over that one, no good, then spent 3 hours on my project management assignment.
_________________________________________________________
7.00 p.m.
_________________________________________________________
Carry on with my project, I have to fix my job and newJob forms and logic. I will then start on the map page which will list jobs, so i need to figure out a way for the users to select the records they want to map, shouldnt be a problem, then i'll start on the basics of getting the geocodes for those addresses and putting them into a new array that i will then pass to maybe another class? to do the logic and sorting on.
SO MUCH FOR THAT IDEA. Sigh... 13 hours of project time and i still havent started on mapping. Kinda disapointed i wasted 6 hours on one problem i didnt fully forsee as being a major problem. Anyways, i'm excausted and tired for some reason... (lol). Shall carry on in the morning before project meeting at 1.30... also need to finish couple of bits and pieces for my project management assignment due in tomorow.
_________________________________________________________
Finish 1.00 a.m. 13 hours
_________________________________________________________
Tuesday, June 3, 2008
3/6 Basic Stuff
6 hours.
Monday, June 2, 2008
2/6 Google Maps In Addresses
Start 11.00 a.m.
_________________________________________________________
Yesterday i played around with Subgurim, a tool that you can add that allows you to use ASP to code maps instead of javascript. So today i will be using that to get the geocodes of locations when a user adds an address.
http://en.googlemaps.subgurim.net/
Today i did the geocoding of addresses. At the moment it puts together all the data from the text boxes and gets the geocode from that. If the user clicks on check geocode it will show them on teh map where that location is. If they click on save they will get a warning asking if they are sure they dont want to check the geocode first. If they dont there is a possibilty that its the wrong place, and either way there might be an error.
I added in a small amount of validation on the text boxes using RequiredFieldValidators (thanks cheekymohnkey! for the suggestion vs writing checks). I havent done any error checking or validation with the geocoding yet however.
The Subgurim controles are fantastic, just like programming c sharp. Below ive added some code to show how easy it is to do all this. Basically it just passes in the address, then creates a new lat lng object which is passed into a marker, and setting the map to centre.
public void getGeocode()
{
string code = txtStreetNumber.Text + "," + txtStreetName.Text + "," + txtSuburb.Text + "," + txtCity.Text + "," + txtCity.Text + "," + txtCountry.Text;
string Key = System.Configuration.ConfigurationManager.AppSettings.Get("http://maps.google.com/maps");
GeoCode geocode = GMap.geoCodeRequest(code, Key);
GLatLng latlng = new GLatLng(geocode.Placemark.coordinates.lat, geocode.Placemark.coordinates.lng);
GMarker marker = new GMarker(latlng);
GMap1.addGMarker(marker);
GMap1.setCenter(latlng, 8);
lblGeocodeText.Text = Convert.ToString(latlng);
}
Ive now finished off the adding and editing of both management and client addresses with all the geocoding going all fine as it appears. This isnt including the error checking i havent done yet.. doo dee doo. I also made a point to load up the map to the location when users goes to edit, this way the map is showing the address, and also i wanted to learn how to split the text and turn int a double, because i'm going to have to do that very soon. One day when the copy and paste from virtual machine works i might get around to putting code in here... /sigh. For the rest of the night, now that ive met that one small milestone, i will update my UML diagram. If i manage to comer out before i finish it, i'll upload it tomorow night. I also have a little bit of renaming to do... hard to keep to your own naming conventions when your in a rush. I also understand that some of the design, as in where ive put code isnt the best, so i'll play around with some of that (providing i get time of course....).
Theres alot of things I cant portray and show in this UML, mainly because i am using some grid views and form views, so i'm not writing my own functions to do the saving deleting and updating. Some however i am. This isnt anywhere near done, but by looking at it you can see exactly what ive done on the system so far.
Saved string to geocode code
string geocode = lcManagementAddress.propertyGeocode;
string[] codePart = geocode.Split(new char[] { ',' });
string lat = codePart[0];
string lng = codePart[1];
GMap1.resetMarkers();
GLatLng latlng = new GLatLng(Convert.ToDouble(lat), Convert.ToDouble(lng));
GMarker marker = new GMarker(latlng);
GMap1.addGMarker(marker);
GMap1.setCenter(latlng, 14);
So i just grab the geocode, split it in half, assign two variable to the array values, then pass those into the GLatLng object. Then i can use this to add markers etc. Or in the case of getting routes, i can get directions, then use those directions to do calculations on which order to get the route from Google.
Tomorow i wont be doing much project work until late at night, as i have INF to do all day, then class.
_________________________________________________________
Finish 4.00 a.m. 14 hours
_________________________________________________________
http://www.csharp-station.com/HowTo/StringJoinSplit.aspx
Saturday, May 31, 2008
31/5 Project Management Really
Start 11.00 a.m. - 8 hours
_________________________________________________________
Today i am gonna dedicate most my time to getting assignment number two done for my other subject i'm taking. I might do google stuff later, i wont be writing much in blogg today cause i woke up with sroe joints, so it hurts a bit to type, dont want to make anything worse. I'll add something in perhaps later.
Spent on that all day
_________________________________________________________
Sunday 11.00 a.m. - ?? - 6 hours
_________________________________________________________
Friday, May 30, 2008
30/5 Move onto Google Maps
Start 9.00 a.m.
_________________________________________________________
Had project meeting yesterday, and i outlined a list of important tasks and prioritised them. Because i only have a week left of implementation pretty much i really need to have a priority list so i dont spend ages figuring out problems that dont matter as much as say getting the mapping to work. So heres just a quick list from most important to least important:
- Get internet working on my virtual machine
- Get the geocode finding logic done for addresses (this is important but i wont spend too much time on this, its not as important as doing the mapping of jobs, but i want to do this first so i have descent geocodes to work with)
- Figure out how to get the distance of locations from google.
- Start designing algorithm for calculating which is closest. Me and my supervisor had a talk about this yesterday, just a concern i have. Well this algorithm in general is my biggest fear besides running out of time. The main concern atm is that i will be able to write a crappy one that can calculate say a route from A to D and map B and C between it in a straight line. BUT say, if A,B,C and D are round in a circle, how do i calculate that?... If two distances are the same, which one do i chose, the one on the left, or the one on the right. Will see how this goes anyways.
- After i have an idea how this is going to work, i sometimes just need to think hard about these things and write them down, i will work in how i'm going to do prioritys, and the problems asociated with this.
- Once i have all this done i will begin to implement the algorithm.
- If number 6 goes ok.. i will move onto the passing the geocodes to google and getting back the data i need.
- Now this task is something i'll probly do at the same time as the other stuff, or just do some trouble shooting as last thing during the day. I'm having problems with deleting records from the form view, its not passing the paremeters into the class where its deleting, also editing a couple of things is having the same problem. This is probly something simple, but hey, this ASP stuff, i'm lost lol.
- The last thing of important is adding in the searching features, this might not be hard? Who would know, but certainly time consuming for a task that doesnt actually affect the working of the system. So i'm putting this last. If i some how miraculously get time spare, the most important search feature would just be searching jobs that you want to map, to make it easier for the user.
I fixed the problem i was having with my virtual machine. I got a blue screen of death and things went down hill from there yesterday, but the issue i was having and the blue screen of death arent related, my thinking is, that because the blue screen of death happened i was forced to restart the server and restart IIS. So the original error i was getting was a nasty long with with a few parts, first of all 'text/html; charset=utf-8', but expected 'text/xml' and a whole heap of crap under that, the second part to mention is "[HttpException]: Failed to start monitoring changes to C:\Inetpub\wwwroot because access is denied."
So the first thing i did was have a look at what had cause this same wierd html error the first time, which isnt something that could fix this problem. So i assumed that this was an error thrown back at you if the web service wasnt working. So i moved down to the next obvious error and where it was happening which is the http exception. I spent a long time thinking that it was a user permission problem some where along the line, and after creating numerous users on the main website directory and changing around permissions to no avail i found a handy website that mentioned changing the IIS ASPNET settings to framework 2.0. Now this actually sounded familiar.. i mean it should be set to 2.0 anyways shouldnt it? So i gave it a go AND IT WORKED. Very ametuer mistake i admit, but i havent played around with IIS in a long time haha.
So thanks Rahmat Faisal : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=177088&SiteID=1
So i think why this only happened now and after the VMBSOD (Virtual Machine Blue Screen of Death) is because IIS restarted and put in place the fact that i had changed from windows authentication mode to forms mode. So framwork version 1 may not have been able to handle this, and i was getting problems with my web.config.
So now thats working my next thing to do is figure out how to get the internet working on my VM so i can connect to Google Maps.
I'll add the above problem into Technical problems as well as more information about the deleting and editing problems i'm having. Also i was very sick yesterday and pretty much didnt sleep last night so i'll mention that as being a potention problem to the project depending on if i get better under Personal Problems.
************************************************************************
Break 10.00 a.m. - 12.00 p.m.
************************************************************************
Other Links
http://blogs.claritycon.com/blogs/satish_vemula/archive/2006/02/19/227.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q317955
http://support.microsoft.com/default.aspx?scid=kb;en-us;824308
************************************************************************
Sleep 3.00 p.m. - 5.00 p.m.
************************************************************************
Still trying to get vmware internet going, maybe its cause i'm using wireless? dont no, might move onto something else.
Ahh waste of day. I searched for a while trying to find a basic guide to setting up a vmware machine to connect to the internet through the local machine and failed miserably, then played around with it for a while myself, so i took the next step and called CheekyMohnkey up at his secret jungle hideout and asked for his opinion on how to set this up. I ended up getting the internet working on my virtual machine. I had first of all set the vmware players ethernet settings to NAT, then go into my servers LAN settings and set the IP address as automatic. At first this didnt work, but after a restart it worked fine. :D
During these moments of panicing and waiting to find the CheekyMohnkey i decided to start looking into the distance thing with Google Maps. I found an interesting website that incorporates getting distances out of the array when you pass it two locations.
http://maps.forum.nu/gm_driving_directions2.html
The reason i need to get the distances is so that i can determine which place is closer to the starting location. I can either do this by sending in two geocodes and getting the distance road wise, as in if you drove there, how far would it be, or i could use another function that throws in two geocodes and gives you the distance in a straight line.
Me and DaDude (my father who is also doing a little bit of playing around with Google Maps) talked about this issue, and DaDude mentioned that Google might actually have a function that calculates this for you :O!!!! Theres go my project lol!!! j.k anyways. So i need to find this out, well itl be one of my next steps anyways. So if google can do this for you, i will need to deside whether or not to do this, because i want to incorporate prioritys, this may not be an option. But thats something i will have to think about. Otherwise i will decide whether i want the exact distance (this will have to grab alot of data) or just grab the distance in a straight line to get a basic idea of which is closest. I am leaning towards the basic straight line.
Anyways, i was suposed to be sleeping more than 2 hours ago now :\ seeing as i'm sick i better not over do it, i'm working so slowly anyways.
_________________________________________________________
Finish 11.15 p.m. 8 hours productivish work, yesterday 10 hours productivish work
_________________________________________________________
Wednesday, May 28, 2008
28/5 Running out of time!
Start 9.00 a.m.
_________________________________________________________
Wow, some things take alot longer than you think :\ Ive spent the whole day carrying on with just making the forms link data and be able to edit. Deleting isnt working... dont no why yet /sigh.
The problem i was having yesterday was i changed the design so that the client has its own list of addresses, vs there being one large list and having to siv through that to get the address specific to one client. This was a bad design mistake in the first place, so i spent yesterday fixing the code, and re-aranging things so that address were inserted, updated and deleted through the particular client they belonged to. Sounds easy.. but the coding logic for me took a while. This is however working now. So besides figuring out why the grid views arent deleting my records i seem to be doing OK. But i will have to keep on putting in 10+ hours a day to get on top of things.
I should have already started on the Google maps, but i just need to not panic, the application has to go first. I am already thinking about leaving out the searching functionality, and if the deleting doesnt go to plan wuickly enough moving on and leaving these as last priority.
************************************************************************
Raiding 9.00 p.m. - 1.00 a.m.
************************************************************************
_________________________________________________________
Finish 3.30 a.m. 14 hours
_________________________________________________________
Tuesday, May 27, 2008
27/5 Slack The Young Padowan Is
Start 9.00 a.m.
_________________________________________________________
Thought i better blogg while my virtual machine is starting. Ive been kinda slack last couple of days if you havent noticed. I'm hoping to get most of the rest of interface basic stuff done today. At least i realised i have more time on google maps than originally thought, so dont need to completely panic yet... yet... I may eventually get time to put up a new UML diagram... probly not any time soon :\ have a project management assignment due in soon i havent even started, oops. Oh yea, just a random thought, is 45 hours - 50 hours slack? I feel guilty for having a couple of days off either way lol.
When i'm not so tired (my head hurts) i will talk about why im taking longer to do stupy interface. GOOD NIGHT!
_________________________________________________________
Finish 12.00 p.m. 12 hours
_________________________________________________________
Saturday, May 24, 2008
24/5 At Work
Start 9.30 a.m.
_________________________________________________________
Ahh, feeling super un-motivated today, had really bad little sleep last night and now i'm sitting in a cold room at work. Want to go back to bed not do homework haha. ANWAYS... i will be carrying on with interface /sigh.
2 hours.
Friday, May 23, 2008
23/5 yawn
Start 9.00 a.m.
_________________________________________________________
This morning ive just figured out how to use all the grid views etc for filling in data straight from the dictionarys, so i can list all the data and make the primary key a link to open a page of that certain record, so just doing that for all of the forms now.
_________________________________________________________
Finish 7.00 p.m. - 7 hours
_________________________________________________________
Thursday, May 22, 2008
22/5 UML, Interface & Meeting
Start 9.00 a.m.
_________________________________________________________
Heres the latest version of my UML diagram... may be some things wrong, tired and dont want to spend too much time on it at this stage, just want to portray what ive actually programmed thus far. Its starting to turn into spaghetti!!!
I have project meeting today at 1.30 p.m. Just want to get some more interface stuff done before then. I also have class at 4.00 p.m. so after project meeting i might spend that time up until 6.00 p.m. when i finish class to do some more catching up then spend all night carrying on with project.
So far this week i have sorted out the data side of things, almost, i'm not quite as far as i would have liked to be. I'm gonna blame this on wasting 5 hours doing pretty much nothing cause of problem yesterday. What i would have liked to have done by now was filling in all grid views, and editing, deleting and inserting the data from this. Maybe tonight i'll finish this off. My next job, to finish off the basics of the interface, is to sort out the editing of specific client addresses etc, but having that list below the client details.
Well good luck to me, wont update post until tonight when i get more time.
Class 4.00 p.m. 6.00 p.m. - Project Management
************************************************************************
Wednesday, May 21, 2008
21/5 Fixing Stupid Probem & Carrying on with Interface Stuff
Start 9.00 a.m.
_________________________________________________________
OK, its tea time, finally some time to blogg!!
I spent 5 hours today trying to figure out the error i got yesterday (read bottom of yesterdays post), and in the end after way too much research and asking for help from Alliyahh my sister to no avial, i tried doing this:
public void getClientList()
{Array lcArray = myService.getClientList();
Dictionary
{
serviceMain.clsClient serviceClient = item;
string clientID = serviceClient.propertyClientID;
string clientName = serviceClient.propertyName;
clsClient lcClient = new clsClient(clientID, clientName);
lcClientList.Add(clientID, lcClient);
}
}
By using the serviceClient.Property and accesing this field it worked. I am going to be honest i have no idea how this really works, i stepped through and going over where the property is being assigned it didnt step into the service, so i'm assuming that its pulling this field from the array that has been passed in. But hey at least i got some where and now have data to use.
The funny thing is i spent so much time researching if anyone else had my problem, and only found a couple of posts that were similar but didnt have a solution. Well either way, what i was doing wrong was basically summed up in this post, "you are casting an object of type X to an object of type Y, and the twotypes are not compatible." What i'm thinking is that they are sort of the same type, but yea not really haha. Either way, whether this is bad practise or not? i have NO IDEA, but yea, at the moment all i am concerned about is getting the data to the client side and fill in the dictionarys so i can use them for the filling in of lists.
After i finaly fixed that issue i moved onto the code for filling in the rest of the lists. I have also wrote the code for inserting a record for management and client addresses, the reason this is more special is because the ID is generated by SQL server when a record is created, so i dont pass in the identifier (clientAddressID, managementAddressID) in but have to insert the rest of the columns into the database and then grab the ID and pass it back to the list server side, the the interface. I dont no the way most people go about the issue so i just did it like that, how i thought it would work logically.
For the rest of the night i will start filling data into the grid views, and figure out how to edit & delete etc. I also will update the UML diagram at some stage tonight or tomorow to reflect what ive changed so far.
_________________________________________________________
Finish 9.30 p.m. 11 hours
_________________________________________________________
Links:
http://www.themssforum.com/Csharp/property-array/
http://www.java2s.com/Code/CSharp/Language-Basics/Indexerallowarraylikeindex.htm
http://www.dotnet247.com/247reference/msgs/58/290679.aspx
http://www.dotnet247.com/247reference/msgs/39/196536.aspx
http://ryanfarley.com/blog/archive/2004/05/26/737.aspx
http://www.programmersheaven.com/2/XML-Webservice-FAQ-Pass-Array-Of-Custom-Objects http://www.developer.com/net/asp/article.php/3657826
http://blogs.msdn.com/markjo/archive/2006/09/05/740893.aspx
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.webservices/2005-06/msg00068.html
http://yassers.com/content/book/chapters/chapter9.htm
http://www.dotnet247.com/247reference/msgs/58/291597.aspx
Tuesday, May 20, 2008
20/5 Passing Lists & Interface
Start 9.00 a.m.
_________________________________________________________
ahhhh so early. Just carrying on with same stuff as yesterday.
I got the passing of the arrays back working :D thanks to an awesome cheeky mohnkey. I asked what he normally does as i had read alot of people just apss back a dataset, and he said to pass back an array of the class, and just .ToArray the list.
[WebMethod]
public clsClientAddress[] getClientAddressList()
{
dbConnection lcConnection = new dbConnection();
lcConnection.getClientAddressList();
List
return lcClientAddressList.ToArray();
}
So by passing the list converted to an array we can then grab it by assigning the result to an array of objects. What i was doing wrong from lack of knowledge was getting the data type of the array i was assigning it to wrong. After a bit of playing around i guess this and it worked so huray.
protected void btnGo_Click(object sender, EventArgs e)
{
serviceMain.serviceMain myService = new serviceMain.serviceMain();
object[] lcArray = myService.getClientList();
}
What my goal now is, to get the arrays back and pass the values into the dictionarys of the client. Once i have done this i can fill my data grids with data and work on the editing and deleting.
************************************************************************
Break 11.15 a.m. - 11.45 a.m.
************************************************************************
_________________________________________________________
Class 2.00 p.m. - 6 p.m. - going to study for project management and go to class.
_________________________________________________________
Having break in class... what better time to blogg. Today i had an issue with everytime i grabbed the list it would get bigger and bigger. Now in the application start on the service under the global class it makes a new list, SO theoretically everytime it starts it should create a new list? Well it was re-adding items from the database to the list and making the list large with duplicates, I found this out by stepping through and seeing that the list wasnt clearing. I'm not exactly sure how the application start works, so i thought i'd be safe and clear the lists before filling them again.
dbConnection lcConnection = new dbConnection();
Global.clientAddressList.Clear();
lcConnection.getClientAddressList();
List
return lcClientAddressList.ToArray();
So that will do for now, in future the logic and process of how this works will change, as is it will all be called differently, but was probly a problem i was going to face either way.
************************************************************************
Break 6.00 p.m. 10.30 p.m.
************************************************************************
Having a problem now with using the array that i get back from service what i'm trying to do:
Finish 12.15 p.m. 7 hours
_________________________________________________________
Will figure it out tomorow... if i dont soon i am screwed ^^. Perhaps below answers my question. http://www.themssforum.com/Csharp/property-array/. Either way i have to figure out how to get to fields, or fix the error i have... which is the lesser of the two evils... I shall sleep on it.