Do you ever know what is the responsiblities of your project manager ? If not read it completely and dictate him/her do all those if he fails to do

I have saw in my past and also watching in current that lots of project manager aren’t aware what they should do each and every day for the project and for the project team members. In  a general thought as per my experience after watching severa l Project Managers I am not sure they are doing actually what they should.
To manage the project management processes, a person should be well organized, have great follow-up skills, be process oriented, be able to multi-task, have a logical thought process, be able to determine root causes, have good analytical ability, be a good estimator and budget manager, and have good self-discipline.

The work around defining the project means that you understand and gain agreement on the overall objectives, scope, risk, approach, budget, etc. It also includes defining or adopting the specific project management procedures that will be used to manage the project.

This does not mean that the project manager must do all this work themselves. There may be an entire team of people helping to create the Project Charter and schedule. However, if something does not go right, the project manager is accountable.

There are several responsibilities
1) Process Responsibilties
2) People Responsibilties

Process Responsibilities

Once the project starts, the project manager must successfully manage and control the work, including:

  • Identifying, tracking managing and resolving project issues
  • Proactively disseminating project information to all stakeholders
  • Analyzing and understanding the current state processes to ensure that the context and implications of change are understood by the clients and the project team
  • Identifying and documenting all business, technical, product and process requirements
  • Identifying, managing and mitigating project risk
  • Ensuring that the solution is of acceptable quality
  • Proactively managing scope to ensure that only what was agreed to is delivered, unless changes are approved through scope management
  • Defining and collecting metrics to give a sense for how the project is progressing and whether the deliverables produced are acceptable
  • Managing the overall schedule to ensure work is assigned and completed on time and within budget

Again, this does not mean that the project manager physically does all of this, but they must make sure it happens. If the project has problems, or scope creep, or faces risks, or is not setting expectations correctly, then the project manager is the person held accountable.

People Responsibilities

In addition to process skills, a project manager must have good people management skills. This includes:

  • Having the discipline and general management skills to make sure that people follow the standard processes and procedures
  • Establishing leadership skills to get the team to willingly follow your direction. Leadership is about communicating a vision and getting the team to accept it and strive to get there with you.
  • Setting reasonable, challenging and clear expectations for people, and holding them accountable for meeting the expectations. This includes providing good performance feedback to team members
  • Team building skills so that the people work together well, and feel motivated to work hard for the sake of the project and their other team members. The larger your team and the longer the project, the more important it is to have good team-building skills.
  • Proactive verbal and written communicator skills, including good, active listening skills. 

Again, you are responsible for the success of the project. If the team has poor morale and is missing deadlines, you need to try to resolve it. If team members don’t understand exactly what they need to do and when it is due, then you are responsible

Multiple Roles

Depending on the size and complexity of the project, the project manager may take on other responsibilities in addition to managing the work. For instance, the project manager may assist with gathering business requirements. Or they may help design a database management system or they may write some of the project documentation. Project management is a particular role that a person fills, even if the person who is the project manager is working in other roles as well.

For instance, a project manager might manage the project for 45% of their time, perform business analysis for 25%, work on design for 15% and write documentation for 15%. This does not mean that one of the responsibilities of a project manager role is to spend 15% of their time on design. Instead, it just means that the project is not large enough to need a full-time project manager. The project manager spends the rest of their time in other project roles such as Business Analyst, Designer and Technical Writer. Depending on the size of your projects and the way your company is organized, a project manager’ time may be allocated one of three ways.

They may have a full time role on a large project.

They may have project management responsibilities for multiple projects, each of which is less than full time, but the combination of which adds up to a full-time role.

They may fill multiple roles, each of which requires a certain level of skill and responsibility. On one project, for instance, they may be both a project manager and an analyst.

I hope you all understood..What you should get from Project Managers? If they aren’t doing from the above said items insist them to do so or else escalate the issue to the next superior

Software Design Pattern – A must for baking quality software

Just hold on all your tasks for a while,and just rewind yourself how many times you have digged yourself to identify a same problem which you might have already faced in few/frequent occasions.The question is how we are going to come out of this did you ever thought about this……………………Not able to determine……… Okay don’t worry that’s what I have decided to write a weekly special article here after every week on all the design patterns……till I am satisfied that I made my readers working on a design pattern  on thier software piece.

Its worth reading this article 5 times a day and look forward the changes happens into you automatically , I am sure will start asking/checking with your tech lead /PM what design pattern we should follow before you write a class or interface.

Okay here it is the very important which can change you as a professional quality software developer

Patterns are wonderful technique that allow programs to share knowledge about their design.

