Subscribe by Email


Showing posts with label Object Oriented. Show all posts
Showing posts with label Object Oriented. Show all posts

Wednesday, October 17, 2012

Is there any problem in using scripts created on v6.0 to 6.5 or higher versions?


In some cases, it may happen that while trying to automate a java swing application using an early version of silk test such as the silk test 5.0.3. You found that the objects and controls in the application window of the application under test or AUT might not be recognizable by the silk test. 

This is just an example of problems of such category and at times you may wonder if the higher versions such as the silk test v 6.0 or silk test v 6.5 are suitable for automating your application or not? Or does the silk test comes with some extensions or add – ons as an alternate for overcoming such situations. 

The version 6.0 of the silk test is known to have some bugs in it, however, the Segue software has known to resolve these known issues. Actually, advancing form a lower version to a higher version of the silk test must not pose a problem. 
Though this is a general statement that we made on the basis of observation of several instances, it is not necessary that it should turn out to be true in all the cases. You may face some problems with the scripts that will work on an earlier but not on higher versions such as 6.0 and above because the object recognition patterns in both of them are not the same and vary from version to version. 

There are certain situations where the two paths of the script might be used for performing the same action but based up on the version. 
The silk test version 6.0 and silk test version 6.5 are somewhat similar and though no problems are experienced in advancing from version 6.0 to version 6.5 of the silk test. 

The various client forms of silk test are available such as those stated below:
  1. Silk test classic: This client of the silk test makes use of the domain specific language called “4test” for scripting of the test automation scripts. This language just like the C++ language is an object oriented language. Just like C++ it also makes use of the Object Oriented concepts such as following:
a)   Inheritance
b)   Classes and
c)   objects
  1. Silk 4J: This client of the silk test enables one to follow test automation by using java as the scripting language in eclipse.
  2. Silk 4 net: This client of the silk test also enables one to follow test automation by using VBScript or sometimes using C# as the scripting language in the visual studio.
  3. Silk test work bench: This client of the silk test enables the testers to carry out the automation testing using VB.net as the scripting language as well as on a visual level.
Below stated is the list of the silk test versions that have been released till now:
  1. Borland silk test 13- june 2012
  2. Micro focus silk test 2011 – November 2011
  3. Micro focus silk test 2010 R2 WS 2 – may 2011
  4. Micro focus silk test 2010 R2 – December 2010
  5. Micro focus silk test 2010 – july 2010
  6. Silk test 2009 – august 12, 2009
  7. Silk test 2008 SP1 – jusly 2008
  8. Silk test 2008 – april 2008
  9. Silk test 2006 R2 service pack 2 – September 2007
  10. Silk test 2006 R 2 service pack 1 – june 2007
  11. Silk test 2006 R2 – January 2007
  12. Silk test 2006 – September 2006
  13. Silk test 8.0 – may 2006
  14. Silk test 7.6 – September 2005
  15. Silk test 7.5 – june 2005
  16. Silk test 7.1 – October 2004
  17. Silk test 6.5 – November 2003
  18. Silk test 6.0 – November 2002
  19. Silk test 5.0.1 – September 1999
  20. QA partner 4.0 – November 1996


Saturday, May 19, 2012

Explain simple loops in detail?


Loops are such an important programming constructs for various object oriented languages that they cannot be neglected. All of us are aware of the looping constructs that we have in programming languages like C and C++. We have three basic loops:
  1. For loop
  2. While loop
  3. Do while loop

Why Loops are Important?


- Loops find extensive use in programming and they are a means to tell the program to keep executing a set of statements until some break condition is encountered.
- Loops come to be a very handy tool when it comes to the repetition of the whole block of code. 
- It can be done to reduce the length of the code and the task of the programmer or developer of writing the same code again and again innumerable times. 
- In some cases it also happens that the number of times for which the loop is to be executed is obtained from the user, in such cases looping of the particular block of code becomes extremely important. 
-There are many software programs or applications that perform very complex tasks or calculations all by the virtue of the looping constructs. 

Before taking on the loops in to your software program you should be well versed with the true and false concept of the programming language that you are using. Let us discuss all the above mentioned three loops one by one:

                1.  For Loop: 
               Here’s the syntax of the for loop:

For (initialization of the variable; test condition; increment condition)
{
Statement 1;
Statement 2; (code to be executed)
.
.
.
Statement n;
}
In the expression for the initialization of the variable one can declare the variable for the loop and initialize it with the required value. Secondly the test condition is responsible for checking the whether the loop should be executed or not on the basis of the true or false value. The increment condition lastly helps the loop to increment the value of the initialized variable. All of these 3 expressions are separated from each other by semicolon. An empty condition is evaluated to false value.

2. While Loop: 
Here’s the syntax for the while loop:

While( test condition)
{
Statement 1;
.
.
Statement n;
}
According to some programmers the while loops are perhaps the easiest to operate. While loops are supposed to be entry controlled loop since the condition is checked up on the entry itself and based on its true value it is executed. While loops are somewhat like the for loops except that they contain the initialization expression and the update expression inside their body. But the drawback with this loop is that it is quite length. This loop won’t allow the execution of the statements even once if the test condition is evaluated to be false.
      
          3. Do while loop
          Here’s the syntax for the do – while loop:
Do
{
Statement 1;
Statement 2;
.
.
.
Statement n;
} while (test condition)
This loop holds good for the programs in which the execution of a particular block of statements is required at least once irrespective of whether the test condition is true or false. The test condition is encountered in the last and is evaluated. If it is found to be false, then the loop won’t be eligible for a second iteration. Because of this factor the do while loop is commonly known as the exit controlled lop. 


Thursday, April 26, 2012

What is a testing framework? What are different unit testing frameworks?



What is a testing framework?

- Testing framework is considered to be an object oriented approach to testing since it helps in providing suitable environment and language for testing the software system or application. 
- A testing framework can be defined as a set of concepts, assumptions and tools that are the means for providing support for testing the software systems or application. 
- The testing frameworks are generally used in the automated testing and such testing frameworks are called the test automation frameworks. 
- The main advantage here for which the testing frame works are used is that they reduce the overall testing and development cost by a large amount. 
- If any change or modification is made to the test cases, then all the tester needs to do is to update the test case file since the start-up script and the driver script will remain the same.
- This reduces the hectic task of updating the scripts when the changes have to be made to the software system or application. 
- The testing framework if chosen properly can help in reducing the development costs by a big margin and the lower cost can be maintained throughout the development process. 
- These costs are basically due to the maintenance efforts, test scripting and development processes.
- Using any approach with testing frame work has a great impact on the costs. 

Types of Testing Frameworks

  1. Linear testing framework: This is commonly used for the code that is procedure oriented and is generated by the tools using techniques such as recording and playback.
  2. Structured testing framework: This testing frame work is composed of the control structures and hence got the name. It is constituted by control structures such as switch, while, for, if-else condition statement etc.
  3. Data driven testing framework: This testing frame work involves persisting of the data outside a test in either a spreadsheet or a database.
  4. Key word driven testing framework
  5. Hybrid testing framework: This type of frame work is the resultant of the combination of two or more types of above mentioned testing frame works.

What does testing framework account for?

- A testing frame work is said to account for the following things:
  1. Definition of the format so that the expectations can be expressed.
  2. Creation of a mechanism for driving or hooking an application that is under test.
  3. Execution of the tests.
  4. Reporting of the results.
- The execution of the powerful and complex tests eats up a lot of time and it also requires quite large budget when only capture tool is used. 
- Since the tests are created ad hoc, it becomes very difficult to track these functionalities and reproduce them.
- A test automation framework serves as a better support option when it comes to the automated testing. 
The testing frameworks and other tools are incorporated in to a test automation interface for carrying out the integration as well as system testing. 
- The test automation interface is employed for the mapping of the tests without putting them in to the way of the development process.
- Test automation frameworks are known for improving flexibility and efficiency of the test scripts. 
- There are 3 main core modules of any test automation interface:

1. Interface engine: The engine lies on the top of the environment and consists of a test runner and parser.
2. Interface environment: It consists of project library and frame work library.
3. Object repository: It consists of object application data recorded by the testing tool.


