How would you initialize the child class from the base classes' parameterized constructor.
Constructor in C#
I update this blog when i am in the development mode, most of the times when I am developing systems, and i find new things that I believe are interesting, I post them on this blog, this helps me a lot too for future references and when i repeat the things i've already done. Hope this helps others too.
Thursday, October 27, 2005
Wednesday, October 26, 2005
a great article on the inheritence in c#. This article is equipped with really kool and understandable code and discussion. Those wanting to get a complete introduction must read this out.
Virtual Functions - new and override - C# The Basics - Beta2
Virtual Functions - new and override - C# The Basics - Beta2
Thursday, October 20, 2005
Have you ever wanted to strip all of the HTML tags from a string? There are many reasons you may want to do this. For example, if you provide a feature on your site where a user can have the contents of a Web page emailed to them, you may wish to strip all of the HTML tags from the particular article for those users whose email client does not support HTML-formatted email.
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML using split and join
'Ensure that strHTML contains something
If len(strHTML) = 0 then
stripHTML = strHTML
Exit Function
End If
dim arysplit, i, j, strOutput
arysplit = split(strHTML, "<") 'Assuming strHTML is nonempty, we want to start iterating 'from the 2nd array postition if len(arysplit(0)) > 0 then j = 1 else j = 0
'Loop through each instance of the array
for i=j to ubound(arysplit)
'Do we find a matching > sign?
if instr(arysplit(i), ">") then
'If so, snip out all the text between the start of the string
'and the > sign
arysplit(i) = mid(arysplit(i), instr(arysplit(i), ">") + 1)
else
'Ah, the < stroutput =" join(arysplit," stroutput =" mid(strOutput,"> to < and >
strOutput = replace(strOutput,">",">")
strOutput = replace(strOutput,"<","<")
stripHTML = strOutput
End Function
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML using split and join
'Ensure that strHTML contains something
If len(strHTML) = 0 then
stripHTML = strHTML
Exit Function
End If
dim arysplit, i, j, strOutput
arysplit = split(strHTML, "<") 'Assuming strHTML is nonempty, we want to start iterating 'from the 2nd array postition if len(arysplit(0)) > 0 then j = 1 else j = 0
'Loop through each instance of the array
for i=j to ubound(arysplit)
'Do we find a matching > sign?
if instr(arysplit(i), ">") then
'If so, snip out all the text between the start of the string
'and the > sign
arysplit(i) = mid(arysplit(i), instr(arysplit(i), ">") + 1)
else
'Ah, the < stroutput =" join(arysplit," stroutput =" mid(strOutput,"> to < and >
strOutput = replace(strOutput,">",">")
strOutput = replace(strOutput,"<","<")
stripHTML = strOutput
End Function
Wednesday, October 12, 2005
A use case is a sequence of actions that provide a measurable value to an actor. Another way to look at it is a use case describes a way in which a real-world actor interacts with the system. In a system use case you include high-level implementation decisions. System use cases can be written in both an informal manner and a formal manner. Techniques for identifying use cases are discussed as well as how to remain agile when writing use cases.
Informal System Use Cases
Introduction to System Use Cases
Informal System Use Cases
Introduction to System Use Cases
The Full-Lifecycle Object-Oriented Testing (FLOOT) methodology is a collection of testing techniques to verify and validate object-oriented software. The FLOOT lifecycle is depicted in, indicating a wide variety of techniques are available to you throughout all aspects of software development. The list of techniques is not meant to be complete – instead the goal is to make it explicit that you have a wide range of options available to you. It is important to understand that although the FLOOT method is presented as a collection of serial phases it does not need to be so: the techniques of FLOOT can be applied with evolutionary/agile processes as well. The reason why I present the FLOOT in a “traditional” manner is to make it explicit that you can in fact test throughout all aspects of software development, not just during coding.
Read more about The Full Life Cycle Object-Oriented Testing (FLOOT) Method
Read more about The Full Life Cycle Object-Oriented Testing (FLOOT) Method
A fundamental concept of the Unified Modeling Language (UML) is that you use different diagrams for different purposes. Class diagrams are used to model the static nature of your system, sequence diagrams are used to model sequential logic, and state machine diagrams are used to model the behavior of complex classes. But what happens when you need to show the behavior of several objects collaborating together to fulfill a common purpose? This is what UML communication diagrams, formerly known as collaboration diagrams in UML 1.x, can be used for because they provide a birds-eye view of a collection of collaborating objects.
Communication diagrams show the message flow between objects in an OO application and also imply the basic associations (relationships) between classes. Figure 1 presents a simplified collaboration diagram for displaying a seminar details screen or page. The rectangles represent the various objects involved that make up the application. The lines between the classes represent the relationships (associations, composition, dependencies, or inheritance) between them. The same notation for classes and objects used on UML sequence diagrams are used on UML communication diagrams, another example of the consistency of the UML. The details of your associations, such as their multiplicities, are not modeled because this information is contained on your UML class diagrams: remember, each UML diagram has its own specific purpose and no single diagram is sufficient on its own. Messages are depicted as a labeled arrow that indicates the direction of the message, using a notation similar to that used on sequence diagrams.
Figure 1