Documenting patterns is one way that you can reuse and possibly share the infomation that you have learned about how it is best to solve a specific program design problem.

Design patterns is a beautiful solution to sort out your reoccuring problems.In general GANG OF FOUR patterns are generally considered  to be the base for all other patterns in the world.

Design patterns are classified into three types ,they are…

1) Creational

2) Structural

3) Behavourial

Let us start with Creational Design pattern it has several ways to implement in the real time world

  1. Abstract Factory
  2. Builder
  3. Factory Method
  4. Prototype
  5. SingletonLet me explain the each type of creational pattern in my article next week same day ….until then good luck on design patterns..Cheers

Here is a great forecast about IT Industry

Software association Nasscom on Tuesday announced its `domestic IT market committee’ that would identify policies and actions to accelerate the growth of the infotech market. “With this committee, we will ensure that the required impetus is provided to the sector, in terms of favourable policy environment, increased focus on emerging companies, and focus on high maturity IT user segments.

Increasing use of IT within the country will help to enhance the competitiveness of the economy and of the companies and sectors that use IT,” Mr Kiran Karnik, President, Nasscom, said in a statement. The recent Nasscom-IDC study on `Domestic Services (IT-ITES) Market Opportunity’ has emphasised the huge potential in the domestic IT market. While the IT industry has been showing a strong growth, the growth has been predicated on the larger corporate and a few verticals, including banking financial services and insurance (BFSI), telecom and some sectors of manufacturing. “To accelerate the growth of the domestic market, it is important that there is increased IT penetration in growing verticals like retail, healthcare and manufacturing.

 Equally important is the increase in IT adoption by the small and medium business sector and household consumer segment,” the release said. The domestic IT market committee includes a representation from the IT players (Microsoft, Oracle, TCS, Wipro, HCL, Tally, NISG and IBM), corporate sector (Bharti Televentures, ICICI Bank, Hitech Gears, Reliance Infocomm, Shoppers Stop, Tata Steel, SBI and Jumpstartup) and IIT Chennai and IIT Mumbai). The committee is chaired by Mr Ramadorai, CEO, TCS and Chairman of Nasscom. 

So guys don’t panic for anything,We have prosperous years upcoming…. 

ASP.NET 2.0 Read/Write Web.config File

Recently I have a requirement from a customer to modify the web.config [AppSettings] keys value at runtime in grid like format using asp.net 2.0

Here is the way I have implemented.

 1) Create  a class in App_Code and copy & paste the below code

public class AppSettingsOperations
    {

//get all the keys    

    public AppSettingsKeysList getAllAppSettingsKeys()
        {
            AppSettingsKeys appSettingsKey =null;
            AppSettingsKeysList appSettingsKeysList = new AppSettingsKeysList();
            int idCount =0;

            Configuration configuration = WebConfigurationManager.OpenWebConfiguration(“~”);

            AppSettingsSection appSettingsSection = (AppSettingsSection)configuration.GetSection(“appSettings”);

            if (appSettingsSection != null)
            {

                foreach (string key in appSettingsSection.Settings.AllKeys)
                {
                    idCount++;

                    appSettingsKey = new AppSettingsKeys();
                    appSettingsKey.ConfigID = idCount;
                    appSettingsKey.ConfigName = key;
                    appSettingsKey.ConfigValue = appSettingsSection.Settings[key].Value;

                    appSettingsKeysList.Add(appSettingsKey);
                       
                }
            }

            return appSettingsKeysList;
        }

//Modify the key

        public bool ModifyKey(AppSettingsKeys appSettingsKeys)
        {
            try
            {
                Configuration configuration = WebConfigurationManager.OpenWebConfiguration(“~”);

                AppSettingsSection appSettingsSection = (AppSettingsSection)configuration.GetSection(“appSettings”);

                if (appSettingsSection != null)
                {

                    appSettingsSection.Settings[appSettingsKeys.ConfigName].Value = appSettingsKeys.ConfigValue;

                    configuration.Save();

                }

               
            }
            catch (Exception ex)
            {
                return false;

            }
            return true;

        }

    }

2) Create an entity to store the config key and value
 public class AppSettingsKeys
    {
        private int _configID;
        private string _configName;
        private string _configValue;
       

        public int ConfigID
        {
            get { return _configID; }
            set { _configID = value; }
        }
        public string ConfigName
        {
            get { return _configName; }
            set { _configName = value; }
        }
        public string ConfigValue
        {
            get { return _configValue; }
            set { _configValue = value; }
        }

        public AppSettingsKeys()
        {

            _configID = 0;
            _configName = string.Empty;
            _configValue = string.Empty;
        
        }

        public void SetInfo(int id, string configName, string configValue)
        {
            this._configID = id;
            this._configName = configName;
            this._configValue = configValue;
        }
    }