Wednesday, November 2, 2011

Define the tracking progress for an object oriented project?

For a object oriented project, tracking becomes really difficult and establishing some meaningful milestones is also a difficult task as there are many things that are happening at once. For tracking an object oriented project, following milestones are considered to be completed when the below mentioned criteria are met:

Milestone for Object Oriented Analysis is considered completed when the following conditions are satisfied :
- Every class is defined and reviewed.
- Every class hierarchy are defined and reviewed.
- Class attributes are defined and reviewed.
- Class operations are defined and reviewed.
- Classes that are reused are noted.
- The relationships among classes are defined and reviewed.
- Behavioral model is created and reviewed.

Milestone for Object Oriented Design is considered completed when the following conditions are satisfied :
- Subsystems are defined and reviewed.
- Classes are allocated to sub systems.
- Classes allocated are reviewed.
- Tasks are allocated.
- Task allocated are reviewed.
- Design classes are created.
- These design classes are reviewed.
- Responsibilities are identified.
- Collaborations are identified.

Milestone for Object Oriented Programming is considered completed when the following conditions are satisfied :
- Classes from design model are implemented in code.
- Extracted classes are implemented.
- A prototype is built.

Milestone for Object Oriented Testing is considered completed when the following conditions are satisfied :
Debugging and testing occur in concert with one another. The status of debugging is often assessed by considering the type and number of bugs.
- The correctness of object oriented analysis and design model is reviewed.
- The completeness of object oriented analysis and design model is reviewed.
- Collaboration between class and responsibility is developed and reviewed.
- Test cases designed are conducted for each class.
- Class level tests are conducted for each class.
- Cluster testing is completed and classes are integrated.
- Tests related to system testing are established and completed.

Each of the milestone is revisited as object oriented process model is iterative in nature.


Wednesday, October 12, 2011

What makes one C compiler better than the other?

What makes C compiler better than the other? Well, that’s a question often debated upon. As we all know c is a general purpose programming language which was developed to run on UNIX operating system and till date it is the most widely used programming language being used to develop programs. it uses a weak compiler as compared to other language compilers.

The C compiler provides low level access to computer memory and offers programming constructs that are very easy to convert to machine level language. C compilers use minimum run time and they are very fats compilers though prone to errors. A C program can easily be converted to another language program with a minimum of rewriting. C compiler allows structured programming and is very flexible. Its static system avoids many of the errors that can happen during run time.
- C allows the executable code to be stored within functions.
- C compiler terminates a statement with a semicolon.
- C is basically a procedure oriented language.

There are many C compilers available in the market today and most them run on all operating systems including both windows and UNIX. Some of these c compilers are available as freeware, some are available under proprietary license, and some have BSD license and some other have GPL license. Many of the c compilers are not available online.

The best about C compilers is that a majority of them support “integrated development environment” or IDE which makes them more easy to use. Some C compilers apart from having IDE supporting feature come with some third party features which extend the functionality of the language and make it work faster. They provide better editing options and strong macros with great compiler integration and run time.

Most of these compilers take only 300 MB of space on your hard disk drive. For windows some are available in the size of 170 MB and so the installation process is not time consuming and does not checks your patience.

C compiler lets you use parallelism. Any source code before execution, needs to be converted into machine level language i.e., in the language that is easily understood by the CPU processor. C compiler does this effectively and very fast as compared to other language compilers available today.

C having a fast compiler is mostly used to write game codes. Since other languages are largely optimized, C is used widely even today. C compiler provides abstraction to a great degree. Compiling depends a lot on the length and complexity of the code and on the speed of the CPU processor. But, the C compiler compiles the required code in as less time as possible. C compiler being a very large and complex tool is very powerful and useful. C can be thought of as a portable assembly language and scripting of many other languages is based on C language only.

Learning all the features of C is a great deal. Many C compilers support all ANSI C standards. C compilers are so small that they can be directly used from a rescue disk. C compilers can produce x86 and x86- 64 code very fast. Many C compilers today come with an optional memory feature and a bound checker.

