40 in 60


There’s good reason for celebration today — first, that our 4th iteration is complete with the release of 0.1.3… and second, that I actually did do 40 posts in 60 days! Now the goal is that I don’t forget everything I learned in the next 3 weeks while I’m overseas. :)

Here’s some thoughts on this last release.

  • I’ve been reading more and more bad things about using the Designer in ASP. I think the conclusion I’ve been converging on is that the Designer is good for rapid prototyping of something that looks halfway decent, but doesn’t do anything really weird. The big problems of the Designer, as I see it, are 1) inflexibility to accommodate different models, 2) hiding important implementation details under an abstraction that seems nearly as complex the implementation underneath it, and 3) poor setup to test, especially for regression testing. One of my issues as I added new functionality was that there wasn’t an easy way for me to go back and see if changes I had made (especially DB changes and page name changes) were going to break certain pages.
  • One more thing, ASP does make many things very simple, but to use it powerfully, you really do need to learn a lot of things about it. My main complaint about this, is that because they have that abstraction above the guts of what’s really going on, you aren’t really learning a whole lot about web development in general that you could transfer to developing in say, PHP or JSP. For someone who likes killing two birds with one stone, I feel incredibly inefficient when I learn more about ASP, because I feel like I’m learning about what a particular company’s interpretation of web development is… or worse, what that company would like it to be. Then again, that company is Microsoft, and I think a few people buy their stuff… so maybe it’s worth learning even though it won’t transfer much at all.
  • I’d really like to find some good books on developing under ASP, but in an inherently test-driven way. I know there’s a better way, since I’ve seen pieces of things here and there on different blogs, but I don’t know yet of any book that takes you step by step through it. Finding a book or similar resource is something I’d like to do when I get back.
  • As far as Agile/XP goes, so far I think it’s a raging success… and I don’t really even think I’m implementing much of it. I think I have benefited most from the philosophy of small, incremental changes and the willingness to be wrong and try things out. It’s not a bad way to actually learn a new language/development framework.
  • Some notes to myself for when I get back:
    • I have a relationship between ClassID and StudyGroupID in two places. Maybe that should just be one, so I don’t need to worry about DB integrity.
    • It’s time to learn something about entity classes and how people do that in ASP.
    • The Administrator and Teacher role might be different in a full-featured website, but considering the scope of this project, it would be better to just collapse these roles into one.
    • Right now, most of the pages outside of the Admin directory are shown from the directory of the student… but others, such as View Class, need to be shown from the perspective of the teacher.

Alright, that’s all for now. I will be back in 3 weeks and will get back with Release 0.1.4 in August!

This story basically involved doing some house cleaning and small assorted improvements as the last part of this release.

First, I noticed that having separate StudyGroup_User and Class_User join tables was necessitating messy, multiple join statements in the SQL queries. But the thing is that StudyGroups and Classes have a many-to-one relationship, and that a study group could not belong to more than one class. More importantly, if a user belonged to a class, the user could not belong to more than one study group. Therefore, I could instead add StudyGroupID as a field in the Class_User table and completely get rid of the StudyGroup_User table.

Here you can see the cleaned up DB diagram, which also shows the new Lesson table created earlier in the release. The DB change required a few pages to be changed to use the new field and remove references to the now defunct StudyGroup_User table.

DB Diagram 3

I did a little cleanup of the pages as well. There didn’t seem to be a compelling reason for a “View My Classes” page, since we already show this in “My WBI”, so I removed this page. There is a “View My Study Groups” page as well, which had a stronger reason for existing. If you remember, we just created an empty page as a placeholder for this, so in this story the page has been implemented, with links to the appropriate View Class and View Study Group pages.

My Study Groups

It was a good thing that yesterday’s story was much less than the estimate, because today’s was about the same magnitude over. This was mostly an oversight in my estimates, since of course viewing a table’s data should be much easier than implementing creating and editing one.

The first thing I realized was that I had an admin page for editing classes, which was called “Edit Class.” After the evolution of the site, it became clearer that this wasn’t the best way to structure the site, so I reorganized the navigation and page organization, so that under the Admin area, the user could view all the classes in the database, and then from there click on a link to edit the class information (right now, just the class name) and edit the class lessons.

I created a separate, new page for editing class information, as well as an edit lessons page with a list of lessons for the specified classid. From there, you can edit the lesson directly, or you can create a new lesson.

Edit Lessons

I’ve become much more comfortable with the GridView, but I’m still pretty unenamored with using the DetailsView to insert items. The main reason is that it shows the first record in the database, and the Insert button (in this case I changed the button text to “Create”) to clear those and bring up the form fields. I figure there must be a better way to do this, but I haven’t found them yet.