Figure 2 summarizes the basic notation for modeling messages on communication diagrams. Optionally, you may indicate the sequence number in which the message is sent, indicate an optional return value, and indicate the method name and the parameters (if any) passed to it. Sequence numbers should be in the format A.B.C.D to indicate the order in which the messages where sent. In Figure 1 message 1 is sent to the Seminar object which in turn sends messages 1.1 and then 1.2 to the Course object. Message 5 is sent to the Seminar object, which sends message 5.1 to enrollment, which in turn sends message 5.1.1 to student, and it finally sends message 5.1.1.1 to itself. Notice how a recursive connection, or a self connection, is required so that student can do this.
Although Figure 1 applies sequence numbers to the messages, my experience is if you feel the need to use sequence numbers on communication diagrams this is a good indication you should be using sequence diagrams instead. The main difference between communication diagrams and sequence diagrams is that sequence diagrams are good at showing sequential logic but not that good at giving you a “big picture view” whereas communication diagrams are the exact opposite.
Figure 2. Message notation.
[sequenceNumber:] methodName(parameters) [: returnValue]
In you see the Seminar Details user interface object collaborates with the seminar object to obtain the information needed to display its information. It first invokes the getter method to obtain the name of the seminar. To fulfill this responsibility, the seminar object then collaborates with the course object that describes it to obtain the name of the course. In this example I showed return values for some messages but not others to provide examples of how to do it. I’ll either indicate the type of the return value, for example string, or the result, such as seminarName. Normally I wouldn’t show return values on this diagram because the messages are named well – my heuristic is to only model return values when it isn’t clear what the message returns. Better yet I try to find a new name for the message (remember, messages map to operations implemented by your classes).
Another trick I often use is to consolidate trivial messages such as getter invocations. In I modeled the series of getter method invocations to obtain the information needed to display the list of students enrolled in a seminar as the single message getInfo. I also added a note to the diagram to make it clear what I was doing, but I typically don’t do that. Why is this important? Because agile developers will only do things that add value, and defining an exact list of getter invocations wouldn’t have added value.
You draw communication diagrams in the same way as you draw sequence diagrams, the only real difference is that you lay out the notation in a different manner. To tell you the truth I rarely find the need to create communication diagrams although I have found them useful in situations where we didn’t have use cases as the primary requirements artifact. Sequence diagrams and use cases seem to go hand in hand because of how easy it is to model the sequential logic of a use case using a sequence diagram. Communication diagrams seem to be preferred by people with a “structure bent”, people that focus on UML class diagrams or class responsibility collaborator (CRC) cards, because of the similarity of communication diagrams with those types of artifacts. As always, follow the AM practice Apply the Right Artifact(s) and use the most appropriate technique for your situation.
Communication diagrams show the message flow between objects in an OO application and also imply the basic associations (relationships) between classes. Figure 1 presents a simplified collaboration diagram for displaying a seminar details screen or page. The rectangles represent the various objects involved that make up the application. The lines between the classes represent the relationships (associations, composition, dependencies, or inheritance) between them. The same notation for classes and objects used on UML sequence diagrams are used on UML communication diagrams, another example of the consistency of the UML. The details of your associations, such as their multiplicities, are not modeled because this information is contained on your UML class diagrams: remember, each UML diagram has its own specific purpose and no single diagram is sufficient on its own. Messages are depicted as a labeled arrow that indicates the direction of the message, using a notation similar to that used on sequence diagrams.
Figure 1
Figure 2 summarizes the basic notation for modeling messages on communication diagrams. Optionally, you may indicate the sequence number in which the message is sent, indicate an optional return value, and indicate the method name and the parameters (if any) passed to it. Sequence numbers should be in the format A.B.C.D to indicate the order in which the messages where sent. In Figure 1 message 1 is sent to the Seminar object which in turn sends messages 1.1 and then 1.2 to the Course object. Message 5 is sent to the Seminar object, which sends message 5.1 to enrollment, which in turn sends message 5.1.1 to student, and it finally sends message 5.1.1.1 to itself. Notice how a recursive connection, or a self connection, is required so that student can do this.
Although Figure 1 applies sequence numbers to the messages, my experience is if you feel the need to use sequence numbers on communication diagrams this is a good indication you should be using sequence diagrams instead. The main difference between communication diagrams and sequence diagrams is that sequence diagrams are good at showing sequential logic but not that good at giving you a “big picture view” whereas communication diagrams are the exact opposite.
Figure 2. Message notation.
[sequenceNumber:] methodName(parameters) [: returnValue]
In you see the Seminar Details user interface object collaborates with the seminar object to obtain the information needed to display its information. It first invokes the getter method to obtain the name of the seminar. To fulfill this responsibility, the seminar object then collaborates with the course object that describes it to obtain the name of the course. In this example I showed return values for some messages but not others to provide examples of how to do it. I’ll either indicate the type of the return value, for example string, or the result, such as seminarName. Normally I wouldn’t show return values on this diagram because the messages are named well – my heuristic is to only model return values when it isn’t clear what the message returns. Better yet I try to find a new name for the message (remember, messages map to operations implemented by your classes).
Another trick I often use is to consolidate trivial messages such as getter invocations. In I modeled the series of getter method invocations to obtain the information needed to display the list of students enrolled in a seminar as the single message getInfo. I also added a note to the diagram to make it clear what I was doing, but I typically don’t do that. Why is this important? Because agile developers will only do things that add value, and defining an exact list of getter invocations wouldn’t have added value.
You draw communication diagrams in the same way as you draw sequence diagrams, the only real difference is that you lay out the notation in a different manner. To tell you the truth I rarely find the need to create communication diagrams although I have found them useful in situations where we didn’t have use cases as the primary requirements artifact. Sequence diagrams and use cases seem to go hand in hand because of how easy it is to model the sequential logic of a use case using a sequence diagram. Communication diagrams seem to be preferred by people with a “structure bent”, people that focus on UML class diagrams or class responsibility collaborator (CRC) cards, because of the similarity of communication diagrams with those types of artifacts. As always, follow the AM practice Apply the Right Artifact(s) and use the most appropriate technique for your situation.
Project documentation and analysis is the most important part of any project. Without a proper analysis, any project takes more time to develop, is not robust, there's no way to find out if all the milestones have been met. trouble always awaits if a project starts without proper analysis. I have always had interest in analyzing the projects properly although have not been much interested in reading huge books. I want to read all the books about all the tech stuff but it is not humanly possible to read them, now i think no one takes time out to read out something especially when a person works, studies and does a lot of work at the same time.
ah... everyone has a different perspective of life, what can anyone say about anyones lifestyle or priorities!!!
This is an interesting article, would like people to read it out. The link describes what a UML 2 class diagram is in a very precise short and to the point manner.
Introduction to UML 2 Class Diagrams
ah... everyone has a different perspective of life, what can anyone say about anyones lifestyle or priorities!!!
This is an interesting article, would like people to read it out. The link describes what a UML 2 class diagram is in a very precise short and to the point manner.
Introduction to UML 2 Class Diagrams
Monday, September 26, 2005
You must have seen or experienced this thing in webpages that gives you a feeling that you are working on a desktop application, google suggest is an example of what i am talking about. In google suggest, when you are typing the search request, on the fly there opens a drop down list that shows the similar queries and the available responses to the queries!!! How does that happen? Google suggest sends a string request to the server at every key press?? what happens there, the thing kept me busy for hours wondering how it was done. Well after a lot of searching the internet i found AJAX. Ajax is the technique that is used to do neat stuff like that. google suggest is listed on the Google labs page and the technical paper is at
Ajax - Latest trend in web apps
Ajax - Latest trend in web apps
Friday, September 23, 2005
I had this project in which i had to create a web application that was actually a hosting system's panel. The users were in roles and the users were allowed to change the IIS configurations like add write permission directories, create websites, create virtual directories, create and recycle application pools, edit the default documents lists, create MS SQL server, enable coldfusion MX support, etc. All of these had to be done on the fly, i mean the user would be changing the actual system settings on the server that were allowed by the plan.
I used ADSI as an interface to IIS and this like helped me a lot
MSDN link to Programmatic reference to ADSI interface to IIS
I used ADSI as an interface to IIS and this like helped me a lot
MSDN link to Programmatic reference to ADSI interface to IIS
Thursday, September 15, 2005
The Rational Unified Process (RUP) is an iterative software development process created by the Rational Software Corporation, now a division of IBM. The RUP is not a single concrete prescriptive process, but rather an adaptable process framework. As such, RUP describes how to develop software effectively using proven techniques. While the RUP encompasses a large number of different activities, it is also intended to be tailored, in the sense of selecting the development processes appropriate to a particular software project or development organization. The RUP is recognized as particularly applicable to larger software development teams working on large projects. Rational Software offers a product that provides tools and technology for customizing and executing the process.
Rational Unified Process - Wikipedia, the free encyclopedia
Rational Unified Process - Wikipedia, the free encyclopedia
Wednesday, September 14, 2005
Now this is an interesting article for all those who want to manage the domain server via ADSI, It's a great one... if you are in for configuring, adding, editing LDAP entities through your application.
15 Seconds : Learning ADSI - Part 2: Editing Users and Administering Groups
15 Seconds : Learning ADSI - Part 2: Editing Users and Administering Groups
Thursday, September 08, 2005
Wednesday, September 07, 2005
Why Learn about Patterns?
- Thinking and learning about design patterns is a great way to learn the ins and outs of Object Oriented Programming. If you’re not taking advantage of OO features in .Net or Java you’re missing out on a lot of the power of the languages. Patterns are also very important for SOA as well.
- A former colleague of mine used to say that design patterns are “if/then” killers. A lot of patterns shift variations to polymorphism. That might not sound that important at first, but it can do wonders to improve the quality of code (readability, testability, removing duplication, extensibility, etc.).
- Patterns are often a design shortcut. Design patterns are previously described solutions to reoccurring design problems. There isn’t that much new under the sun. Chances are somebody has faced a similar situation no matter what your design dilemma is. Familiarity with design patterns can be a key to unlocking the accumulated design knowledge of many other software designers. It’s kind of like how Optimus Prime had the “Autobot Matrix of Leadership” that held all the memories and knowledge of past leaders (or Mat Cauthon in the Wheel of Time for that matter). Geek points if you understand any of the previous sentence.
- Patterns happen. One of the comments on my previous blog post was that developers don’t learn about design patterns because they are never getting to do “greenfield” development and weren’t involved with the patterns used in the system. That’s probably true for a lot of developers, but the patterns are still embedded in the system. Recognizing the patterns in an existing system can aid in understanding the existing design. Maintenance development is just as much software development as writing new applications. It’s foolish the way we often denigrate maintenance coding.
- Communication. Patterns give developers a shared shorthand terminology to discuss design choices. When someone tells me that a method in an abstract class is a “Template Method,” that communicates a lot of information to me because I understand the intent of the pattern. Even if I didn’t know the pattern, I could quietly google the pattern on my own and understand what my peer is talking about. This benefit can be completely negated if the other developers are not familiar with the pattern in question. If you’re a lead developer, you might invest some time into explaining any design pattern you’re using to the other developers to create a shared understanding. I got into a heated discussion with a developer last year over my decision to use a composite pattern. In the end it turned out his discomfort was largely due to the fact that he wasn’t familiar with the composite pattern.
- Because you might have to be interviewed for a position by me someday and I think they’re important[:)]
- Spouting off patterns can impress the weak-minded.
When authenticating users of a system, it is required that we perform a case sensitive password check on the site. I found this article very interesting, listed out for all of you who are also in search for running a case sensitive query in SQL server.
Method to Perform Case Sensitive Searches in SQL Server
Method to Perform Case Sensitive Searches in SQL Server
In a project I had to parse an excel file (.xls), that contained data, no calculations were there, I used the approach mentioned in this site url.
ProgrammingTalk - How to retrieve data from excel file to ASP page?
ProgrammingTalk - How to retrieve data from excel file to ASP page?
Web Programming, A look around the File System Object, i needed this in one of the projects i was working, I had to display the contents of the folder hosted on the server, and the options given were to view the file, view the file descriptions and etc. This link helped me in deleting the file from the server.
DevGuru VBScript Method: FileSystemObject.DeleteFolder
DevGuru VBScript Method: FileSystemObject.DeleteFolder
Subscribe to:
Comments (Atom)
Blog Archive
-
▼
2005
(24)
-
▼
October
(10)
- How would you initialize the child class from the ...
- a great article on the inheritence in c#. This art...
- Have you ever wanted to strip all of the HTML tags...
- How to fix bugs in the Live / Production environme...
- Google Groups : microsoft.public.inetserver.iis
- A use case is a sequence of actions that provide a...
- Building Object Applications: Your Step-By-Step ...
- The Full-Lifecycle Object-Oriented Testing (FLOOT)...
- A fundamental concept of the Unified Modeling Lang...
- Project documentation and analysis is the most imp...
-
►
September
(14)
- A handy kit for javascript tools. The JavaScript ...
- You must have seen or experienced this thing in we...
- I had this project in which i had to create a web ...
- A helpful DNS configuration literature. Chapter 4...
- The Rational Unified Process (RUP) is an iterative...
- Now this is an interesting article for all those w...
- Jeremy D. Miller -- The Shade Tree Developer : Lea...
- Jeremy D. Miller -- The Shade Tree Developer : Lea...
- Why Learn about Patterns? Thinking and learning ab...
- A helpful text to deploy a web service.
- When authenticating users of a system, it is requi...
- In a project I had to parse an excel file (.xls), ...
- Web Programming, A look around the File System Obj...
- My first lesson as a blogger
-
▼
October
(10)