CODE SPREAD http://www.codespread.com Simple Concepts of Coding | Programming Mon, 03 Feb 2014 07:16:08 +0000 en-US hourly 1 http://wordpress.org/?v=3.8.4 Tip : Code Structure C# http://www.codespread.com/tip-code-structure-c.html http://www.codespread.com/tip-code-structure-c.html#comments Mon, 03 Feb 2014 07:14:47 +0000 http://www.codespread.com/?p=2580 As a developer, I always stress on developing a habit of following the best practices to structure the code. It helps me to easily navigate through the code and also saves a lot of effort in searching for some particular items.

Below is the sample structure and example:

using statements

Constants / Read-only fields

Private Members

Enumerations

Public members

Protected members

Constructors

Properties

Public methods

Private methods


//using statements

Using System

Using System.Web

namespace Controllers

{

public class SampleController

{

 

//Constants / Read-only fields

public const int numofitems=10;

//Private Members

private string _samplestring = string.Empty;

//Enumerations

public enum months

{

January = 1,

February,

March,

April,

May,

June,

July,

August,

September,

October,

November,

December

};

 

//Public members

public  int StartDate =string.Empty;

 

//Protected members

protected int EndDate ==string.Empty;

//Constructors

public SampleController ()

{

}

 

//Properties

public string Date { get; set; }

//Public methods

public string GetStartDate()

{

}

//Private methods

private int numOfItems()

{

}

 

 

]]>
http://www.codespread.com/tip-code-structure-c.html/feed 0
Importance of Software Maintenance http://www.codespread.com/importance-of-software-maintenance.html http://www.codespread.com/importance-of-software-maintenance.html#comments Wed, 29 Jan 2014 07:40:33 +0000 http://www.codespread.com/?p=2518 What is Software Maintenance?

Software maintenance is an important phase of SDLC.

It is defined as a set of activities to keep the software functional and behavioral as intended for as long as possible with few problems. These activities might involve any processes to modify software product after final release cycle. As a result, software maintenance will

  1. Improve performance
  2. Correct faults
  3. Adapt the product to a modified environment

How software maintenance is different from software development?

Software Development is kind of a new development where a new environment and system is created from the scratch and there are no sketchy boundaries, if not limited by requirements.

But think of introducing a new feature in the developed product which is running in a specific environment.

Then, the existing system setting and environment plays a major role as they are required to be considered and analyzed at the planning stage of new feature development.

Consideration of limitations posed by existing system and environment is the key difference between software maintenance and software development.

What is the purpose of software maintenance?

The purpose is to preserve the value of software over the time. The value can be enhanced by expanding the customer base, enhancements of capabilities, deletion of obsolete capabilities,  more efficient and employing newer technology.

What are the categories of Software Maintenance?

Software maintenance is categorized mainly into 4 categories:

Adaptive: As the name suggests, it is related to activities which ensures software remain functional during movement of software to a new system environment. For example: Up gradation of processor will require software to be adapted to the upgraded environment.

Perfective: Here, more the requirements, more expansion of software is required. Requirements grow over a course of time so do software. Perfective is an approach to accommodate the enhancement of the initial product.

Corrective: As the name suggests, Corrective approach tends to correct any errors or bugs. These errors or bugs might have introduced during design stage, coding stage. These issues might have been missed during development or later crop up under some new test scenarios which were not covered during testing.

Preventive: Preventive approach is more a beforehand precaution approach where activities are lined up to avoid any corrective action. For example: Any maintenance activity might lead to code complexity so a series of code restructuring and code optimization activities are performed to avoid any successive issues.

Thanks!

]]>
http://www.codespread.com/importance-of-software-maintenance.html/feed 0
Software Testing Life Cycle (STLC) http://www.codespread.com/software-testing-life-cycle-stlc.html http://www.codespread.com/software-testing-life-cycle-stlc.html#comments Mon, 20 Jan 2014 13:01:04 +0000 http://www.codespread.com/?p=2400 Software Testing Life Cycle (STLC) is a process which consists of a number of phases to improve the quality of the product.

Each phase involves various testing activities like

  1. Requirement Analysis
  2. Test Planning
  3. Test Design
  4. Test Environment Setup
  5. Test Execution
  6. Test Reporting

 

Requirement Analysis:

  • What are the types of tests to be performed?
  • Identify Modules.
  • Is there scope for automation testing?
  • Prepare Requirement Traceability Matrix (RTM).
  • Testing Scope.
  • Test Environment Details.

Test Planning:

  • What needs to be tested?
  • Identify Test tool.
  • Effort estimation and resource allocation.
  • Scope of testing.
  • Risk Identification.
  • Training Requirements..

Test Design:

  • Create test cases & test scripts.
  • Review test cases & test scripts.
  • Identifying test data, If Test Environment is available.

Test Environment Setup:

  • Prepare hardware and software requirement
    list for the Test Environment
  • Perform Smoke testing.

Test Execution:

  • Execute the test cases.
  • Report and log bugs to developers.
  • Track defects to closure.
  • Prepare list of defect status.

Test Reporting:

  • Prepare Test closure report.
  • Prepare Defect Metrics.
  • Prepare KT documents.

STLC phases depends on the organization and their needs but the basic understanding remains the same across.
Please mail at admin@codespread.com for feedback.

]]>
http://www.codespread.com/software-testing-life-cycle-stlc.html/feed 0
App_Offline Updates in Webdeploy V3 and Visual Studio 2013 http://www.codespread.com/app_offline-updates-in-webdeploy-v3-and-visual-studio-2013.html http://www.codespread.com/app_offline-updates-in-webdeploy-v3-and-visual-studio-2013.html#comments Fri, 10 Jan 2014 11:34:48 +0000 http://www.codespread.com/?p=2266 Please refer Don’t Mess with App_Offline article to see the usefulness of App_Offline. Treat the below article as an update to the concepts and basics shared earlier.

