Thursday, May 31, 2007

Silverlight Learning Guide

SearchVB.Com has a whole host of information concerning Microsoft's Silverlight.

Such things as tutorials and blogs. Read about them here.

Wednesday, May 30, 2007

MS Surface

Oh, I'm so drooling over this:

I'd love to have an interface like that. I hope they become reasonably available in the very short term future.

Friday, May 25, 2007

Stored Procedures v. Inline SQL

One of my coworks loves his stored procedures, and this is the coworker that set up the SOP for my current project. Which of course means that everything is done using stored procedures.

And of course, this is also Oracle back end for a .NET front end which makes it even so much better.

Which of course means that I'm now writing lots and lots of stored procedures for Oracle to do even the simplest query such as straight SELECT by ID.

Now, I can see the benefits to using stored procedures, things such as not needing to recompile to make changes to your data access and less round trips to the data server.

Yet, I don't think that those benefits outweigh the costs of using them.

If I was using SQL Server, I could just open up the stored procedure in Visual Studio (especially 2005) and make the changes there. Yet, for Oracle I have to open the file in some other editor (or I could use VS) such as Notepad++ and then log into SQL PLUS. Make the changes in Notepad++ and then type this long string of characters to make the changes onto the server.

Frankly, I see nothing wrong with having inline SQL. It makes things easier to read and maintain.

And frankly, with things like SQL Server using JIT compilation in their 2005 version, it's not even that much of an decrease performance wise over stored procedures.

As for the editing of things. I have found that it's rare that I need to make changes to the underlying data stream and not make changes to the compiled code that uses that stream.

Now, do note that I'm not saying that we should abandon all stored procedures and use only inline SQL. That's just silly. There are things that would be insane to do using inline SQL just because of their complexity.

Yet at the same time, it's stupid to have an INSERT/UPDATE statement (or even worse, a simple SELECT) in a procedure just because you want everything to be stored procedures.

Monday, May 21, 2007

Still Elbow Deep In Oracle...

Well, I'm still struggling with the differences in Oracle and SQL Server.

I can admit that Oracle does have quite a few nice features to it. It's a great system.

Yet SQL Server beats it hands down as far as ease of use is concerned. Especially for those of us who don't use it on a daily basis.

For example, I want to find out what types are the columns of a given table. In SQL Server, I'd just open up either Server Explorer or Query Analzyer and lo and behold they'd be right there. Heck, I could even just connect VS 2005 to the database and have access to that data.

Oracle's SQL Plus? No clue. I'm sure there's some arcane SQL command to get that information, but I've yet to discover it on Google