Create Lessons

After insert is clicked, you can see the newly added lesson in the class lesson list.

View Lessons

Another straightforward story today. Here, we’re taking the new data fields made available by the new Lessons table, and displaying the associated lessons of a particular class in its view class page. Similar to the other gridviews on this page, we are using the classid as a request parameter to generate the appropriate SQL statement, and in this case we are also doing an ORDER BY start date, in order to get some natural sequence.

I decided earlier on that I wouldn’t add some sort of sequence number to these lessons, because as someone who has taught before, plans change and you end up skipping around. It would make more sense to just change start dates, and have that be the determination as to which lessons appear first.

Because the view class page currently is intended for student users, it didn’t seem all that meaningful to display the # of total points that each assessment was going to be. Not that this is not useful for the student to know; just not on this page. It would probably make more sense to show this on a page where the student was viewing progress and assessment records.

But the student does see the dates of the assessments, as well as the required mastery level needed, expressed as a percentage. The display of all this data was mostly accomplished through the existing gridview setup, but I tweaked a little with the formatting to get something close to what a student might expect.

View Class Lessons

Incidentally, the story was implemented way under the 1.5 hours estimated, so I guess I should be happy that my pace is quickening.

Today’s story involves adding instructional units to the database. Since that’s a mouthful and might be confusing terminology to people outside the education academia realm, we’re going with a simpler term, “Lesson.”

The purpose of the lesson table will be to store the definition of the lesson — the lesson name, as well as its data relevant to the mastery learning method. In particular, there will be a start date and a date for the 2 assessments. Any practice that the students do will occur between these dates.

Also, in this lesson we specify the number of possible points for assessment 1 and 2, as well as define what level of achievement (as a percentage) constitutes mastery.

Lesson Table

The data fields are pretty straightforward, with the LessonID obviously being the primary key and being auto-numbered, and a foreign key relationship with the Class table.

The rest of the time for the story was for setting up test data with some simple lesson records for the Arithmetic class, which is mostly for helping testing, and also a lesson record for vectors in the physics class, which will be the more “realistic” lesson module.

This story went very well. I also got to learn more about how to customize fields in a gridview a little better.

Basically, the requirement is to create a page that allows a user to see another student’s profile — that is, their alias, first name and last name, and About Me text. It’s actually quite similar to the user’s own profile/account page, except that this (for obvious reasons) shouldn’t be editable, and that we’re not retrieving the logged-in user’s id, but specifying one on the request.

After basically taking the My Profile markup and modifying it for this page, it was nearly done. Putting a test parameter on the request wasn’t too difficult, and I find it interesting how the URL ends up being something like:

~/Classes/ViewStudent.aspx?user=15ea2612-f67c-4e00-874b-19a216316b32

It seems pretty unwieldy, but when I think about it, this is good in that it makes it harder to guess what someone’s userid is. Not that it wouldn’t be too difficult though.

Anyway, here is the View Student page:

View Student

The second part of this was to link to this page from the View Class and View Study Group pages.. specifically to change the text of the user’s alias into a hyperlink. I did some exploring and figured out how to configure a hyperlink field that accomplished this. Below is a screenshot of the View Study Group page with the new hyperlinked field (which I labelled “User”).

View Study Group with User Links

This was somewhat of a challenging user story, but after several attempts, I got it working. I realized in the process that I need to beef up some of my database skills, but the main thing is that for now it works alright.

The main task was to make URLs for the current user’s classes and associated study groups. For this, I needed to get the user id, the class id, the class name, the study group id, and the study group name. Unfortunately these were spread apart in several different tables, and up to this point I had only done joins on two tables.

I did a little searching, and although it’s not the best performance-wise, it’s acceptable to do a join on 3 or 4 tables… and this is basically what I did to get the feature working. I had a little trouble at first with the syntax, ending up with too many matching records because I didn’t specify all the necessary conditions across all tables for the userid to remain constant. After fixing this, it seems to work well, and I set up the links to use the study group and class ids to open the view class and view study group pages without a hitch.

A screenshot of the implementation for one user:

My WBI

I wasn’t quite sure what to call this page, as it isn’t technically the home page, but it is the main page that users should go to after login. I finally settled on “My WBI”, which I don’t really like, and feels oh-so-dot-com-bubble-ish. But oh well.

We are already on our 4th iteration of the project. I’ll be having a semi-long break after this iteration for a trip overseas, so I don’t want to end the release in the middle of some major feature.