Few compilers can simultaneously compile and run the programs using the “command line” option. Under this feature programs run like shell scripts. The C compilers are exceptionally faster and better than any other compiler available today in terms of speed of compilation. C language is free of what is called bombastic jargon and it is not much optimized. Most of the C compilers like TCC produce codes in a single pass and each statement is compiled very carefully.


Tuesday, October 11, 2011

What are the problems of a C compiler?

Every programming language has some advantages and disadvantages which are not present in the other languages. Some languages are capable of solving some problems better as compared to other languages. But the point is that most of the problems have similar needs, requirements and logic, so the point where languages differ from each other is the efficiency with which they solve the problem.

Some provide more efficient and fluent solutions while others don’t. As we all know C is a basic programming language which was developed to solve problems and develop programs relating to kernels of the operating systems, compilers and graphical user interfaces. C compiler though being fast is not so efficient. It provides many downsides for a large number of problems. Many of us think that C is the fastest language but this is not true.

C++ compiles most of the C programs at the same speed as C++ does. Some of the features of C language like virtual function calls result in over heads. C is not object oriented. This in turn makes it more inconvenient to implement some programs. It is not able to force object orientation everywhere. C makes some programs that require object oriented programming more error prone. C has got a weak typing system as compared to other programming languages. This leads to many programming errors after compilation of the program.

A bigger standard library C++ allows the full use of the C standard library. This is very important of course, as the C standard library is an invaluable resource when writing real world programs.
- C++ has a library called the Standard Template Library.
- This standard library contains a number of templates that can be used while developing programs almost of any kind.
- It also includes many common data structures which are very useful like data lists, maps, data sets, etc. the standard library routines and its data structures are tailored to the specific needs of the programmer.
- Though standard library is no gold knife, still it does gives a great help in many programs for solving general purpose related problems. Many tasks like implementing a linked list in C take a lot of time.
- Though the compilation is fast but, who has got that much time to write those lengthy codes. That time you will feel the need for a better compiler which provides a shorter and effective code for implementing lists and other sorts of data structures in array form.

Even though C language was standardized long back in 1998, but till date we don’t have any good compilers for this language. It’s a very complex language and so requires a heavy compiler like itself to compile it. Another problem related to C compiling is that being a big and complex language, many few people have its correct knowledge of usage. A lot depends on the programmer also. If you are typing in the wrong code you are sure to get bad results.
Today also most of the programs are written in C. a need is felt to convert them to another programming language for better compilation. But the conversion is no good solution. Conversion of a C language program code is often ended up in rewriting almost the entire content of the program.

Programs written in C will always have 2 major problems. Firstly their code will be unusually lengthy and time consuming. Secondly, the program execution will be slower even though the compilation time is very less. The C program codes require more time to read, write and understand. C compiler being ineffective can crash any time. There’s a lack of high level routines in C compiler.


Tuesday, August 30, 2011

What are different object oriented metrics in software measurement?

Object Oriented Metrics


Lines of code and Function point metrics can be used for object oriented projects but they do not provide enough granularity for schedule. Some object oriented metrics are as follows:

- Number of scenario scripts
A scenario script describes the interaction between user and application. It is directly related to application size and number of test cases developed to exercise the system.

- Number of key classes
Key classes are independent components. The number of key classes is the indication of the amount of effort that is required to develop the software and it also indicates the potential amount of reuse applied during system development. The key classes are directly related to problem domain.

- Number of support classes
Support classes are not directly related to problem domain. Support classes can be developed for key class. Number of support classes indicates amount of effort required to develop software and potential amount of reuse to be applied.

- Number of subsystems
Subsystem is gathering of classes supporting a function visible to the end user. A schedule is laid out in which work on subsystem is partitioned.

- Average number of support classes per key class
Estimation becomes easy and simplified if average number of support classes per key class is known.

As database grows, relationships between object oriented measures and project measures provides metrics for project estimation.


Saturday, August 13, 2011

What are the metrics for object oriented design?

A more objective view of the characteristics of design can benefit both an experienced designer and the novice. The characteristics that can be measured when we assess an object oriented design are:

- Size which has four views: population, volume, length and functionality.
- Complexity is measured in terms of structural characteristics by checking how classes of an object oriented design are interrelated.
- Sufficiency is defined as the degree to which an abstraction possesses the features required from the point of view of current application.
- Coupling is defined as different connections between the elements of the object oriented design.
- Completeness is defined as the feature set against which we compare the abstraction or design component. It considers multiple points of view. It indirectly implies the degree to which abstraction or design component can be reused.
- Similarity is defined as the degree to which two or more classes are similar in structure, function, behavior etc.
- Volatility for object oriented design is defined as the likelihood that a change will occur.
- Cohesion is defined as the degree to which the set of properties it possesses is part of problem or design domain.
- Primitiveness is the degree to which the operation is not constructed out of a sequence of other operations within the class.


Saturday, August 6, 2011

What are different metrics for testing?

Software testers must rely on analysis, design, and code metrics to guide them in design and execution of test cases. Metrics for testing fall into two broad categories:
- metrics that attempt to predict the likely number of tests required at various testing levels.
- metrics that focus on test coverage for a given component.

Function based metrics use a predictor for overall testing effort. Architectural design metrics provide information on the ease and difficulty which is associated with integration testing.

The metrics defined for object oriented provide a general indication of the amount of testing effort required to exercise an object oriented system. Object oriented testing can be quite complex. Metrics can assist in targeting testing resources at threads, scenarios, and packages of classes that are suspect based on measured characteristics. Design metrics that has direct influence on test-ability of object oriented system include:

- Lack of cohesion in methods (LCOM): Higher the value of LCOM, more states must be tested.
- Percent public and protected (PAP): High value of PAP increases the possibility of side effects among classes because public and protected attributes lead to high coupling.
- Public access to data members (PAD): High value of PAD increases the possibility of side effects among classes.
- Number of root causes (NOR): NOR is the count of distinct class hierarchy described in design model. As NOR increases, testing effort increases.
- Fan-in (FIN): It is an indication of multiple inheritance. If it is greater than 1, a class inherits its attributes and operations from more than one root class.
- Number of children (NOC) and depth of inheritance tree (DIT): The super class methods will have to be retested for each sub class.


Tuesday, August 2, 2011

How to design a test case for an inter-class?

As the integration of object oriented system begins, the designing of test cases becomes difficult. Testing of collaborations among classes should start at this point. It can be accomplished by applying random and partitioning methods and also scenario based and behavioral testing.

Multiple class random test cases can be generated in following steps:
- Generate random test sequences from the list of class operations for each client class and these messages are sent to server classes.
- Collaborator class and the operation is determined for each message that is generated.
- The transmitted messages are determined for each operation in the server object.
- The next level of operations are determined for each of the messages.

A state diagram for a class is used to help in deriving a sequence of tests that exercises the dynamic behavior and the classes that are collaborated with it. The tests that are designed should achieve all state coverage. Every behavior for the class should be adequately exercised. In case of inter class test case design, multiple state diagrams are used to track the behavioral flow of the system.

A state diagram can be traversed in a breadth first manner. It implies that a test case exercises a single transition. When a new transition is to be tested only previously tested transitions are used.


Monday, August 1, 2011

What are different testing methods that are applicable at the class level?

Object oriented testing begins by evaluating the object oriented analysis and object oriented design models, structured walk-throughs, prototypes, formal reviews of correctness, completeness and consistency.
Test each operation as part of a class hierarchy because its class hierarchy defines its context of use. The approach that can be used :
- Test each method (and constructor) within a class.
- Test the state behavior (attributes) of the class between methods.

Each test case should contain:
- a list of messages and operations that will be exercised as a consequence of the test.
- a list of exceptions that may occur as the object is tested.
- a list of external conditions for setup.
- supplementary information that will aid in understanding or implementing the test.

To test a class, there are two methods called as random testing and partitioning applicable.

For random testing for object oriented classes, the number of possible permutations for random testing can grow quite large. A strategy similar to orthogonal array testing can be used to improve testing efficiency. In random testing, methods applicable to class are identified, constraints are defined, a minimum test sequence is defined and then generate a variety of random (but valid) test sequences.

