ShowUsYour<Blog>

Irregular expressions regularly

March 2003 - Posts

The big list

This is a great list of .NET tools and resources...

http://dotnetweblogs.com/FMARGUERIE/Story/4139.aspx

Remembering your roots

Here is a link to the very article that got me started down the programming path :-)

I can still remember when I first printed out that tutorial and spent nearly 2 weeks trying to get a result from a SELECT statement to appear on a Html page.  Back then I honestly thought - "once I get the SELECT statement working I only have to get an UPDATE statement going and I'm home!".

Now look at me :-)

TaskVision and an ever-increasing learning curve!

Earlier I mentioned my dilemma over how I would handle data collisions when re-synchronising an offline client via a WebService. Jesse offered some advice as to how this might be done. Thanks Jesse!

I've since poured over the TaskVision code and found that they demonstrate an excellent way of handling this very issue. Basically, I can enumerate the DataRows and, if an exception occurs, use the SetColumnError() method to apply a rowerror. I also re-assign the values from the database and accept them, *then* re-apply my proposed changes (but not accept them). After my updates are complete I return the DataSet to the client who can inspect the DataSet to see whether errors are present and manage the changes themselves.

For anyone interested in seeing the TaskVision code, take a look at the UpdateTasks() method in the WebService.

Designing Applications and Services

What a week I've had! Even with the massive learning curve that I've had over the past 2 years, I can safely say that I've learned more in the past week than in any other *three week* timespan in that period!

For those that haven't been following my blog, let me start by explaining that I've just completed my 70-306 exam (Windows Applications) and am now studying for my 70-310 exam (Web Services).

My week started by tackling Remoting - a topic that I've been quite fearful of; thankfully Ingo stepped in with a useful link that led to my first Remoting app. From there it only gets better...

After building my first Remoting app my employer came to me and asked whether I'd be interested in exposing an application that was written in VB6 via a WebService, and writing a Windows Client to consume the Service. This tied in supremely with the WebServices learning that I needed to do for my 70-310 studies and allowed me to consoldate the learning I did for my 70-306 studies. It also meant that, for the first time, I was exposed to the following issues:

  • COM Interop
  • Serviced Components
  • Web Services
  • SOAP Extensions
  • XSD

The following articles and links provided very useful information while I was building the application and learning about the surrounding technologies and standards:

Although it has been a huge week, it's also highlighted many areas in which I'm lacking! Specifically, architecting distributed applications. To understand what I mean, consider the following scenario:

You have created a WebService to expose certain functionality of an existing (VB6) application. The strongly typed collections and objects in the existing app. cannot be directly exposed because they are not serializable. The remote clients that consume the WebService must be able to work in a disconnected mode on the collections of business objects and, at a time determined by the client, synchronize, via the WebService, with the central application. Data collisions may occur due to some of the central objects being deleted or closed and the Smart client application must be notified of these exceptions.

So, in the previous example, you decide to submit a strongly-typed DataSet of rows back via the WebService when synchronizing. You then enumerate the rows of the DataSet table and create instances of the custom business objects. On each business object you call its Save() method. What does your WebMethod return? Does it return:

  • A) True to indicate atomic success, False to indicate atomic failure.
  • B) A DataSet of errors. If the DataSet is empty then no errors occurred.
  • C) An enum representing the status of the operation.
  • D) Other?

I haven't as yet decided exactly how to manage the operation, so I'd love to hear any ideas that others might have as to how I might handle the submission and subsequent reporting. What I intend to do in the meantime is to re-read the appropriate sections of the Application Architecture for .NET document and see if it can shed any light.

Remoting is *still* Whacky!

...but a little less so :-)

The other day I wrote my Remoting is Whacky post and Ingo was kind enough to point me to a free chapter of his Advanced Remoting book.

This has cleared up many things for me, mostly because it is quite a bit more "code intensive" than the MCAD/MSCD Study guide content.

Here's my first remoting application; it's a Server Activated, Single instance server object - isn't she a beauty! :

Here's my first Remoting tip... if you decide to write your Server app as a Console application, make sure that you do a Console.ReadLine() before running the Client app; lest you be presented with a message like:

The underlying connection was closed: Unable to connect to the remote server.

Thanks Ingo!

Using Embedded Images in ASP.Net V2

What can I say?  It's code! :-)

[Wes' Puzzling Blog ]

Remoting is Whacky!

This week I resumed my 70-310 studies and finished off the chapters on Windows Services and Serviced Components.  These were both very valuable areas of learning for me and, along the way, many of the questions that I'd had in the past - particularly about COM+ services - got cleared up.

I also spent a good amount of time "burrowing" into the next section with is on - <insert sinister sound /> - Remoting.  From 40,000ft I have no real trouble understanding the various Remoting pieces and how they fit together; it's when you hit the ground and understand the finer details that your head simply starts to spin.

I think that my biggest problem with Remoting is that I just don't get it!  All of the apps that I build are like the starter kits (TaskVision, ASP.NET Starter Kits, etc) where Remoting just isn't considered a part of the picture.  If you need a Type, you just reference it in your Project!

Hopefully, by the end of this section I will have been liberated to the virtues of this little-understood piece of .NET framework architecture.

P.S.  While I'm working through the chapter I've also got 1 eye on the Remoting FAQ's that Ingo has created.

Week in review

Couple of milestones this week... first, I started my first GotDotNet Workspace to build the DevBuddy applciation:

WorkSpace home:

http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=d56f6905-0034-40d2-ab2a-67a853f62cc3

DevBuddy initial mockup:

http://www.flws.com.au/DevBuddy_m.jpg

I also helped to roll out a new look-n-feel for the RegExLib.com site ( http://www.regexlib.com ).  Steve Smith has got some great ideas for new functionality that will be implemented in the coming weeks - such as the ability to add comments to patterns and other useability related items.  This week we implemented a new navigation menu bar as well as categorization of Patterns.  Drop by and check it out; let me know what you think :-)

Learning, learning, learning :-)

This week I had to write a Web Service application to expose the business logic from a current application we had written as a VB6 library app.

This was an excellent opportunity to bring together many of the skills that I had learned while studying for my previous 2 .NET certifications as well as the one that I'm currently studying for (70-310).

I'd sort of worked myself up a bit initially because the project required me to use services that I'm not really all that well acquainted with such as: the registry, COMInterop and COM+.  Thankfully - after a bit of reading - everything turned out fine!  Our VB6 app is now ready to take on the world dressed as either an auto-updating WindowsForms app, an ASP.NET application or even (down the track) an application running on a Pocket PC.

What a world! :-)

Link of the day....

http://nhatrangatoz.vietnamfree.com/download/CsharpComProg.pdf

A blog to keep your eye on?

I noticed this weblog this morning while doing my daily "knowledge trawling" over my first cup of coffee:

http://dotnetweblogs.com/Jmoon/

I've read a lot of that authors stuff on 4Guys and it's always been good, practical advice.  Some of his more prominent stuff was on regex's and a series of articles on OO and Inheritance in the (very) early days of .NET.

Welcome aboard Ian!

More Posts Next page »