Here are the customer user stories for this release:

  • Allow student users to view the classes they are enrolled in (show class name), as well as which study group they belong to (show study group name). The class name and study group name should link to the view class and view study group pages respectively, with the appropriate parameters selected. Also, this should be the first page they come to after logging in.
  • Allow student users to see the profiles of other students in their class and/or in their study group, by clicking on their name in the class enrollment list, or their study group page.
  • Add support for viewing an instructional unit for a class. The view class page should list all the instructional units for the class, with relevant data.

Ok… whew. That’s a lot of story, so let’s see how the estimates come up from the development perspective.

  • Allow student users to view their classes enrolled in and the study group they are in. These names link to view class and view study group pages. Make this the page to redirect to after login. (1 hour)
  • Allow student users to see the profiles of other students in their class and/or in their study group, by clicking on their name in the class enrollment list, or their study group page. (1 hour)
  • Design an instructional unit table and update the database. Add test data. (1 hour)
  • Show the instructional units for a class in the view class page, with associated fields. (1.5 hours)
  • Make an administrative area for admins and teachers, where they can create and edit instructional units. (1.5 hours)
  • In the list of classes in the view my classes page, show the current or latest instructional unit for each class, along with their mastery goals. (1 hour)

As you may have seen, we just don’t have the bandwidth to tackle the last customer story, which may be just as well, considering it opens a whole new can of worms. The stories already committed for this release are fairly significant in themselves, and the estimates assume that the pace will start to quicken more.

Although some early stories were much more difficult to implement, the release ended with some real, tangible progress in using ASP and in moving the application forward. With the implementation of a few more pages, I expect that most of the groundwork for the user accounts will be laid down, and we’ll get into the meat of the mastery learning application.

I’ve written at length in this week’s posts on some of my complaints about ASP, but at the same time, I don’t want to give the impression that ASP is a flawed approach. I think it, like many Microsoft products, has to be many things to many people, simply since MS is so dominant in the marketplace… and I can certainly understand how trying to market for the widest audience possible would make certain design decisions difficult.

That being said, I think I need to start revisiting the books I was reading at the beginning of the project to review some of the examples and tutorials. As I’ve encountered roadblocks, I’ve typically found answers in a variety of places and done all sorts of my own experimentation. I’ve noticed that at least with my own foray into Agile programming, there’s been an unconscious pressure to keep adding functionality, without taking enough time to evaluate what other alternative approaches exist. Maybe this is just my own fault for not building this in to the process, but I find it hard to see how a developer could go to a customer and ask for time to explore and evaluate design alternatives that may not even exist. I guess what I’m saying is that the Agile process seems to fall a little short for me in terms of promoting the kind of learning and analysis that would pay big dividends later on. But in pretty much every other respect, I thoroughly like the fact that an Agile approach has kept me focused on getting things done.

I think I can improve on my estimates, but it’s the estimates on tasks I’ve never done before, which are still going to feel like shots in the dark. I made several design errors that put me back a few days in the last few weeks, but that’s pretty much to be expected given my inexperience. And it’s to be expected in the future for at least some time as well.

I have time for 1 more iteration before I am going overseas for vacation, so I hope to build something worthwhile on this past release, and cement some of the ASP concepts I’ve been running through so that when I get back, I haven’t totally forgotten how to do things.

This story didn’t involve writing any production code, but it was a good, first foray into the world of enterprise application design. All I can say for now is that most of the stuff I read was over my head, because there are just too many issues and concepts that I haven’t had a lot of exposure to.

The short version of my conclusion of all this, is that this isn’t the best time to learn how to re-architect the application, for several reasons:

  1. This is not what you’d call an “enterprise” application.
  2. I assume you should have a pretty solid, broad understanding of the basics of ASP and its relevant abstractions, since this essentially involves peeking under the hood and doing things much differently than all the Microsoft books show. It’s pretty clear after reading around a bit that the prescribed Microsoft approach is the use of the drag-and-drop Designer and code generation tools, and that there is a bit of a learning curve to doing things a different way.
  3. What we have now is “good enough.” And if it’s good enough, then there isn’t a compelling reason to improve it, in the face of other more urgent requirements and features.

On the flip side, I do want to learn this stuff at some point, but it will probably be after I feel much more comfortable with ASP, and am out of exploration and trial mode. This may not happen before the end of this project, but one can always hope. :)

Anyhow, here are two articles by Frans Bouma that provided some good perspective and big-picture understanding of entity classes and the domain model approach:

Solving the data access problem

The Database model is the Domain model

Next Page »