UPDATE: I found out how to get that type of data. In SQL*Plus (Oracle's odd command window for stuff) you run the command DESC and it provides a description for the specified table (column name, type and if it allows nulls).

Oh well. I guess that's why they have the WEB Interface.

Thursday, May 17, 2007

Elbow Deep In Oracle...

My company is a MS shop. We use .NET and SQL Server on almost every project. It's the standard development environment that we keep.

So of course, we have a client that wants an Oracle backend.

So all day yesterday I was tripping over the differences between SQL Server (and Transact-SQL) and Oracle.

And there's a lot of little things that one can trip over. Such as:

  • Using := instead of = for assignments
  • Packages (and the @ command to run them)
  • That whole output from Stored Procedures thing
  • Using END IF rather than BEGIN/END around IF logic blocks
  • ELSIF rather than ELSE IF

And those are just the ones off the top of my head. I think what makes it the worst is the fact that ultimately they are so close to one another. It's like the difference between Java and C++. There's just enough similarities in the syntax to confuse you when you're switching back and forth between them.

Oh well, it's back to writing stored procedures for me.

Tuesday, May 15, 2007


I'm often looking at ways to help my children succeed in this life. And of course one of those ways is making sure that they are proficient with a computer.

Imagine my joy when I discovered that some folks at MIT went out of their way to create a programming language focused on children.

It's called Scratch, and uses a graphical approach to developing the programs.

I'm interested in this, and think I'll grab it for my eldest son soon.

Of course, I also have to wonder if the language will 'grow' with the boy. After all, drag and drop programming blocks is one thing, but being able to code the concepts that those blocks represent is something else all together.

If Scratch (and it's associated IDE) can allow the blocks to degrade into smaller and smaller concepts as the child becomes more proficient with programming, then I'd be all excited about that. Well, apparently their site is currently down due to extra traffic from the BBC and DIGG, so I haven't gotten a chance to play with it, and find out the answers to my thoughts listed above. I guess I'll try again in a few days, and see if I can grab a copy then.

Monday, May 14, 2007

CogHead and other Miscellenia

A few weeks ago a webapplication building system came stumbling across my RSS Reader. It was an interesting company by the name of CogHead. I spent a few hours playing with it, and set myself up a Software Bug Tracking system. I like it as a concept, but am hesitant about the usefulness of the application. It's pretty and dynamic and I can create my own little application there in the website, but it's still slow.

I realize that it's a website, but just the creation process is tedious and seems to take forever-especially when you consider that it's built in FLASH. Likewise, what you're supposed to do with a screen while working on the UI or Data Layer is not always clear. In fact at one point, I managed to find a screen where I couldn't enter or modify data and I could actually make the screen go away. Since then I've not been able to replicate that, so I'm not sure if it was just something idiotic that I did or what.

I think I'm more interested in Silverlight (Microsoft's answer to Flash) and it's inherit support of the .NET Framework. On the downside, that's another plugin which will be slowing down my browser.

Then you have to add in Sun's new JavaFX.

Frankly, there's too much being released in too short of a time. I had just gotten comfortable using .NET 1.1 when 2.0 was released, and before I had even finished a single project in 2.0 then 3.0 was released. Additionally, MS has pushed out Expressions and Silverlight. It's enough to make the mind boggle, and as a poor developer I can't seem to catch up. I don't have enough time in the day to code, do family stuff, read, write and learn the onrushing tide of new technologies.

Oh well, such is the mysteries and hardships of being a developer.

Thursday, May 10, 2007

Still More Interfaces...

I know, I'm on an interfaces kick. Well, that's what I've been working on/with all week, so it's perfectly understandable.

Anyways, I'm building that interface system so that I can treat all my custom server controls for the project in the exact same way. Well, I came across the realization that I needed to be able to raise events. Basically, there's a specific framework in the application for displaying messages to the user in the same way for every message. Well, to get information from the depths of some of these controls, they were raising events.

And since I'm treating every control in the exact same manner, I can't make allowances that some controls will implement the event and not others. Therefore, the interface must declare the event.

Which ended up being surprisingly simple.

First I built the EventArgs class whose information is being passed back and forth for. Then after that I defined the delegate:

public delegate void DisplayMessageEventHandler(object sender, DisplayMessageEventArgs e);
Then after I had my delegate defined, I added in the event code into the interface :
event DisplayMessageEventHandler DisplayMessage;
Like I said, it was surprisingly simple.

Wednesday, May 9, 2007

Inheriting Interfaces

As I'm sure I said earlier, I'm currently going backwards and implementing an Interface on all the custom controls of one of our projects, and implementing even standard controls with this interface, to make things a tad easier to maintain and to shorten the code base a bit.

It was going happily along, until I stumbled across a set of classes one of which inherited from the other.

In C# that's not a problem, I wouldn't have ever even known. But of course, the project is in VB.Net and it threw up compiler errors. Apparently, in VB.Net you can't implement an interface in a class if a base class already implements the interface.

So, disturbed by this glaring problem in the VB.Net design, I went to our friend Google to find an answer. Much to my enjoyment (and almost amazement) Google actually provided an answer to my problem this time, and it was the top search return, so I could have even used the "feeling lucky" button.

Anyways, the return result was this article, entitled 'Re'implementing Interface Implementations: VB.Net vs. C#.

Glee! A solution has been proposed. And apparently it's the simplest solution possible. For VB.Net all one has to do is override the base class's method which implements the Interface's method and it's all good to go.

Tuesday, May 8, 2007

An Interface here, an Interface there....

I'm currently working on retrofitting an application which dynamically creates controls with an interface which allows those controls to be created even more dynamically.

Currently, we have a whole host of functions which deal with insatiating the controls and then getting the attributes for the controls and then even more dealing with saving and loading the data from those controls.

My solution to this maintenance nightmare is the interface. Using the ACTIVATOR object, and a couple of support classes, I've streamlined the process of creating these dynamic controls into something that takes a single function call for instantiating ALL the control types. And single high-level methods to do attribute assignments, loading and saving of data.

The magic is done via the fact that a lot of our controls are custom built server controls. So, we're already down in the low-level bits and pieces of the Framework and it's a simple matter of creating and implementing the interface.

What this does for maintenance, is make the controls even more of a blackbox than they were previously. Assigning the various attributes, is a matter of passing that data in a DataSet to a ReadOnly Property. Loading the data is giving a single specialized class to the control. And saving the data, is a matter of reading from a specialized collection from the control. Then the control itself is responsible for what happens with the passed in data.

Monday, May 7, 2007

SQL Server Express

As I noted in my last post, I inherited a new pc from a co-worker who quit. A beautifully quiet machine.

Well, at lunch the other day, I decided to do a little work on my freelance project. Not that big of a deal, it's an ASP.NET 2.0 website, and I keep a copy of all the data structures in a SQL Server Express database for development purposes. That way, I have my development system with me all the time (on a thumbdrive) and I don't have to worry about using my employer's bandwidth if I do work on it at lunch.

Imagine my surprise when I went to launch the thing in debug mode and it immediately collapses in error on a DropDownList's databind call.

So, I went home, it launched perfectly from home and everything worked perfectly.

Now, I was really confused. Well, I have a project I'm working on which uses a SQL Express database as a datastore. And lo and behold it fails to launch as well.

Getting angry, I tried to open the server up in the SQL Management tool only to get shot down there by some arcane error message.

And that's when I remembered that the machine was probably set up under my co-workers account. Which means that his corporate account is the one with permissions to the SQL Server running on this box. I have yet to test my theory (which as far as I can tell means uninstalling and then reinstalling the SQL Server 2005 toolset.

If anyone else out there has any other ideas on what can be done, I'll happily listen to them, as it will probably be Friday at the earliest before I have a chance to deal with this problem (the joys of getting ramped up on currently ongoing projects - even if you're one of the ones that laid the groundwork for the system).