3) Create a collection class like the below

public class AppSettingsKeysList : List<AppSettingsKeys>
    {

    }

4) Create an aspx page and paste the below code

<table  cellspacing=”8″ cellpadding=”1″ id=”table1″ align=”center” class=”loginTable” style=”width: 580px;” valign=”top”>
           <tr>
               
                <td colspan=”4″ class=”topText” align=”center” >
                    <asp:Label ID=”lblHeader” runat=”server” Text=”Web.Config [AppSettings] Keys”></asp:Label>&nbsp;</td>
               
            </tr>
          
     <tr align=”center” >
       <td   >
                    <asp:GridView ID=”GVAppConfig” Width=”560″ DataKeyNames=”ConfigID” 
                        runat=”server” AutoGenerateColumns=”False”  AutoGenerateEditButton=”True” 
                        CssClass=”labelText” TabIndex=”1″ OnRowEditing=”GVAppConfig_RowEditing”
                        CellPadding=”4″ OnRowCancelingEdit=”GVAppConfig_RowCancelingEdit”
                        OnRowUpdating=”GVAppConfig_RowUpdating” BackColor=”White”
                        BorderColor=”#000000″ BorderStyle=”Inset” BorderWidth=”1px”
                        ToolTip=”Edit AppSettings Key values in web.config” AllowPaging=”True”
                        onpageindexchanging=”GVAppConfig_PageIndexChanging”     >
                     <Columns>
                     <asp:BoundField DataField=”AppConfigID” HeaderText=”Config ID”  Visible=”False”   /> 
                      <asp:TemplateField HeaderText=”Config Name” >
                        <ItemTemplate>
                            <asp:Label ID=”lblconfigname” runat=”server” Text='<%# Bind(“ConfigName”) %>’></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                      <asp:TemplateField HeaderText=”Config Value” >
                      <EditItemTemplate>
                            <asp:TextBox  ID=”txtConfigValue” runat=”server” Text='<%# Bind(“ConfigValue”) %>’></asp:TextBox>
                            <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”txtConfigValue”
                                ErrorMessage=”Please enter a value” SetFocusOnError=”True”
                                >*</asp:RequiredFieldValidator>
                        </EditItemTemplate>
                       
                        <ItemTemplate>
                            <asp:Label ID=”lblconfigvalue” runat=”server” Text='<%# Bind(“ConfigValue”) %>’></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                       
                     </Columns>
                      <AlternatingRowStyle BorderWidth=”1px” BackColor=”#cccccc”  ForeColor=”#000000″ />
                    <FooterStyle BackColor=”#cccccc” ForeColor=”#000000″ />
                    <RowStyle BackColor=”White” ForeColor=”#000000″ />
                    <SelectedRowStyle BackColor=”#009999″ ForeColor=”#CCFF99″ />
                    <PagerStyle BackColor=”#99CCCC” ForeColor=”#003399″ HorizontalAlign=”Left” />
                    <HeaderStyle BackColor=”#CC9900″ Font-Bold=”True” ForeColor=”#000000″ />
                    </asp:GridView>
      
       </td>
     
      </tr>
    
     </table><br /><br />
     <asp:Label ID=”lblMsg” runat=”server” CssClass=”requiredText” ></asp:Label>

5)In the code behind paste the below code

public partial class Admin_AppConfig : System.Web.UI.Page
{
   
    #region PageLoad Event
    protected void Page_Load(object sender, EventArgs e)
    {

           lblMsg.Text = String.Empty;

        if (!IsPostBack)
        {
            //calling the method to populate all the appSettings keys
            try
            {
                GetAppSettingsKeys();
            }
            catch (Exception ex)
            {
                exceptionMethod(ex);
               
            }
        }
    }

  
 #endregion

    #region Userdefined methods

    #region exceptionMethod Method
    private void exceptionMethod(Exception ex)
    {
               lblMsg.Text = ex.Message.ToString();
        lblMsg.ForeColor = System.Drawing.Color.Red;
    }
    #endregion

    #endregion

