Welcome

I'm a student and this blogg has been created to keep information on a daily to weekly basis about my project that i am doing to get my Bachelor of Information Technology. This is based on my progress, and a place to put all of my information, not entirely a proper blogg. Though sometimes i feel like i'll be talking to myself... Any ways, enjoy and feel free to comment. If your wondering what this project is and dont want to read every single post, just go to the Proposal link, or any of the "posts worth looking at" below.

Saturday, May 17, 2008

17/5 Pretty much blogg all day...

_________________________________________________________
Start 9.30 a.m.
_________________________________________________________


Well ive spent all day (its 3.15 p.m. now) blogging!!!! dang. LOL spent all this morning updating the end of implementation part one, then time on the problems i didnt write down. I just finished my blogg about implementation part two. I supose i shouls start fixing those problems, need to get it done by monday, so tired though... only 45 minutes of work left to go, falling asleep.

_________________________________________________________
Finish 3.30 p.m.
_________________________________________________________

17/5 Summary of Implementation pt.1

Below is what i set out to do for this milestone.


Implementation of Database

  • Install virtual machine and get Microsoft SQL server 2005 up and running.
  • Install Microsoft Visual Studio 2005 on virtual machine (alternatively i can try get hold of a virtual machine with both of these installed.
  • Create database, tables, relationships, stored procedures.
  • Insert fake data

I got my virtual machine up and going with no problems, it already had server 2003 installed on it, so i just had to configure the application server. I got the iso images for Visual Studio and SQL Server and installed those without a problem.

The database creation was quick and easy. I ended up deciding that i'd have 6 tables and take out the user permission one and the intercepting table between user and permissions. I will be implementing the user loging system with visual studio so these tables are not needed.

For each table besides management i created a stored procedure to inser, update, delete and select data from the database. The stored procedures were easy to do, just alot of cutting and pasting really ^^.










Implementation of Business Layer


  • Create project, classes
  • Create webservice
  • Create database connections
  • Create test page to get data

<-- newest UML Diagram (v 3.0)

The first hurdle i had to jump was learning visual C Sharp. After reading alot of MSDN forums, guides and reference pages it wasnt too hard to pick up. Because the .net framework is underlying C Sharp and VB that ive used before it wasnt a huge learning curve. As well as these resources i also talked to my sister about C Sharp, and went over some of my code and got her to compare it to VB for me. Things such as void, in the sense of VB is just sub. After having this talk i was away and going for it.

Throughout the implementation part one i have changed the programming and UML diagrams alot. This is mainly because at first i really didnt have an idea how the backend would actually be implemented, besides which entitys i needed.

The major changes i have made are changing from a dictionary to a list, moving all database connections to another class and adding in a global class.



Change from dictionary to a list

<-- UML Diagram V 2.0 (old)

As you can see in this diagram i originally had a "clsList" for each entity, such as a clsUserList to hold clsUser. The advantage of having a dictionary is that it has a key, then a value Dictionary. This makes the values very easy to search, and sort etc. BUT what i realised is that you cant just pass a dictionary to the interface, but have to send it as an array of some sort and read it back into a dictionary at the other end.

What i decided to do about this was implement a generic list at the backend because only basic searching for editing and deleting needs to be done. This way i can more easily pass the data to the interface and turn it into what i want it to be. I am going to implement a Dictionary at the interface end because alot of searching and sorting is going to be done.

So what i was doing with the dictionary was creating a dictionary (clsUserList for example) and that would hold a key, and the clsUser. This was declared in the clsGlobal:

public partial class clsGlobal : System.Web.HttpApplication
{
public static clsUserList theUserList;

void Application_Start(object sender, EventArgs e)
{
theUserList = new clsUserList();
}

}



Now when the application starts it creates a list of clsUser instead. This meant i could remove all of the lists, and move the edit function into the clsUser.

public partial class clsGlobal : System.Web.HttpApplication
{
public static List userList;;

void Application_Start(object sender, EventArgs e)
{
userList = new List();

dbConnection lcConnection = new dbConnection();
lcConnection.getUserList();
}

}

Creating a database class


Originally i was saving and updating the database from the clsUser itself, and deleting and loading data from the clsUserList. I decided it would be best to seperate all of this code into one seperate class called dbConnection. This holds all the code to connect to the stored procedures in the database. Now the clsGlobal, and service call this class to save, select, update and delete records in the database.


Global Class

I added in the global class in version 2 of the UML diagrams, but i'll go over why again. Basically every time the user called the service it would create a new list. Now if every user creates a new list everytime they access the service, we will be doing alot of calls to the database to fill these lists, and the users will all be adding, deleting and updating different lists. By having the lists declared and created in the global class we are only creating the list once at application start. This way everyone is accessing the same list.


Testing

I created really basic forms to insert, update and delete data. Mmmmm would ya look at that design.

So i made a form like this for jobs, users, client address, management address, management and client. This way i could test the app. For problems i faced see here.










Problems to still fix

Even though i changed from a dictionary to a list, i am still having issues sending it to the interface. Either way its easier to turn the list into an array and send it. I shall figure that one out. I am also just having an issue adding client addresses and management addresses. Probly something minor, only reason i didnt fix it yesterday was because i ran out of time. For more information on my problems and fixes go to here. :D


Conclusion

I finished around 98% of what i needed to do. My time management is getting better, maybe cause i'm finially getting this programming thing so its less frustrating. My skills have definatly improved in my programming and trouble shooting already, though i have to add google makes life alot easier, and about 1000 other people are having the same issue as you i mean me.

After i fix these last little bits and pieces i am gonna move onto the next stage of implementation which i will upload a post about after this one. Neeeed Cooofffeeeee.

Links

http://msdn2.microsoft.com/en-us/library/kx37x362(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/saxz13w4(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/ms173095(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/ms228368(VS.80).aspxhttp://www.oreilly.com/catalog/prognetws/chapter/ch02.htmlhttp://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/CustomMSBuildTasksForMono.aspxhttp://safari.oreilly.com/0735619093/ch04lev1sec2http://msdn.microsoft.com/en-us/library/0b0thckt(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/s1ax56ch(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/yah0tteb(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/83fhsxwc(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/xfhwa508.aspxhttp://support.microsoft.com/kb/302577http://www.homeandlearn.co.uk/csharp/csharp_s1p5.htmlhttp://www.xmlfox.com/CSsamples.htmhttp://msdn.microsoft.com/en-us/library/6sh2ey19.aspxhttp://msdn.microsoft.com/en-us/library/ddtce152(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/ms178132(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/aa479339.aspxhttp://msdn.microsoft.com/en-us/library/ms173114(VS.80).aspxhttp://msdn.microsoft.com/en-us/vstudio/aa700773.aspxhttp://msdn.microsoft.com/en-us/library/ms173114(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/x53a06bb(VS.80).aspxhttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=308584&SiteID=1http://msdn.microsoft.com/en-us/library/2h3syy57.aspxhttp://msdn.microsoft.com/en-us/library/98bbex99.aspx
http://aspadvice.com/forums/thread/31836.aspx
http://msdn.microsoft.com/en-us/library/6sh2ey19(VS.80).aspx
http://timstall.dotnetdevelopersjournal.com/converting_a_list_to_an_array_and_back_using_generics.htm
http://bytes.com/forum/thread512439.html http://weblogs.asp.net/bhouse/archive/2005/06/14/412382.aspx

17/5 Start of Implementation pt. 2

Implementation Part Two - Interface & Google Maps

Just gonna make a list of what i can see that i need to do at this stage.
  • Create Masterpage/template (as well as css or any other formatting i need to do)
  • Create and name all controls on pages (txt boxes, gridviews etc)
  • Do code behind the forms (reading in, adding, deleting etc)
  • Test that the records are saving, reading, updating and deleting
  • Set up google maps (create class for connecting with google?)

I need to go more indepth on the coding i will be doing. Below is the list of things the interface needs to accomplish. Keep in mind i cant remember how visual studio works in the sense of dynamic content, so this could change radically over time, but this will show what needs to be done.

  • frmUserList : View users, delete user, search user
  • frmUser : Add user, view user jobs, edit user
  • frmClientList : View clients, delete client, search client
  • frmClient : Add client, view client locations, edit client
  • frmClientAddressList : View client addresses, delete client address
  • frmClientAddress : Add client address, edit client address, get geocode
  • frmJobList : View jobs, delete job, search job
  • frmJob : Add job, edit job
  • frmManagement : Add business name, edit business name
  • frmManagementAddress : View management addresses, delete management addresses, get geocode
  • frmMaps : View jobs, search jobs, get locations, calculate route, get directions, show map


Mapping

Theres going to be a lot of logic behind getting the route. I cant however be too specific at this point because i'm not too sure exactly what i am going to do. I think i will pass the addresses of the jobs to google and calculate the distances of those relative to the home location, once i have these distances i should be able to use an algorithm of some type to calculate the route point by point. This however gets difficult, does the user want a straight line, or do they want it in a circle that then comes back around to their work place? I also need to keep in mind prioritisation, because this will majorly affect how the route will work.

Basically i am going to be doing a lot of calculations for this. How i do with this will of course be kept in my blogg and updated regularly so you can see how i am dealing with these problems.

Thursday, May 15, 2008

15/5 More Finishing...

_________________________________________________________
Start 12.30 p.m.
_________________________________________________________

More programing :D

_________________________________________________________
Finish 12.30 p.m. - 10 hours
_________________________________________________________

Wednesday, May 14, 2008

14/5 Finish off stuff

_________________________________________________________
Start 10.00 a.m.
_________________________________________________________

So my stored procedures are working fine with inserting, updating and deleting. Just having a problem with the insert, it appears to be inserting twice, and i'm trying to find out here it is doing this.

_________________________________________________________
Finish 12.00 p.m. 8 hours
_________________________________________________________


Got my coding done, havent sorted out the double inserting yet however. Perhaps tomorow ^^

Monday, May 12, 2008

12/5 Database Connectivity

_________________________________________________________
Start 10.00 a.m.
_________________________________________________________

************************************************************************
Break 12.00 p.m. Lunch
************************************************************************

Cant be bothered typing today haha, just doing database stuff :)

_________________________________________________________
Finish ?? 5 hours
_________________________________________________________