Saturday, May 5, 2007

Nothing new to report...

I would have a witty story or something here. But I worked on corrections for an SDD for almost the entire time I was at work. Which of course wasn't long, as I took vacation time and went to see Spider-Man 3 and the company had a celebration for getting one of our major contracts to CMMI ML 3. Then cooking dinner and family time, followed by a trip to the store and then some odds an ends that I've been putting off to work on my freelance project, means that I didn't get any work done on my freelance project.

I did do a bit of help on one project, because of some stupid things Oracle did in their data access classes for .NET. I'll talk about that tomorrow though, it's too late at night for thinking about that right now. I don't want to get frustrated at Oracle, and not be able to sleep.

Friday, May 4, 2007

Silence in my office

I got a second LCD monitor for my office at work, so now I'm flying high with two of the things. They're quite nice and pretty and bright, and I'm enjoying them immensely. I also got a new PC. I had had the previous one for just shy of 3 years now. But what amazes me about this thing is that I can't hear it.

At all.

If I didn't know better I would swear this thing just doesn't have a fan in it or a heatsink, it's just that quiet. Of course that means I have to spend a decent amount of time reconfiguring the machine to work for me. I use a lot of custom settings in all the applications that I use on a consistent basis. But that's a fun all of its own.

Thursday, May 3, 2007

A Surprise for a Lead Software Engineer

The wife is sick this week - so I missed work Tuesday which postponed a meeting until this morning (well, technically, it was yesterday morning now, as it's well after midnight when I'm posting this). I was hoping that it would be a quick thing and she'd be back on her feet after having a day's rest - but she wasn't. So I had went down to the office for a quick meeting and after that took her to the hospital. Apparently she has a rather nasty kidney infection. She's on an antibiotic now, so hopefully she'll be feeling better real soon.

Anyways, my main project at work is now over. The deliverable was a number of requirement and design documents, with any coding we accomplished basically icing on the cake. What this means is that I get to spend a few more hours cleaning up my SDD and then it's off to another project.

Or a group of them at least.

One of my co-workers who's wife is about to have a child is lead Software Engineer for three ASP.Net projects. And I'm getting shoved over onto those projects. Which means that while he's out on 'maternity leave' that I get to do that lead Software Engineer stuff for those projects.

Yeah, go me.

Anyhow, the first of those projects has been running for a few years now, and has gone through three iterations on the underlying processing engine and two iterations on how it generates the end product. I was highly involved in the design and development of that processing engine - with the current thing being a series of dynamically created controls which query the user for information to generate the output, and all of this is happening on a single ASPX page.