Partition testing reduces the number of test cases. State based partitioning categorizes class operations based on the ability to change the state of the class. Attribute based partitioning categorizes class operations based on the attributes that they use. Category based partitioning categorizes class operations based on generic function that each perform.


Sunday, July 31, 2011

Introduction to Object Oriented Testing Methods

Object oriented testing begins in the small with a series of tests designed to exercise class operations and check whether errors exist as one class collaborates with other classes. Use based testing along with fault based testing is applied to integrated classes. In the end, use cases are used to uncover errors at software validation level.

Encapsulation can create a minor problem when testing because testing reports on concrete and abstract state of an object. Multiple inheritance complicates testing by increasing number of contexts for which testing is required. Black box testing methods are appropriate for object oriented systems as they are for systems developed using conventional software engineering methods.

The strategy for fault based testing is to hypothesize a set of possible faults and then derive the tests to prove each of that hypothesis. The effectiveness of these techniques depends on how testers see a plausible fault.

Inheritance complicates the testing process. even though the base class has been properly tested, there is a need to test all classes derived from it.

Scenario based testing will uncover errors that occur when any actor interacts with the software. It concentrates on what the user does and not what the product does. This type of testing uncovers interaction errors.

Surface structure is an externally observable structure of object oriented program. Testing surface structure is similar to black box testing. Deep structure refers to the internal technical details of object oriented program. It exercises dependencies, behaviors and communication mechanisms. It is similar to white box testing.


Tuesday, July 26, 2011

Object Oriented Software and its Test Strategies...

In testing object oriented software, the objective of testing remains the same. The nature of object oriented software changes both testing strategy and testing tactics.

UNIT TESTING IN OBJECT ORIENTED CONTEXT
In object oriented software, an encapsulated class is the focus of unit testing. Encapsulation means that class and class object packages the attributes and operations that manipulate the data. A class contains many operations so unit testing these operations must also vary.
Class testing for object oriented software is analogous to module testing for conventional software. It is not advisable to test operations in isolation. Unit testing of conventional software focus on algorithmic detail of module and the data that flows across module whereas unit testing for object oriented software focus on operations encapsulated by class.

INTEGRATION TESTING IN OBJECT ORIENTED CONTEXT
An important strategy for integration testing of object oriented software is thread based testing. Threads are set of classes that respond to an input or event. Each thread is integrated and tested individually. Regression testing is done.
Another strategy is the use based tests that focus on classes that do not collaborate heavily with other classes.

The behavior of drivers and stubs also changes during integration testing of object oriented software. Drivers test operations at lowest level and for testing whole group of classes. Stubs are used where collaboration between classes is required but one or more collaborating class is not fully implemented.


Tuesday, April 26, 2011

What are steps involved in deriving test cases? What are Validation, Alpha, Beta testing? What are test metrics?

The steps in deriving the test cases using use cases are:
- Using the RTM, the use cases are prioritized. Importance is gauged based on the frequency with which each function of the system is used.
- Use case scenarios are developed for each use case. The detailed description for each use case scenario can be very helpful in later stage.
- For each scenario, take at least one test case and identify the conditions that
will make it execute.
- Data values are determined for each test case.

After system testing is culminated, validation testing is performed which consists of a series of black box tests. It focuses on user-visible actions and user-recognizable output.
Alpha and Beta Testing are a series of acceptance tests. Alpha testing is performed in a controlled environment normally at developer's site. In alpha testing, developers record all errors and usage problems while end users use the system. Beta testing is done at customer's site and developers are not present. In beta testing, end-users records all errors and usage problems.

The amount of testing effort needed to test object oriented software can be indicated by the metrics used for object-oriented design quality. These metrics are:
- Lack of Cohesion in Methods (LCOM)
- Percent Public and Protected (PAP)
- Public Access To Data Members (PAD)
- Number of Root Classes (NOR)
- Number of Children (NOC) and Depth of the Inheritance Tree (DIT)


Thursday, April 21, 2011

How to implement Controllers - Programming Guidelines

To implement controllers, a good programming practice is to use abstract classes and interfaces. It increases the ability of the software to be reusable and manageable. It allows the software to have plug and play options.

