Guys, did you hear about Atlas? Once again technology evolves faster that I grasp existing concepts :(
I knew that Ajax is a fantastic technology; it turned out that Microsoft knows it as well :)
See the book: "Foundations of Atlas: Rapid Ajax Development with ASP.NET 2.0"
Thursday, December 15, 2005
Atlas: Rapid Ajax Development with ASP.NET 2.0
Monday, December 05, 2005
Using MS Indexing Server to query multiple catalogs
Guys, I've just resolved one of the most difficult errors I ever got. It was partially due to my bad English, though. But it was mostly due to idiots' Microsoft style of software development. Every time, when you start to do something advanced using some MS technology you're finding that it is not really documented and there is no info even on Google - just because no one uses MS software for advanced development... I remember one case when I was told to use Application Role and Connection Pooling with MS SQL Server 2000. We started to get some irregular type of errors; identical queries returned errors first time and work on subsequent attempts. I was happy to guess that there should be something wrong with Connection Pooling, like not releasing some settings... And we immediately found on Google that there is a known SQL Server bug which does not allow using Connection Pooling with Application Roles. No way.
OK. Back to what I found today: We have a simple ASP interface for MS Indexing Server to search some catalogs for some documents. Someone wrote it in the past; I never worked with Indexing Server (I remember someone played with it in ADI; Tom do you remember?) I was told to modify this interface to be able to search in all catalogs. Since I didn't want to rewrite all the pages, I started to read MSDN in hope that Indexing server has a support for doing that. And yes, it does: MSDN says, "The catalog name can be the name of a directory on the local computer. You can specify more than one catalog name by separating each name with a comma." I modified an ASP code making comma-separated list and immediately got "CreateRecordset error '80041827' Mismatch in cardinality of machine(s)/catalog(s)/scope(s)" error. Here's where my bad English didn't allow recognizing a source of error immediately. I started to search Google and MS Knowledge Base for this error - no info. Nothing meaningful at all. I suspect that as usual no one actually used this slightly advanced approach with MS software - as usual. I was going to give up on my attempts and tell my boss that it' snot doable in a short period of time... But suddenly I understood the error: I set Catalog property as a comma-separated list... maybe folders (scopes) should be set as comma-separated list as well. Using Utility.AddScopeToQuery(objQuery, strPath[,strDepth]) with strPath set as a comma-separated list did not help. But applying objUtility.AddScopeToQuery() several times (the same number as a number of catalogs) did help! Hurrah! I found a solution!
Thursday, December 01, 2005
An excellent site for ASP, .NET, and ColdFusion developers
Guys, I've just found an excellent site for ASP, .NET, and ColdFusion developers - xefteri.com. I was searching for MS Indexing Services bug description and found this detailed article. But there's much more: articles, forums, etc. It is run basically by one guy!
Thursday, November 17, 2005
.NET positions
Guys, I was on an interview with a guy from HireStrategy. He said they have several excellent .NET job opportunities. Since I'm still not fluent enough with .NET I would be happy to give you their contact info. Please contact me directly if interested.
Friday, October 14, 2005
Fully qualified names in MS Access query
Guys, did any of you ever noticed that in MS Access query written as inline ASP code using fully qualified names (like TableName.FieldName) [in SORT BY clause] makes it to work faster [in case a query joins more than one table]? I guess I saw it today. Maybe Access doesn't need to determine each time which table you're talking about... Or maybe I'm just dreaming...
Inner-Browsing? XMLHTTPRequest? AJAX is the word!
I was suprised at the speed of development of technology once called as Inner-Browsing: Extending Web Browsing the Navigation Paradigm by Netscape DevEdge. I created my postXMLHTTP() JavaScript function which utilizes XMLHTTPRequest technology a couple of years ago I used it sucessfully in several PHP (including an administrative interface for my photo gallery) and ASP applications.
Now I fell behind once again. Technology evolves at great spead and powerfull standards for inner-browsing and new data excahnge formats emerged. Now the name is - AJAX. Today I found the following great link: PowerWEB LiveControls for ASP.NET. They use remotely generated script to replace the standard postback with a non-refresh callback. By the way I believe that this will be a built-in feature of ASP.NET 2.0...
Please read a small article I wrote some time ago. I placed it into my photo gallery developed in PHP/MySQL because gallery's administrative interface uses XMLHTTPRequest heavily.
Thursday, October 13, 2005
Search engine friendly URLs using ASP.NET (C#.NET)
Here's an article which could be helpful for .NET developers: Search engine friendly URLs using ASP.NET (C#.NET).
Goal:
Instead of sending parameters like http://www.mydomain.com/?pageid=4 which is not search engine friendly, we want to change it to http://www.mydomain.com/page4.aspx
Similar thing is well known on Apache world and is called MOD_REWRITE. It could be interesting to compare these two technologies.
Andrew said, "Blog It!" :)
I was working with Andrew for just several months in Enterprise Database Corporation (2-programmer's company :)). But it was an excellent time: Andy gave me ideas and I implemented them (arguing). Now I'm glad to welcome him here.
I sent Andrew a message and his answer was, "Don't tell me ... blog it!" So, here's what I sent:
"Andrew, I saw on your Wiki that you are interested in Design Patterns. I think I'm interested too. I bought a couple of books and going to study. I feel more and more that I'm reinventing the wheel, that I'm continuously performing similar tasks but cannot tell exactly what is common between them."
Andrew answered:
"If you bought the Gamma et al book, return it. Everyone says "Head First Design Patterns" is the best to start with. Then "Patterns of Enterprise Application Architecture " by Fowler.
See his Refactoring post over there.
Refactoring
I just spent the last day and a half fixing some bugs and adding some features to a relatively simple VB6 application. The first half day was really stressful because the code was not up to my very high standards - 300+ line routines, no objects, schizophrenic routines (save also validated), operational data split between memory and screen controls, etc. I couldn't understand the logic nor the functionality. Then it hit me ... REFACTOR!
I read Martin Fowler's book, Refactoring over the summer and it gave structure to a practice I already followed and renewed my interest in continuing. For those who are not familiar with the term refactoring, it is the process of changing code structure without changing the behavior to increase legibility, decrease complexity, etc.
Back to my hell, one piece of functionality I had to add involved the followng code:
If Not IsNumeric(tvItems.Tag) Then tvItems.Tag = -1
If CInt(tvItems.Tag) <> tvItems.SelectedItem.index Then
If tvItems.Tag <> -1 And Me.chkIgnoreThisJob <> 1 Then
...
I knew I could figure it out if I beat my head against a wall for a few hours, which I actually started doing (by actually trying to understand the code). Then I took a different tack. I realized that "Not IsNumeric(tvItems.Tag)" actually meant we do not know which item is selected and that "tvItems.Tag = -1" actually meant no job is selected, so I wrote the following functions:
Private Function WeDontKnowWhichJobIsSelected() As Boolean
WeDontKnowWhichJobIsSelected = (IsNumeric(tvItems.Tag) = False)
End Function
Private Sub SetThatNoJobIsSelected()
tvItems.Tag = -1
End Sub
and changed the original code to read:
If WeDontKnowWhichJobIsSelected Then
SetThatNoJobIsSelected
End If
If CInt(tvItems.Tag) <> tvItems.SelectedItem.index Then
If tvItems.Tag <> -1 And Me.chkIgnoreThisJob <> 1 Then
...
Can you see where this is going? Eventually I added a few more functions and the original block of code looked like this:
If WeDontKnowWhichJobIsSelected Then
SetThatNoJobIsSelected
End If
If TheSelectedJobHasChanged Then
If AJobIsSelected And IgnoreThisJob = False Then
...
Now the code code was completely clear and I knew where to make my change. Not only that, but I knew life would be easier for the next person.
So the real purpose of this story is to ask the following questions:
- Is there anyone else who does this?
- Did you know you were doing it?
- Are you glad you do it?
- Will you do it in the future?
- What is the airspeed of an unladen swallow?
Andrew
Monday, October 10, 2005
Friday, October 07, 2005
Test, test, test...
Speaking English:
Three witches watch three swatch watches. Which witch watches which swatch watch?
... and Russian (UTF-8):
Три ведьмы разглядывают трое часов "Свотч". Какая из ведьм разглядывает какие часы?"
Hello guys!
For a long time I wanted to have something convenient to be able to share our thoughts on software (Web) development issues. Andy Marshall suggested me to use Wiki but for now I decide to use this blog. (I'm a big fan of Google software and this one was created or associated wth Google.)