It's a beautiful design and I'm quite fond of it.

Yet, there were certain requirements which made that solution viable for that product. First it was a Web Application not a Website. Secondly, it had a linear flow of data collection. Third, the user should always enter the application in the same way. And finally, the data is loosely coupled to the database.

What that last means is that there are no distinct data structures in the database that relate to a given page of the Web Application. All data is stored in the same data table, with the system not caring which page it came from.

Once the design was implemented, such a thought wasn't nearly as complicated as it sounds.

Anyways, the latest project's prototype (BlackBelt) is being built in a similar manner. More or less, a stripped down version of the first project's design.

Of course, while I was being briefed on BlackBelt, I pointed out the flaw in his thinking. Namely that the new project doesn't meet all the needs of a site which that design would be useful for. BlackBelt is not a linear data collection tool, it collects a certain set of data on a single page. That page would have no relation to any other page. Then the data structures in the database are tightly coupled to the pages (i.e. every page has a table or view which it directly reads/populates). Finally, the user may wish to enter directly to a single, specific page.

For example, if User A only uses Page 3, and that's the only page he ever uses, then he would want to create a link to Page 3. With the current engine, that is just not possible. There's only 1 page - and it requires PostBack information (the user selecting which page to view) for the application to know what controls to display. Basically, what that means is that for User A to get to Page 3 requires the user to hit two different pages of the application. That's not a good usability point right there.

Anyways, the point of my story is that as I was telling him that we shouldn't use my design for this application, his face kind of got that confused, deer-in-the-headlights look. Apparently, it kind of shocked him that I was telling him that it was a bad idea to use my design for this site, especially since I pushed him into using it's forerunners in the first two iterations of that first project.

Oh well, BlackBelt is just a prototype anyways. Created solely to derive requirements so we can build the real product.

Tuesday, May 1, 2007

Ajax.Asp.Net and Me...

Okay, I have to wonder what on earth I'm doing wrong with this thing. I have an Ajax.ASP.Net UpdatePanel and UpdateProgressPanel on an ASPX page. No, big deal - the runtime is supposed to handle all of that fun stuff automatically.

I made sure that I had my ScriptHandler and everything is situated the way it's supposed to be according to the documentation found on the website.

But it doesn't work.

Oh, I get the UpdateProgressPanel to display in Firefox - but Firefox has other issues with my dynamically created DIV's not doing what I expect them to.

So, of course, being the enterprising programmer that I am, I went and copied the code from the Ajax.ASP.Net documentation page for UpdateProgressPanels. Created a page on my site and tried it. Low and behold, it works perfectly.

So, now my new issue to discover is just how I'm screwing up the code. After all, it's not that complicated. This is what I have:

<asp:scriptmanager id="ScriptManager1" runat="server" enablepartialrendering="true">
<asp:servicereference path="getData.asmx">

<asp:updateprogress id="UpdateProgress1" runat="server">
<img src="" alt="Loading..." align="texttop" border="0" /> <strong>Loading...</strong>

<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional">
<triggers> <asp:asyncpostbacktrigger controlid="btnBack8" eventname="Click"></asp:asyncpostbacktrigger></triggers>
</asp:updatepanel><div class="InnerContentArea" id="Back8Data">
<asp:label runat="server" id="lblBack8Data"></asp:label>

<asp:updatepanel id="InsertEmployeeUpdatePanel" runat="server" updatemode="Conditional">
<input runat="server" id="gameID" type="hidden">
<input runat="server" id="GameName" type="hidden">
<input runat="server" id="HighNumber" type="hidden">
<input runat="server" id="NumberDrawn" type="hidden">
<input runat="server" id="DrawsTableName" type="hidden">
<input runat="server" id="GameTypeID" type="hidden">
<input runat="server" id="Numbers" type="hidden"> </contenttemplate></asp:updatepanel>
Like I said, not that complicated. Yet for whatever reason, it's not behaving the way I would expect it to. In ASP.Net 1.1 controls inside the PANEL control were accessible but the controls that I place in the LOGINVIEW control I have to jump through hoops (well, ctrl.FindControl("ControlName") - which counts as a hoop) to get at it. I have to wonder if it is some arcane thing like that that is causing my issues.

Oh well, I think I'm going to go watch a movie rather than continue pounding my head over this.

Blog Widget by LinkWithin