WHAT IS AN ABSTRACT CLASS


Abstract class is a class that cannot be instantiated. It is located at the top of an object oriented class hierarchy. It defines the actions possible with objects of all subclasses of class. The methods defined in abstract class are called abstract methods.

WHAT IS AN INTERFACE


Interfaces define the signatures of a set of methods withoutthe body. Interfaces define a standard and public way of specifying the behavior of classes. Interface can only contain abstract methods, properties but we don’t need to put abstract and public keyword. All the methods and properties defined in Interface are by default public and abstract. Interfaces exhibits polymorphism.

- Interfaces are needed when similar methods are implemented by unrelated classes.
- Through interfaces, we can actually capture similarities among unrelated classes without artificially forcing a class relationship.
- Interfaces are needed to reveal an object's programming interface without revealing its class.
- Interfaces are needed to model multiple inheritance which allows aclass to have more than one superclass.

IMPLEMENTATION METRICS


The metrics used for implementation are the metrics for the design. These are:
- Lines of Code (LOC)
- Number of classes.
- Number of documentation pages.
- Total cost.
- Effort.


Monday, April 18, 2011

What is Deployment Level Design ? What are Design Metrics?

DEPLOYMENT LEVEL DESIGN


The Deployment-level Design creates a model that shows the physical architecture of the hardware and software of the system. The Deployment Diagram is made up of nodes and communication associations. Nodes would represent the computers. The communication associations show network connectivity. To develop deployment level design, distribute the software components identified in the component-level design to the computer node where it will reside.

DESIGN METRICS


There are many sets of metrics for the object-oriented software. Chidamber and Kemere Metrics suite consist of six class based design metrics:
Weighted Methods per Class (WMC)
- This is computed as the summation of the complexity of all methods of a class.

Depth of the Inheritance Tree (DIT)
- It is defined as the maximum length from the root superclass to the lowest subclass.

Number of Children (NOC)
- Children of a class are the immediate subordinate of that class.
- As the number of children increases, reuse increases.
- Of course, as the number of children increases, the number of testing the children of the parent class also increases.

Coupling Between Object Classes (CBO)
- It is the number of collaboration that a class does with other object.
- As this number increases, the re-usability factor of the class decreases.

Response for a class (RFC)
- It is the number of methods that are executed in response to a message given to an object of the class.
- As this number increases, the effort required to test also increases because it increases the possible test sequence.

Lack of Cohesion in Methods (LCOM)
- It is the number of methods that access an attribute within the class.
- If this number is high, methods are coupledtogether through this attribute.


Friday, April 15, 2011

What are different types of design patterns?

The Composite View Design Pattern
- The context of composite view pattern is that it allows the development of the view more manageable through the creation of a template to handle common page elements for a view.
- The problem comes in modifying and managing the layout of multiple views.
- The solution is to use this pattern when a view is composed of multiple atomic sub-views. Each component of the template may be included into the whole and the layout of the page may be managed independently of the content.
- A benefit of using this pattern is that interface designer can prototype the layout of the page, plugging in static content on each component.
- The drawback is that there is a runtime overhead associated with it.

The Front Controller Design Pattern
- It provides a centralized controller for managing requests.
- The problem is that the system needs a centralized access point for presentation-tier request handling to support the integration of system data retrieval, view management, and navigation.
- The solution to the above problem is that a controller is used as an initial point of contact for handling a request. It centralizes decision-making controls.

Data Access Object Design Pattern
- It separates resource's client interface from its data access mechanisms.It allows data access mechanism to change independently of the code that uses the data.
- The problem is that data will be coming from different persistent storage mechanism and access mechanism varies based on the type of storage.
- The solution to the above problem is to use the Data Access Object to abstract and encapsulate all access to the data source. It implements the access mechanism required to work with the data source.


Friday, March 25, 2011

Software Engineering - Quality Focus, Process, Method and Tools

