Thursday, November 29, 2007

Just a note on Lab #5:

In case you did not attend or left early last Tuesday, there are a few things you need to know to complete the lab.

The weather service requires an application key. The key is busadm531 .

Also, I am getting the weather information from Service Objects' DOTS Fast Weather Service. You can check out their service at www.serviceobjects.com . You can obtain a trial key to use the Web service for free. It is limited to 500 transactions.

Since I am also just using a trial key, my key will expire after 500 transaction, thus at some point my Weather service will not return valid realtime weather information any longer. Thus, if you want to use a weather service beyond this lab, I encourage to sign up at Service Objects.

MH

Technorati : , ,

11/29/2007 6:31:32 PM (Central Standard Time, UTC-06:00)
 Monday, November 26, 2007

I hope everyone had a good Thanksgiving week. Despite the holiday, there were a couple of good posts this week!

Adam pointed out the issue with dates in the database. One thing to keep in mind, is that a date is a date (meaning a complete date with time and date), even if you mask it as short time or short date. If just the time is stored, really also a default date is stored. If you retrieve dates from the database and would only like to see the time part, a formatting string needs to be applied (i.e., {0:t}).

Also, there are times when you want to remember what object (i.e., user) you selected (i.e., from a drop down list). Obviously, you first have to retrieve the user based on the selection in the drop down list (i.e., username) and then store it in, for instance, a session variable.

Russell, probably getting more experience in DB connectivity than he wanted, summarized his database issues and the solutions pretty well in his latest post and thus is turning this into great learning experience for himself and possibly others reading his post.

And Sarah reached the limits of the Data Source control in the context of Master Pages. The data source control is nice, as it can be simply dropped on the Web Form (.aspx page) and then be configured with a Wizard. So no programming ... Well, this may actually be a good example of the concept of "leaky abstraction". The coding gets abstracted into a control and a configuration Wizard and thus requires less programming knowledge. However, it breaks down in master pages with more than one content placeholders (which is rare, but possible). As it turns out, the data source control in the first content place holder cannot "see" the textbox control in the other content place holder. However, it is no problem accessing controls from a different content placeholder in code (see example below).

Dim ws as New wrefBookService.BookService

myBooks = ws.getBooks(txtKeyword.Text) 'txtKeyword is in different content placeholder

myGridView.datasource = myBooks

myGridView.databind()

Last but not least, Paul found some interesting security articles that, for instance, question if Vista's focus on security is really paying off.

Now it is on to mobile applications!

MH

11/26/2007 7:11:32 PM (Central Standard Time, UTC-06:00)
 Monday, November 19, 2007

I have just completed a new version of my Membership Service. The key differences are that now passwords are not stored in clear text, but as a hash value. Thus, even someone with direct access to the database (i.e., me) does not what the passwords are. Also members belong to a group. Thus I can setup multiple independent groups of users.

If you want to use the new membership service, you need to send me an email. I will provide you with the application key and your group name. The service endpoint is http://www.531.sba.uwm.edu/mhaines/webServices/MembershipService.asmx .

For testing purposes, you can use application key 123 and group TestGroup .

Again, I encourage you to use an existing service over implementing the membership functionality (i.e., authentication) yourself!

MH

Technorati :

11/19/2007 5:36:31 AM (Central Standard Time, UTC-06:00)
 Thursday, November 08, 2007

The project is moving along. The presentations are interesting and help me and others - I hope - to understand the nature of the projects better. So far all ideas are viable and most projects seem to be on track. At this point everyone must have identified and explored their data source and should have an idea about the Web methods that are going to be implemented. This course, and particularly the project, is also a good place to demonstrate students have learned in previous classes. There clearly is an expectation, that students can design a simple database and understand the basic principles of "normalization".

As far a "good" Web development goes, I would recommend taking a look at this eWeek article: Top Web Development Mistakes in eWeek, September 17, 2007, p. 16. ... and then read the discussions about it.

MH



11/8/2007 9:58:54 PM (Central Standard Time, UTC-06:00)
 Wednesday, October 31, 2007

Screen scraping can be fun, but as Calvin pointed out that there are legal issues that need to be considered if the use goes beyond a demo example. Take a look at Wikipedia, if you want to learn more about screen scraping or Web scraping.

But it has some pitfalls. The most important one is that the Web page may change and your screen scraping approach breaks down. So I recommend to always save a local copy of the Web page, so you at least have something to work off. Also it requires some patience and careful analysis of the source HTML.

Keep in mind that the length parameter in the substring function must be positive. If for some reason the end index ends up being smaller than your beginning your length is negative and substring will throw an exception!

I have posted the lottery example on the G-drive. I have included the methods developed in class and added a better version that uses an object that captures the draw information. Check it out!

MH


Technorati :

10/31/2007 3:16:21 AM (Central Standard Time, UTC-06:00)
 Sunday, October 28, 2007

We had the first round of project presentations and it appears that the three brief informal introductions to the projects helped not only the ones presenting, but also others shaping their project. BTW, I think it is a good idea to write about your project ideas and your progress (and obstacles) on the blog as some have done (see for instance Joel's, Russell's and Sarah's posts).

Ruby (on Rails) seems to come up once in while, first in one of the breaks, now in a blog post. Let's see if we will have the time to discuss this a bit, but I think it is an intriguing Web development framework (if used for the the right type of application). Supposedly, developers realize a 6-10 fold productivity gain over "traditional" Java and .NET development.

Adam asked a good question in his latest post on redundant code. The short answer is refactoring. If you notice code that is being duplicated within your Web form, write a function that processes this code and call this one function from multiple places as needed. If the same functionality is needed across Web forms or even across applications it may make sense to write a code library.

Otherwise enjoy your Halloween ... don't get haunted by the Web development and .NET ghosts.

IMG_0429b.jpg

Boo!

MH


Technorati :

10/28/2007 3:30:29 AM (Central Standard Time, UTC-06:00)
 Sunday, October 21, 2007

Just stumbled over an interesting and somewhat related article to some of the things I said in class about user interface development and the fact that more control of user interface will go to the end-user and that one should focus on providing the components (be it Web services or complete pagelets/portlets).

The article is called Make Widgets, Not Web Pages, Developers Say and appeared in PCMagazine.

Technorati : ,

10/21/2007 4:38:43 AM (Central Standard Time, UTC-06:00)
Search
Navigation
On this page....
Archives
<September 2008>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011
Aggregate Me!
RSS 2.0 | Atom 1.0 | CDF
Categories
Blogroll
Contact me
Send mail to the author(s) E-mail
Themes
Administration