Tuesday, March 23, 2010

Geek Post Monthly Newsletter Volume 2 Issue 2

Geek Post

Volume 2 Issue 2

February 2010

























































Hippolite Musings

Tena Koutou Katoa,

Still catching up on stuff I did last month.  It’s been hectic at work, so taking a breather to document it all seems good to me.

Blessings,
James


Developer News

Grenada Village Online

This is where I continue the saga of documenting my learnings from actually putting a web site “out in the wild” (I usually code within a nice, safe, Intranet).

In February I learned how to upload documents to a database, without having to upload the file to the server first. 

  • I had always assumed that using the FileUpload control, I had to copy the file from the client to the server first, in order to grab the file on the server and push it into the database.
  • However, in a managed server environment (e.g. utilising an Internet Service Provider) I do not have permission to write files to the server.
  • I now realise that assumption was false.
  • Here is the completed (presentation) code:
   1:  Protected Sub Submit_Click(ByVal sender As Object, _


   2:                             ByVal e As System.EventArgs) _


   3:                             Handles Submit.Click


   4:      If Page.IsValid() Then


   5:          DocumentLogic.Insert()


   6:      End If


   7:  End Sub


   8:   


   9:  Protected Sub DocumentLogic_Inserting( _


  10:      ByVal sender As Object, _


  11:      ByVal e As ObjectDataSourceMethodEventArgs) _


  12:      Handles DocumentLogic.Inserting


  13:   


  14:      Dim iod As IOrderedDictionary = e.InputParameters


  15:      iod("documentName") = TitleTextBox.Text


  16:      iod("attachment") = FileUpload1.PostedFile.InputStream


  17:      iod("documentType") = FileUpload1.PostedFile.ContentType


  18:      iod("userName") = AppState.UserName


  19:  End Sub




 


Then, the business layer looks like this:




   1:  [System.ComponentModel.DataObjectMethodAttribute(


   2:      System.ComponentModel.DataObjectMethodType.Insert, true)]


   3:  public bool Add(


   4:      string documentName,


   5:      string documentType,


   6:      string author,


   7:      string audience,


   8:      string purpose,


   9:      DateTime? dateWritten,


  10:      Stream attachment,


  11:      string userName)


  12:  {


  13:      DAL.Document dr = new DAL.Document();


  14:   


  15:      dr.DocumentName = documentName;


  16:      dr.DocumentType = documentType;


  17:      dr.Author = author;


  18:      dr.Audience = audience;


  19:      dr.Purpose = purpose;


  20:      dr.DateWritten = dateWritten;


  21:      dr.UpdatedBy = userName;


  22:      dr.UpdatedOn = DateTime.Now;


  23:      Int32 docLength = (Int32)attachment.Length;


  24:      byte[] docBuffer = new byte[docLength];


  25:      attachment.Read(docBuffer, 0, docLength);


  26:      dr.Attachment = docBuffer;


  27:      dr.Save(userName);


  28:      return true;


  29:  }











Telecom News



We are moving to SubVersion…



We are finally moving off Microsoft Visual SourceSafe for source code control.  The reasons for moving are:




  • Ability to branch and merge (apparently) is better;


  • More stable, robust database;


  • Other teams (non-Microsoft e.g. Java) already have it – we’re the last holdouts.


  • Free Open Source application (although the Visual Studio interface – Visual SVN – isn’t free).



The reason why we’re not going to Team Foundation Server is:




  • There already is a TFS database, but they way it was implemented (Virtual Server on a non-Telecom network via internal wireless network) means that we couldn’t code from home.


  • Prohibitively expensive to spin up a second license.



Seems like a good idea to me.  Not sure I want to share the same repository as all other teams: might lose too much autonomy.  We shall see.







Product News





Nothing new to report at this time



Last month, I made a mistake.  I had thought (typo?) that the world-wide launch of Visual Studio 2010 was taking place on 22 March.  Turns out to be 22 April.







Partner News



Got our new MSDN Subscriber Licenses



Good for another two years of unlimited, legal downloads.  I love working here.







Situations Vacant



Senior Functional Specialist BI/Planning - Wellington



  • Requisition ID – INF022D5


  • NZ-Wellington


  • Permanent - Full-time


  • Job Posting 18/Mar/10



Senior Finance Analyst



  • Requisition ID – FIN020GO


  • NZ-Wellington


  • Permanent - Full-time


  • Job Posting 12/Mar/10



Technical Graduate Programme



  • Requisition ID – GRA2200Y


  • New Zealand


  • Permanent - Full-time


  • Job Posting 08/Mar/10



Functional Specialist BI/Planning - Wellington



  • Requisition ID – INF022CE


  • NZ-Wellington


  • Permanent - Full-time


  • Job Posting 01/Mar/10



Graduate Leadership Development Programme 2011



  • Requisition ID – GRA2200X


  • New Zealand


  • Permanent - Full-time


  • Job Posting 01/Mar/10



If any of my non-Telecom friends are reading this and interesting in any of the above, then drop me a line so we can discuss eligibility and suitability.







Training News



In February, I sat and passed Exam 70-562




  • TS: Microsoft .NET Framework 3.5, ASP.NET Application Development


  • Should have been easy, but there was a whole lotta extra stuff


  • e.g. WCF & AJAX


  • My score: 763



Skills being measured in this exam:




  • Configuration and Deploying Web Applications (10%)


  • Consuming and Creating Server Controls (20%)


  • Working with Data and Services (17%)


  • Troubleshooting and Debugging Web Applications (16%)


  • Working with ASP.NET AJAX and Client-side Scripting (15%)


  • Targeting Mobile Devices (5%)


  • Programming Web Applications (17%)







Trainer News



Renewed my MCT for another year…



I’m a Microsoft Certified Trainer again.  Yippee!  It means that Telecom gets a discount on MSDN subscription, and I get unlimited, free and legal access to all Microsoft Official Curriculum material.







PASS News



I’m speaking to Auckland SQL Saturday in April…



On Saturday 10 April at Wolters Kluwer, 41 Centorian Drive, Mairangi Bay, North Shore.



My topic will probably be the Microsoft Sync Framework (again).  I find it difficult (as a full-time Web Developer) to find topics of relevance to Microsoft SQL Server Database Administrators.





Events Schedule



In this section, I highlight dates, times and venues of events either I am presenting at, or of interest to Geeks.  I’m available for bookings.









































































Date Event Venue Speaker
19-Feb-2010 Exam 70-562 Auldhouse, Wellington None
22-26 Feb 2010 Exchange 2010 Training Auldhouse, Wellington ?
10-Apr-2010 SQL Saturday

Wolters Kluwer, Auckland


James, et al
22-Apr-10 Microsoft Visual Studio 2010 Launch All Over The World Various
21-23 April 2010 PASS European Conference Neuss, Germany Various
18-May-10 NZ SharePoint Conference Bay of Plenty Lots




Humour



Mistaken Identity



One day, one of my first-grade students, Taylor, asked his grandmother if he was a child of God. "Why, of course you are, Taylor," she replied. He looked puzzled, then responded, "Well I better get home and tell Mom and Dad—they think I'm theirs!"



—Mary De Guzman, Greenville, SC. Today's Christian Woman, "Heart to Heart."




1 comment:

  1. I am not much of a guy who thinks in so deeply about web design but I think your post had some valid points in it. Like designers are forced to design stuff within the limited code available and not go beyond it, their innovation is somewhat limited but s
    We buy Any Car

    ReplyDelete