A computer software includes a set of programs that executes within a computer of any size and architecture, and data that are being processed by theprograms and presented to users as hard or soft copies.
- Software Engineering is a discipline that applies principles of engineering to the development of quality software in a timely and cost-effective manner.
- Software Engineering is viewed differently by different practitioners. It makes use of measurement and metrics to assess quality, not only of the software but also the software process.
- In layered technology, the foundation is total focus on quality.
- The process integrates the other layers together. It defines a framework that consists of key process areas that define and enable rational and timely delivery of the computer software.
- Methods define a systematic and orderly procedures of building software. Methodology is the science of systematic thinking using the methods orprocedures used in a particular discipline.
Structured methodology includes Information Engineering, Software Development Life Cycle/Project Life Cycle, Rapid Application Development Methodology, Joint Application Development Methodology, CASE Method.
Object-oriented Methodologies include Booch Method, Coad and Yourdan Method, Jacobson Method, Rumbaugh Method and Wirfs-Brock Method.
- Tools provide support to the process and methods. They may be automated or semi-automated. Most tools are used to develop models. Models are patterns of something to made or they are simplification of things. There are two models that are generally developed by system model is an inexpensive representation of a complex system that one needs to study while a software model is a blueprint of the software that needs to be built.
Structured Approach Modeling Tools include Entity-relationship Diagrams, Data Flow Diagrams, Structured English or Pseudo-codes, Flow Charts.
Object-oriented Approach Modeling Tools include Unified Modeling Language (UML).


Thursday, March 10, 2011

What are different types of architectural styles?

Large number of computer systems are created. Some of the architectural styles are:

Data Centered Architecture
Data store resides at center of architecture and is accessed frequently by other components that update, add, delete or otherwise modify data within the store. A data centered architecture promotes integrability, which means existing components can be changed and new client components added to the architecture without concern about other clients.

Data-flow Architecture
Data flow architecture is applied when input data is to be transformed through a series of computational or manipulative components into output data. Pile and filter structure has a set of components called by filters connected by pipes that transmit data from one component to another. Each filter works independently. If data flow degenerates into a single line of transforms, it is called batch sequential.

Object Oriented Architecture
In this architecture, data and operations are encapsulated by the components of a system. Communication and coordination between components is done by message passing.

Call and Return Architecture
In this architecture, software designer achieves a program structure which is relatively easy to modify and scale. Two sub-styles exist: Main program/subprogram architecture and Remote Procedure Call Architecture.

Layered Architecture
In this architecture, different layers are defined. Each layer accomplishes operations that progressively become closer to machine instruction set. Components service user interface operations at outer layer. Components perform operating system interfacing at the inner layer.


Saturday, February 19, 2011

Component Level Design - Designing Class based Components - Coupling

The complexity of the system increases as the amount of collaboration and communication increases. As the complexity increases, difficulty in implementing, testing, and maintaining software also increases.

Coupling is a qualitative measure of the degree to which classes are connected to each other. Coupling increases as the classes become more dependent on each other. The main objective of component level design is to minimize coupling as much as possible.

As the design for each software component is elaborated, the focus shifts to the design of specific data structures and procedural designs to manipulate the data structures. There are different categories of coupling :

- Content Coupling
Content coupling is when one module modifies or relies on the internal workings of another module. This violates the basic design concept i.e. information hiding.
- Common Coupling
In common coupling, two modules share the same global data. It can lead to uncontrolled error propagation and side effects.
- Control Coupling
In Control coupling, one module controls the flow of other module. The problem is that an unrelated change in second module can result in the change of the meaning of control flag.
- External Coupling
Two modules share an external data format. A component communicates or collaborates with infrastructure components. It is necessary but should be limited to small number of components or classes.
- Data Coupling
Data coupling is when modules share data through. The bandwidth of communication grows and the complexity also increases.
- Stamp Coupling
In this type of coupling, modules share a composite data structure. It occurs when class B is declared as an argument of an operation of class A and therefore the system becomes more complex.
- Routine Call Coupling
It occurs when one operation invokes another. This type of coupling is quite necessary but it does increase the interconnectedness of a system.
- Type Use Coupling
It occurs when component A uses a data type in component B. If the type definition changes, every component that uses the definition also changes.
- Inclusion Coupling
In this type of coupling, component A includes or imports a package or content of component B.


Facebook activity