Courses/CS 491ab/Winter 2008/Robert Hovhanessian
From CSWiki
[edit] Week 1 - January 4, 2008
Well this was the first week and i'm trying to find time for the class as my work hours are in conflict with it. I've been trying to take this class for several quarters but I can't delay it anymore. So i have to work something out.
[edit] Week 2 - January 11, 2008
I've done some websites with simple asp. I've made use of a few asp components. What i think i'd like to concentrate on is .net programming. It's very popular and very powerful. So it'd be nice to be more familiar with it. The following page has downloads for .net freamwork 3.5 and the visual studio Express Edition. The nice thing about the express edition is it's free. :) http://msdn2.microsoft.com/en-us/netframework/aa569263.aspx
I downloaded and installed both.
I'm also considering doing something else. I'll be looking into more details at available AJAX platforms
https://ajax.dev.java.net/
http://code.google.com/webtoolkit/
Since I couldn't attend the last class, I watched the video. And although this seems like it could be a subpart of a larger project, i think I might do the ToDo list as the project for my 491ab course, plus integrate it with ajax to make it more user friendly.
[edit] Week 3 - January 18, 2008
I downloaded a free ebook about "ajax & .NET" as well as ".NET & Silverlight". I read some of the first ebook.
The url is:
http://msdn2.microsoft.com/en-us/vstudio/default.aspx
You'll need a .NET passport to log in and download.
A few things about asp.net. The idea is to separate code from basic HTML and to use web controls instead.
[edit] An example of a spagetti code with regular asp would be.
<html> <%="Hello World. Today is: " & Date()%> </html>
[edit] And a demo of .aspx page using web controls
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> Sub submit(ByVal Src As Object, ByVal args As EventArgs) button1.Text = "You clicked me!" End Sub </script> <script runat="server"> Sub Make_A_Link(ByVal Src As Object, ByVal args As EventArgs) MyURL.NavigateUrl = URL.Text MyURL.Text = "Visit " & URL.Text End Sub </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <form runat="server"> Web Forms
<asp:Button id="button1" Text="Click me!" Runat="server" OnClick="submit"/>
<asp:TextBox id="URL" Text="http://" Width="300" Runat="Server"/> <asp:Button ID="Button2" Text="Make Link" OnClick="Make_A_Link" Runat="Server"/>
<asp:HyperLink id="MyURL" Target="_blank" Runat="Server"/> <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar> </form> </body> </html>
I downloaded and installed Silverlight. It is similar to Flash except it's supposed to be more powerful in terms of intgrating it's internal program with your web application. Also has some cool flash presentation capabilities. There's a Expression Blend software for creating silverlight presentaions but to get the full power of Silverlight you'd need "Visual Studio 8 Pro" edition. Ther's a free offer of v8 beta which i tried to oreder but had trouble getting my order through due to a glitch on msdn checkout shopping cart. I also had trouble viewing some of the web sites that used silverlight (Even though i successfully installed Silverlight on my computer). It is kind of frustrating. So for now i'll just investigate silverlight on the side, and concentrate most of my efforts elswhere.
[edit] Week 4 - January 25, 2008
This week i tried some examples of Code-Behind with Asp.Net. This is similar to jsp with java classes behind the pages. This separates html from code and allows a more organized way of coding. We still use a small spaggetty-code for the aspx pages. But it does not affect the overall program. It's merely for output purposes and it only affects page view.
[edit] And a demo of .aspx page using web controls. The html is completely separate.
<%@ Page Inherits="MyCodeBehind" Src="test.aspx.vb" %>
<html>
<head>
<title>Code Behind page example</title>
</head>
<body>
<form action="" method="post" runat="server">
Category:
<asp:dropdownlist id="Category" width=147 runat=server>
<asp:listitem>-Please Select Template-</asp:listitem>
<asp:listitem value="b">Business Card</asp:listitem>
<asp:listitem value="p">Postcard</asp:listitem>
</asp:dropdownlist>
<asp:RequiredFieldValidator ControlToValidate="Category" Display="Dynamic" InitialValue="-Please Select Template-" errormessage="You must select a category!" runat=server/> </td>
<asp:button text="List" OnClick="ListCategory_Click" runat="server"/>
<asp:datalist id="MyList" repeatcolumns="2" borderwidth="0" runat="server">
<ItemTemplate>
<img src="http://localhost/cards/sm/<%#DataBinder.Eval(Container.DataItem, "CardID")%>.jpg" >
<%#DataBinder.Eval(Container.DataItem, "CardKeywords")%>
</ItemTemplate>
</asp:datalist>
</form>
</body>
</html>
[edit] And a demo of .vb file that contains all the code needed to run the .aspx page above
Option Strict Off
Imports System
Imports System.Data
Imports System.Data.Odbc
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Public Class MyCodeBehind : Inherits Page
Public Name As TextBox
Public Category As DropDownList
Public MyList As DataList
Public Sub ListCategory_Click(ByVal Sender As Object, ByVal E As EventArgs)
If (Page.IsValid) Then ' checks if the required fields didn't return any errors
Dim strSql As String
Dim DS As DataSet
Dim MyConnection As OdbcConnection
Dim MyCommand As OdbcDataAdapter
MyConnection = New OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=mysqserver;PORT=3306;uid=myuserid;pwd=mypassword;database=mydatabase;")
MyConnection.Open()
strSql = "select * from Cards where CardType='" & Category.SelectedItem.Value & "'"
MyCommand = New OdbcDataAdapter(strSql, MyConnection)
DS = New DataSet()
MyCommand.Fill(DS, "Cards")
MyList.DataSource = DS.Tables("Cards").DefaultView
MyList.DataBind()
MyConnection.Close()
End If
End Sub
End Class
[edit] Week 5 - February 1, 2008
I didn't do any coding this week. I've been looking for some project ideas that i might do. I've been looking for something doable within a 3 month period as well as something unique. Little luck so far.
[edit] Week 6 - February 8, 2008
A friend of mine has asked me to build a web site for his insurance agency. So far the requirements seem pretty easy for me. Most of it involves basic form handling. I.e. Getting the required information, which an agent can use to give the customer a quote. As far as coding goes, I'd like to make the web site more interactive than the requirements. This will involve interactive help with the help of AJAX, a live chat where a customer can chat with an insurance agent. The customer will be given the option of having a copy of the chat session automatically emailed to him/her upon the end of the chat session.
Each customer will receive a quote id upon completing a form for the insurance type he/she wants. This may be useful if the customer wants to check back with his/her quote id to see the best offers the agent was able to find. Or if he ops to receive the offers via email that can be done also.
Then on the back end an agent can see which quotes have not yet been taken care of. Mark a quote completed. An agent will also be able to mark a successful quote which has turned into a contract. The quotes will remain in the database for 1 year then they'll be automatically deleted. Report options will be available based on region (i.e. state) preferably in form auto generated graph charts. The management can use those reports to see in which regions insurance sales are more active. Other reports may also be incorporated. For example yearly success rate (i.e. how many quotes have actually turned into insurance contracts).
Most likely i'll make the web site with ASP.NET and learn some features of ASP.NET as i make the web site. AJAX will definately be used, a MYSQL database, CDOSYS or a similar email sending component. XML will be used to store lists. For example list of available cars
<Year value="2008">
<Make name="BMW">
<Model>525i</Model>
<Model>Z4 Coupe</Model>
....
</Make>
....
</Year>
....
So far it does seem like it'll consume a reasonable amount of time (though not nearly a whole quarter). However I’m concerned it may seem trivial in terms of programming. For that reason i also looked into Google calendar api. The api might used the to: create a web front end to let people view their Google Calendar information from within a different web site. This can be done in two ways. I can make my own calendar which will use the data available on a Google users' calendar or embed Google calendar itself into my web site. Or i can create my Calendar Gadget (i.e. ToDo list) that users can add to their own Google Calendars.
[edit] Week 7 - February 15, 2008
I was supposed to meet this week with a rep. of the program that runs on the insurance company's back end. I was unable to schedule a meeting because i was told he's sick, so it'll have to schedule it for the coming week i guess. This week i started planning and started basic pages for the insurance web site. Pages will include the home page, a quote page for each insurance type. They'll be accessible by a menu. A help section with FAQ pages. Basically pretty much every thing to get a skelleton in place for the web site. Made the databese tables for storing quotes and some basic html. I'll leave the coding part for later.
[edit] Week 8 - February 22, 2008
[edit] Week 9 - February 29, 2008
[edit] Week 10 - March 7, 2008
[edit] Brief project description
A web site that allows submitting requests for quotes of different insurance types: Home, Personal Auto, Personal Line, etc. Users may also contact customer support through a live chat application. The users will include any individual or organization, who wish to receive quotes for the insurance type they desire. This web site will be used by the "All Inclusive" company. The web site will also have a back end which will help the agents provide customer support, as well as provide reports to the management to help improve campaign policies.
[edit] Anticipated users
- Individuals residing in the U.S.
- Organizations in need of insurance services within the U.S.
[edit] Main conceptual (i.e., user-level) objects
- Users: Will submit quote requests.
- Quote requests will be submitted through forms (i.e. auto, homeowners, commercial auto etc will all have their unique forms).
- Agents: Will respond to quote request by offering several similar policies.
- Users will either retreive the response through the web (with their RequestID) or receive automated email notification when agent enters quote information.
- Live Chat: Used by both users and agents as alternative to a phone call for customer support.
- Management:
- Will use reports available at the back end to improve campaign policies
- Will be able to add/edit/delete agents and assign them a level of access to the back end (ie. Manager can also be an agent but with access to reports, but not the regular agent)
[edit] Primary conceptual (i.e., user-level) operations
The system will enable any user to get in touch with an Insurance agent on the back end through the live chat application. Users will be able to submit their quote requests by filling in the required information. They will also be able to save the partially filled in forms for the purpose of continuing it later on.
- User Operations
- Allow users to submit requests for an insurance quote by providing appropriate forms.
- Allow users to save their partially filled out forms, so that they can continue filling it out later on.
- Allow users to open a Live Chat session and connect with the next available agent for support.
- Allow users to submit requests for an insurance quote by providing appropriate forms.
- Agent Operations
- Agents can take it upon themselves to following up on a certain quote request. Once an agent does that, all other agents with equal level of access cannot see or reassign the task to themselves or others.
- Agents can make themselves available or unavailable for a live chat session. If an agent is unavailable all Live Chat requests will be forwareded to other agents.
- Agents will post the quote response, which will automatically be emailed to the user. Or it can be retreived through the web site by the user.
- Agents will enter policy number in the appropriate field (which will be saved in the DB). This process will mark a quote request as "Converted ... to a contract" and thus be available for inclusion in reports by management.
- Management Operations.
- Add/Edit/Delete Agents and their information with lower access level.(This is not exactly an employee DB).
- View quote requests assigned to any agent.
- Assign a quote request to any other agent (may be useful if an agent gets sick for a long period, quits or is fired).
- View/Generate desired reports.
- Admin
- Ability to peform all the tasks available to Management.
- Assign appropriate level of access to an agent (A management staff can also be an agent and therefore need access level higher than one available to a regular agent).
- Live Chat Operations
- Enable any user to get in touch with an Insurance agent on the back end.
[edit] Why I am interested in this project
A friend of mine has opened an insurance agency and asked me to make the web site for him.