    #region GetAppSettingsKeys Method
    private void GetAppSettingsKeys()
    {
        AppSettingsOperations appSettingsOperations = new AppSettingsOperations();
        AppSettingsKeysList appSettingsKeysList = new AppSettingsKeysList();

        try
        {
            appSettingsKeysList = appSettingsOperations.getAllAppSettingsKeys();

            if (appSettingsKeysList.Count > 0)
            {
                //calling the bindgridview method
                BindGridView(appSettingsKeysList);
            }
            else
            {
                lblMsg.Text = “>>No Keys available”;
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
#endregion

    #region Bindgridview Method

    private void BindGridView(AppSettingsKeysList allKeysList)
    {
        try
        {
            GVAppConfig.DataSource = allKeysList;
            GVAppConfig.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    #endregion

   
    #region Gridview events
    #region Gridview Rowedditing Event
    protected void GVAppConfig_RowEditing(object sender, GridViewEditEventArgs e)
    {
        try
        {
            GVAppConfig.EditIndex = e.NewEditIndex;
            GetAppSettingsKeys();
           
        }
        catch (Exception ex)
        {
            exceptionMethod(ex);
    
        }
    }
    #endregion
   
    #region gridview rowcanceling event
    protected void GVAppConfig_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
    {
        try
        {
            GVAppConfig.EditIndex = -1;
            GetAppSettingsKeys();
           
        }
        catch (Exception ex)
        {
            exceptionMethod(ex);    
        }
 
    }
    #endregion

    #region gridview rowupdating event
    protected void GVAppConfig_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        AppSettingsKeys appSettingsKeys = new AppSettingsKeys();
        AppSettingsOperations appSettingsOperations = new AppSettingsOperations();

        try
        {
            Label  lblKey = (Label)GVAppConfig.Rows[e.RowIndex].Cells[2].Controls[1];
            TextBox txtValue = (TextBox)GVAppConfig.Rows[e.RowIndex].FindControl(“txtConfigValue”);
            string keyValue = txtValue.Text;
            string keyName = lblKey.Text;
            int configID = Convert.ToInt32(GVAppConfig.DataKeys[e.RowIndex].Value);

            appSettingsKeys.ConfigID    = configID;
            appSettingsKeys.ConfigName  = keyName;
            appSettingsKeys.ConfigValue = keyValue;

            //Update the key with the user entered value
            if (appSettingsOperations.ModifyKey(appSettingsKeys))
            {
                lblMsg.ForeColor = System.Drawing.Color.Green;
                lblMsg.Text = “>>Key has been updated successfully”;
            }
            else
            {
                lblMsg.ForeColor = System.Drawing.Color.Red;
                lblMsg.Text = “>>There is some problem in updating the key ,try later”;

            }
    
            GVAppConfig.EditIndex = -1;
            GetAppSettingsKeys();
           
        }
        catch (Exception ex)
        {
            exceptionMethod(ex);    
        }
   }
    #endregion
    protected void GVAppConfig_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GVAppConfig.PageIndex = e.NewPageIndex;
        GetAppSettingsKeys();
    }

   

   
    #endregion

  
}

Compile and view  the page

Happy Programming !!

System.Net.Mail Advanced Programming,May be you are not aware.Worth Reading

I hope several guys had used , using  and going to use System.Net.Mail for thier email sending module regardless whether it is a web or window application.

But I am sure may not be aware of some advanced email  sending techniques,Okay here it is last night when I was talking with one of my open source project UK team member.He was asking about how to send embedded images along with email using System.Net.Mail and I told him that these things are mostly forgotten to learn by most of the .NET developers.

So I decided write an article which are very advanced email programming like faq

How do I read SMTP configuration data?

Using special settings in your app’s configuration file, System.Net.Mail can configure itself.
Using the configuation file, you can set the following default properties:

MailMessage.From
SmtpClient.Host
SmtpClient.Port
 

The settings will also allow you specify a Username and Password to be used for authentication. It is important to note that if DefaultCredentials are specified to true, the userName and password attributes are igorned.

Here is an example of the  <mailSettings> node:

<configuration>
  <system.net>
    <mailSettings>
      <smtp from=”me@mycompany.com“>
        <!–
            The <network> node supports the following properties, but we won’t use all of them
            <network host=”127.0.0.1″ port=”25″ userName=”myUserName” password=”secret” defaultCredentials=”true” />
        –>
        <network host=”127.0.0.1″ />
       </smtp>
    </mailSettings>
   </system.net>
</configuration>

How do I embed images in an email?
Embedding images is something that is new with System.Net.Mail. To embed an image you will need to

 

  1. Create a LinkedResource object. The LinkedResource will actually contain the binary data of the Image. This binary data is encoded as part of the email, and sent along as part of the MailMessage.

  2. Give the LinkedResource a unique name, also known as a Content-Id.

  3. Create a HTML AlternateView.

  4. Inside that HTML text, you need to use the standard <img> tag.

  5. For the “src” value, you need to point it at the Content-Id of the LinkedResource image. This is done by using the syntax <img src=”cid:whatever”> The “src=cid:” part is required for the email client to recognize the <img> tag as an embedded image, while the “whatever” part is the actual Content-Id of the LinkedResource image.  This will instruct the mail client to find an embedded image named “whatever” and display the contents *without* making a http:// request.

That’s all there is to create a linked image. Below is a short but complete example that demonstrates creating an embedded image.

static void EmbedImages()
{
//create the mail message
MailMessage mail = new MailMessage();

//set the addresses
mail.From = new MailAddress(“me@mycompany.com”);
mail.To.Add(“you@yourcompany.com”);

//set the content
mail.Subject = “This is an email”;

//first we create the Plain Text part
AlternateView plainView = AlternateView.CreateAlternateViewFromString(“This is my plain text content, viewable by those clients that don’t support html”, null, “text/plain”);

//then we create the Html part
//to embed images, we need to use the prefix ‘cid’ in the img src value
//the cid value will map to the Content-Id of a Linked resource.
//thus <img src=’cid:companylogo’> will map to a LinkedResource with a ContentId of ‘companylogo’
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(“Here is an embedded image.<img src=cid:companylogo>”, null, “text/html”);

//create the LinkedResource (embedded image)
LinkedResource logo = new LinkedResource( “c:\\temp\\logo.gif” );
logo.ContentId = “companylogo”;
//add the LinkedResource to the appropriate view
htmlView.LinkedResources.Add(logo);

//add the views
mail.AlternateViews.Add(plainView);
mail.AlternateViews.Add(htmlView);

//send the message
SmtpClient smtp = new SmtpClient(“127.0.0.1”); //specify the mail server address
smtp.Send(mail);
}

How do I send email asynchronously?

System.Net.Mail has also added asynchronous support for sending email. To send asynchronously, you need need to

  1. Wire up a SendCompleted event
  2. Create the SendCompleted event
  3. Call SmtpClient.SendAsync

These steps are demonstrated in the code below.

       static void SendAsync()
        {
            //create the mail message
            MailMessage mail = new MailMessage();

            //set the addresses
            mail.From = new MailAddress(“me@mycompany.com”);
            mail.To.Add(“you@yourcompany.com”);

            //set the content
            mail.Subject = “This is an email”;
            mail.Body = “this is the body content of the email.”;

            //send the message
            SmtpClient smtp = new SmtpClient(“127.0.0.1”); //specify the mail server address
            //the userstate can be any object. The object can be accessed in the callback method
            //in this example, we will just use the MailMessage object.
            object userState = mail;

            //wire up the event for when the Async send is completed
            smtp.SendCompleted += new SendCompletedEventHandler(SmtpClient_OnCompleted);

            smtp.SendAsync( mail, userState );
        }
        public static void SmtpClient_OnCompleted(object sender, AsyncCompletedEventArgs e)
        {
            //Get the Original MailMessage object
            MailMessage mail= (MailMessage)e.UserState;

           //write out the subject
            string subject = mail.Subject;

            if (e.Cancelled)
            {
                Console.WriteLine(“Send canceled for mail with subject [{0}].”, subject);
            }
            if (e.Error != null)
            {
                Console.WriteLine(“Error {1} occurred when sending mail [{0}] “, subject, e.Error.ToString());
            }
            else
            {
                Console.WriteLine(“Message [{0}] sent.”, subject );
            }
        }

How do I send a web page?
System.Net.Mail does not natively support sending a web page. However, using the WebRequest class, you can screen scrape web pages, and pass the resulting Html string to the MailMessage object. The following example demonstrates this technique.

 

Note: Be sure to import the System.Net and System.IO namespaces for this code snippet.

public static void EmailWebPage()
        {
            //create the mail message
            MailMessage mail = new MailMessage();

            //set the addresses
            mail.From = new MailAddress(“me@mycompany.com”);
            mail.To.Add(“you@yourcompany.com”);

            //set the content
            mail.Subject = “This is an email”;

            //screen scrape the html
            string html = ScreenScrapeHtml(“http://localhost/example.htm&#8221;);
            mail.Body = html;
            mail.IsBodyHtml = true;

            //send the message
            SmtpClient smtp = new SmtpClient(“127.0.0.1”);
            smtp.Send(mail);

        }
        public static string ScreenScrapeHtml(string url)
        {
            WebRequest objRequest = System.Net.HttpWebRequest.Create(url);
            StreamReader sr = new StreamReader(objRequest.GetResponse().GetResponseStream());
            string result = sr.ReadToEnd();
            sr.Close();
            return result;
        }