Expertize Essentials Innovation through knowledge

10Sep/102

10 skills, developers need in next five years

With the recent changes in the economy, a lot of developers are focused on their short-term job prospects.

At the same time, it's important to make sure that you get the most bang for your buck when it comes to taking the time and energy to learn new skills. Hence, here is our list of 10 skills you should be learning right now to make sure that your resume is relevant for the next five years.

The list is hardly exhaustive, and there are huge swaths of the industry it won't cover (mainframe developers, for example). Nonetheless, for average mainstream development, you can't go wrong learning at least seven of these skills--not only to the point where you can talk convincingly about them at a job interview, but actually use them on the job.

1: One of the "Big Three" (.NET, Java, PHP)
Unless there is a radical shift in the development world (akin to an asteroid hitting Redmond), most developers will need to know at least one of the Big Three development systems--.NET (VB.NET or C#), Java, or PHP--for the near future.

It's not enough to know the core languages, either. As projects encompass more and more disparate functionality, you'll need to know the associated frameworks and libraries more deeply.

2: Rich Internet Applications (RIAs)
Love it or hate it, in the last few years, Flash is suddenly being used for more than just animations of politicians singing goofy songs. Flash has also sprouted additional functionality in the form or Flex and AIR.

Flash's competitors, such as JavaFx and Silverlight, are also upping the ante on features and performance. To make things even more complicated, HTML 5 is incorporating all sorts of RIA functionality, including database connectivity, and putting the formal W3C stamp on AJAX. In the near future, being an RIA pro will be a key resume differentiator.

3: Web development
Web development is not going away anytime soon. Many developers have been content to lay back and ignore the Web or to just stick to "the basics" their framework provides them with.

But companies have been demanding more and more who really know how to work with the underlying technology at a "hand code" level. So bone up on JavaScript, CSS, and HTML to succeed over the next five years.

4: Web services
REST or SOAP? JSON or XML? While the choices and the answers depend on the project, it's getting increasingly difficult to be a developer (even one not writing Web applications) without consuming or creating a Web service.

Even areas that used to be ODBC, COM, or RPC domains are now being transitioned to Web services of some variety. Developers who can't work with Web services will find themselves relegated to legacy and maintenance roles.

5: Soft skills

One trend that has been going for quite some time is the increasing visibility of IT within and outside the enterprise. Developers are being brought into more and more non-development meetings and processes to provide feedback. For example, the CFO can't change the accounting rules without working with IT to update the systems. And an operations manager can't change a call center process without IT updating the CRM workflow.

Likewise, customers often need to work directly with the development teams to make sure that their needs are met. Will every developer need to go to Toastmasters or study How to Win Friends and Influence People? No. But the developers who do will be much more valuable to their employers--and highly sought after in the job market.

6: One dynamic and/or functional programming language
Languages like Ruby, Python, F#, and Groovy still aren't quite mainstream--but the ideas in them are. For example, the LINQ system in Microsoft's .NET is a direct descendent of functional programming techniques.

Both Ruby and Python are becoming hot in some sectors, thanks to the Rails framework and Silverlight, respectively. Learning one of these languages won't just improve your resume, though; it will expand your horizons. Every top-flight developer I've met recommends learning at least one dynamic or functional programming language to learn new ways of thinking, and from personal experience, I can tell you that it works.

7: Agile methodologies
When Agile first hit mainstream awareness, I was a skeptic, along with many other folks I know. It seemed to be some sort of knee-jerk reaction to tradition, throwing away the controls and standards in favor of anarchy. But as time went on, the ideas behind Agile became both better defined and better expressed.

Many shops are either adopting Agile or running proof-of-concept experiments with Agile. While Agile is not the ultimate panacea for project failure, it does indeed have a place on many projects. Developers with a proven track record of understanding and succeeding in Agile environments will be in increasingly high demand over the next few years.

8: Domain knowledge
Hand-in-hand with Agile methodologies, development teams are increasingly being viewed as partners in the definition of projects. This means that developers who understand the problem domain are able to contribute to the project in a highly visible, valuable way. With Agile, a developer who can say, "From here, we can also add this functionality fairly easily, and it will get us a lot of value", or "Gee, that requirement really doesn't match the usage patterns our logs show" will excel.

As much as many developers resist the idea of having to know anything about the problem domain at all, it is undeniable that increasing numbers of organizations prefer (if not require) developers to at least understand the basics. In addition to this knowledge like ERP those who are working in SAP, Oracle Apps and other ERPs will rock the world.

9: Development "hygiene"
A few years ago, many (if not most) shops did not have access to bug tracking systems, version control, and other such tools; it was just the developers and their IDE of choice. But thanks to the development of new, integrated stacks, like the Microsoft Visual Studio Team System, and the explosion in availability of high quality, open source environments, organizations without these tools are becoming much less common. Developers must know more than just how to check code in and out of source control or how to use the VM system to build test environments. They need to have a rigorous habit of hygiene in place to make sure that they are properly coordinating with their teams. "Code cowboys" who store everything on a personal USB drive, don't document which changes correspond to which task item, and so on, are unwelcome in more traditional shops and even more unwelcome in Agile environments, which rely on a tight coordination between team members to operate.

10: Mobile development
The late 1990s saw Web development rise to mainstream acceptance and then begin to marginalize traditional desktop applications in many areas. In 2008, mobile development left the launch pad, and over the next five years, it will become increasingly important.

There are, of course, different approaches to mobile development: Web applications designed to work on mobile devices, RIAs aimed at that market, and applications that run directly on the devices. Regardless of which of these paths you choose, adding mobile development to your skill set will ensure that you are in demand for the future.

Justin James is an employee of Levit & James, Inc. in a multi-disciplinary role that combines programming, network management and systems administration. He has been blogging at TechRepublic since 2005.

Source: zdnetasia

15Jul/092

Saving Image in Database (Sql Server) using .NET

I shared and done few efforts to save image in database.

Following the the function to save image to the databse.
Database Table will look like this:

create table userphoto(
photoid int,
photo image
);

The following code will be written in ASPX page.
<asp:FileUpload ID="UploadPhoto" runat="server" CssClass="fileupload" />
<asp:Button ID="btnUpload" runat="server" CssClass="buttonOrangeLight" OnClick="btnUpload_Click" Text="Upload" />


The following method is the code for uploading an image which will be invoked on btnUpload click event.

protected void btnUpload_Click(object sender, EventArgs e)
{
  //Get the extension of your file to be uploaded
  string _fileExtension = UploadPhoto.PostedFile.FileName.Substring( UploadPhoto.PostedFile.FileName.LastIndexOf('.'));
  if (_fileExtension != ".jpg" && _fileExtension != ".gif" && _fileExtension != ".bmp" && _fileExtension !=   ".png")
  {
    ltScript.Text = "Please upload images(jpeg/gif/bmp/png) files";
    return;
  }

  int _filesize = UploadPhoto.FileBytes.Length;
  // Checking file length
  if(_filesize>200000)
  {
    ltScript.Text="Size exeeds the limit of 200 KB, please upload a file with size of maximum 200 KB";
    return;
  }

  FileUpload userImage = (FileUpload)UploadPhoto;
  Byte[] imgByte = null;
  if (userImage.HasFile && userImage.PostedFile != null)
  {
    //To create a PostedFile
    HttpPostedFile File = UploadPhoto.PostedFile;

    //Create byte Array with file len
    imgByte = new Byte[File.ContentLength];

    //force the control to load data in array
    File.InputStream.Read(imgByte, 0, File.ContentLength);
    AddUserPhoto(ID, imgByte); // calling database method
  }
  ltScript.Text = "File has been uploaded...";
}

// Database Method in C#
internal bool AddUserPhoto(string ID, Byte[] Photo)
{
  string conn = "server=yourservername; database=yourdatabasename; uid=userid; pwd=yourpassword;";
  SqlConnection _sqlConnection= new SqlConnection(conn);

  bool _isInserted = false;
  _sqlCommand = new SqlCommand();
  _sqlCommand.Connection = _sqlConnection;
  _sqlCommand.CommandText = "insert into phototable values(@ID, @Photo)";
  _sqlCommand.CommandType = CommandType.StoredProcedure;
  _sqlCommand.Parameters.Add(new SqlParameter("@ID", ID));
  _sqlCommand.Parameters.Add(new SqlParameter("@Photo", Photo ));
  try
  {
    if(_sqlCommand.Connection.State != ConnectionState.Open)
    _sqlCommand.Connection.Open();

    int _result = _sqlCommand.ExecuteNonQuery();
    if (_result > 0)
    {
      _isInserted = true;
    }
  }
  catch (SqlException ex) {
  // Your Error code goes here for exception
  }
  finally
  {
    _sqlCommand.Connection.Close();
    _sqlCommand = null;
  }
  return _isInserted;
}
15Jul/094

Showing Image from Database in ASP.NET

Add the following lines in ASP.NET file

<asp:image id="imgUserPhoto" imageurl="image.ashx?id=xvd21w54" runat="server"/>
or
<img src="http://www.blogger.com/image.ashx?id=xvd21w54" />

Create an image.ashx file and add the following code in it.

<%@ WebHandler Language="C#" %>
using System;
using System.Configuration;
using System.Web;
using System.IO;
using System.Data;
using System.Data.SqlClient;

public class image : IHttpHandler
{
  public void ProcessRequest(HttpContext context)
  {
    string id;
    if (context.Request.QueryString["id"] != null)
    {
      id = Convert.ToString(context.Request.QueryString["pid"]);
    }
    else
      throw new ArgumentException("No parameter specified");

    context.Response.ContentType = "image/jpeg";
    Stream Photo = GetPhoto(id, photonumber);
    if (Photo != null)
    {
      byte[] buffer = new byte[4096];
      int byteSeq = Photo.Read(buffer, 0, 4096);

      while (byteSeq > 0)
      {
        context.Response.OutputStream.Write(buffer, 0, byteSeq);
        byteSeq = Photo.Read(buffer, 0, 4096);
      }
    }
    else
    {
      //Loading default Image
      Byte[] imgByte = File.ReadAllBytes(context.Server.MapPath("upload_photo.JPG"));

      Photo = new MemoryStream(imgByte);
      byte[] buffer = new byte[4096];
      int byteSeq = Photo.Read(buffer, 0, 4096);

      while (byteSeq > 0)
      {
        context.Response.OutputStream.Write(buffer, 0, byteSeq);
        byteSeq = Photo.Read(buffer, 0, 4096);
      }

    }
    //context.Response.BinaryWrite(buffer);
  }
  public Stream GetPhoto(string Id, string PhotoNumber)
  {
    string conn = "server=yourservername; database=yourdatabasename; uid=userid; pwd=yourpassword;";
    SqlConnection connection = new SqlConnection(conn);

    string sqlQuery = "SELECT Photo FROM userphoto WHERE id=@id";

    SqlCommand cmd = new SqlCommand(sqlQuery, connection);
    cmd.CommandType = CommandType.Text;
    cmd.Parameters.AddWithValue("@id", Id);
    connection.Open();
    try
    {
      object img = cmd.ExecuteScalar();
      return new MemoryStream((byte[])img);
    }
    catch
    {
      return null;
    }
    finally
    {
      connection.Close();
    }
  }
  public bool IsReusable
  {
    get
    {
      return false;
    }
  }
}
15Jul/091

Creating Runtime Image Thumbnail (Asp.NET)

Upload an image and create thumbnail at runtime in ASP.NET


  protected void btnUpload_Click(object sender, EventArgs e)
  {
    //string _fileExtension = VirtualPathUtility.GetExtension(UploadPhoto.PostedFile.FileName);
    string _fileExtension = UploadPhoto.PostedFile.FileName.Substring (UploadPhoto.PostedFile.FileName.LastIndexOf('.'));
    if (_fileExtension != ".jpg" && _fileExtension != ".gif" && _fileExtension != ".bmp" && _fileExtension != ".png")
    {
      ltScript.Text = "Please upload images(jpeg/gif/bmp/png) files";
      return;
    }

    int _filesize = UploadPhoto.FileBytes.Length;
    if (_filesize > 200000)
    {
      ltScript.Text = "Size exeeds the limit of 200 KB, please upload a file with size of maximum 200 KB";
      return;
    }
    FileUpload userImage = (FileUpload)UploadPhoto;
    Byte[] imgByte = null;
    Byte[] _thumbByte = null;
    if (userImage.HasFile && userImage.PostedFile != null)
    {
      //To create a PostedFile
      HttpPostedFile File = UploadPhoto.PostedFile;
      //Create byte Array with file len
      imgByte = new Byte[File.ContentLength];
      //force the control to load data in array
      File.InputStream.Read(imgByte, 0, File.ContentLength);
      _thumbByte = GetThumbnail();

      DatabaseAdapter _dataadapt = new DatabaseAdapter();
      _dataadapt.UpdateUserPhoto(ID, imgByte, _thumbByte);

    }
    ltScript.Text = "File has been uploaded...";

  }
  private Byte[] GetThumbnail()
  {
    //Creating Thumbnail method
    System.Drawing.Image _image = System.Drawing.Image.FromStream
    (UploadPhoto.PostedFile.InputStream);
    float imgWidth = _image.PhysicalDimension.Width;
    float imgHeight = _image.PhysicalDimension.Height;
    float imgSize = imgHeight > imgWidth ? imgHeight : imgWidth;

    //the approximately pixel size of thumbnail image is 100 x 100 based on ratio
    float imgResize = imgSize <= 100 ? (float)1.0 : 100 / imgSize;
    imgWidth *= imgResize; imgHeight *= imgResize;
    //generating the thumbnail
    System.Drawing.Image _thumbnail = _image.GetThumbnailImage((int)imgWidth, (int)imgHeight, delegate() { return false; }, (IntPtr)0);

    // Converting Image File to byte Array
    byte[] imgBytes = null;
    try
    {
      using (MemoryStream ms = new MemoryStream())
      {
        _thumbnail.Save(ms, ImageFormat.Jpeg);
        imgBytes = ms.ToArray();
      }
    }
    catch (Exception ex) { ltLabel.Text = ex.ToString(); }
    return imgBytes;
  }
11Jun/095

Publish Website Command in VsWebDeveloper2008

Visual web developer Express 2008 does not have the facility to publish a website. The following steps will help you to embed this command in Visual Web Developer 2008:

  1. Launch Visual Web Developer Express 2008.
  2. Select Tools, then External Tools which will display the External Tools dialog. In the Title box, enter Publish &Website(non-overwrite).
  3. Click the browse button next to the Command box and browse to aspnet_compiler.exe which will be located in c:\Windows\Microsoft.NET\Framework\v2.0.50727.
  4. Click Open to add the command line for aspnet_compiler.exe.

Now that you've got the correct command line for the aspnet_compiler.exe, it's time to add the arguments that will correctly pre-compile your application. This is where you'll see the true power of the External Tools dialog.

  1. Type -p " in the Arguments box. (That's an opening double-quote after the p.)
  2. Click the right-facing arrow next to the Arguments box and select Project Directory.
  3. Add a trailing double-quote to the Arguments box.
  4. Press the spacebar to add a space at the end of the existing arguments.
  5. Type -v / " after the space you just entered.
  6. Click the right-facing arrow next to the Arguments box and select Project Directory.
  7. Type \..\CompiledApp" after the existing arguments.
  8. At this point, the Arguments box should contain the following:
    -p "$(ProjectDir)" -v / "$(ProjectDir)\..\CompiledApp"
  9. Type -u.
    -p "$(ProjectDir)" -v / "$(ProjectDir)\..\CompiledApp" -u

Hope this will help you guyz to work with VS developer express 2008.