After going through visual studio 2013 updates available across the web, I found some interesting notes related to app_offline at

  1. http://www.iis.net/learn/publish/deploying-application-packages/taking-an-application-offline-before-publishing
  2. http://blogs.msdn.com/b/webdev/archive/2013/10/30/web-publishing-updates-for-app-offline-and-usechecksum.aspx

To summarize both the articles, An “AppOffline” rule was added to Web Deploy V3, This rule is disabled by default and needs to be enabled for taking an application offline.

Example to be run on command line:


msdeploy.exe -verb:sync -source:iisApp=mySite -dest:auto,computername= -enableRule:AppOffline

Now, the above logic is integrated with visual studio 2013 where the rule can be enabled  in .pubxml file associated to corresponding publish profile.These web publish profiles are stored as MSBuild files under Properties\PublishProfiles

Add the following element in the PropertyGroup element.


<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>

So the resulting publish profile will look something like the following.


<!--?<span class="hiddenSpellError" pre=""-->xml version="1.0" encoding="utf-8"?&gt;

&lt;Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;

&lt;PropertyGroup&gt;

&lt;EnableMSDeployAppOffline&gt;true&lt;/EnableMSDeployAppOffline&gt;

&lt;WebPublishMethod&gt;MSDeploy&lt;/WebPublishMethod&gt;

&lt;MSDeployServiceURL&gt;(removed)&lt;/MSDeployServiceURL&gt;

&lt;DeployIisAppPath&gt;Default Web Site&lt;/DeployIisAppPath&gt;

&lt;AllowUntrustedCertificate&gt;True&lt;/AllowUntrustedCertificate&gt;

&lt;SkipExtraFilesOnServer&gt;True&lt;/SkipExtraFilesOnServer&gt;

&lt;DeployAsIisApp&gt;False&lt;/DeployAsIisApp&gt;

&lt;MSDeployPublishMethod&gt;WMSVC&lt;/MSDeployPublishMethod&gt;

&lt;UserName&gt;sayedha&lt;/UserName&gt;

&lt;ExcludeApp_Data&gt;False&lt;/ExcludeApp_Data&gt;

&lt;_SavePWD&gt;True&lt;/_SavePWD&gt;

&lt;/PropertyGroup&gt;

&lt;/Project&gt;

Thanks!

]]>
http://www.codespread.com/app_offline-updates-in-webdeploy-v3-and-visual-studio-2013.html/feed 0
OLAP : On-line Analytical Processing http://www.codespread.com/olap-on-line-analytical-processing.html http://www.codespread.com/olap-on-line-analytical-processing.html#comments Mon, 06 Jan 2014 17:47:46 +0000 http://www.codespread.com/?p=2238 What is OLAP?

We know that there are two kinds of database applications available, OLAP and OLTP. Before we go for OLAP, I would like to tell you something about OLTP.
OLTP is On-line Transaction Processing. By transaction, we mean any operation including INSERT, UPDATE, and DELETE statements. And, just like any other transaction system, the main concern here is ACID rules.

Let’s take an example of banking transaction systems, where a large number of users simultaneously perform transactions. In this case, Online Transaction processing (OLTP) applications provide optimal environment for concurrency and atomicity of transactions.

OLAP is On-line Analytical Processing and its main concern is analysis. This is how OLAP is different from OLTP, where the main concern is concurrency and atomicity.

Now, With OLTP we always have a consistent state of data but how this data can be useful to business?

OLAP has an answer to it. In OLAP, the current data is analyzed for any trends or summarize through many filters. The resultant data is not changed or tampered with anytime.

“Because of OLAP, data speaks for itself.”

For example: With the help of OLAP component; Sales, Marketing, Budgeting and Forecasting can provide multi-dimensional analysis and reporting.

What are the advantages of OLAP?

Multi-dimensional: Multi-dimensional views of various kinds of business activities.

Decision Support: Analytical capabilities promote decisions.

Complex Calculations Support: When it comes to determining future trends then complex calculations are necessary like averages and percentage growth.

Access from individual’s point of view:  Access to fast, consistent, interactive access to a wide variety of possible views of information.

What are the types of OLAP?

There are three basic types of OLAP :

MOLAP relies on a multidimensional database.

ROLAP relies on a relational database.

HOLAP is a hybrid model.

More Details are given below:

MOLAP: Multidimensional Online Analytical Processing uses a multidimensional database stored in various cubes. This information is pre-summarized and optimized, due to which, fast data retrieval is possible. Also, a range of complex calculations are already performed.

ROLAP: Relational Online Analytical Processing uses a relational database. ROLAP do not use pre-calculated data cubes like MOLAP. ROLAP uses regular SQL statement to query the standard relational database. Although, it gives the appearance of traditional OLAP’s slicing and dicing functionality.

HOLAP: Hybrid Online Analytical Processing is a hybrid approach which combines the advantages of MOLAP and ROLAP. Here, database divides data between relational and specialized storage like the small aggregated totals are stored in a multidimensional database while large quantities of detail data is stored in the relational database. So we have advantage of both pre-summarized/optimized cubes and relational database.

Example:

OLAP

OLAP

]]>
http://www.codespread.com/olap-on-line-analytical-processing.html/feed 0