Category Archives: Date/Time/Timing

These posts are related to date and time coding. As well as performance counters, timing, stopwatch coding, and so on.

Free eBook: Patterns & Practices Application Architecture Guide 2.0

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (23 votes, average: 4.35 out of 5)
 

A while back Microsoft made available a new eBook for free called: Patterns and Pratices Application Architecture Guide 2.0

The download is about 3 megs of info and in the .pdf format. This book is should be very useful and helpful for .NET developers. Below are some of the features and Chapters in the free book.


Parts

Part I, Fundamentals
Part II, Design
Part III, Layers
Part IV, Archetypes

Foreword

  • Foreword by S. Somasegar
  • Foreword by Scott Guthrie

Chapters

  • Introduction
  • Architecture and Design Solutions At a Glance
  • Fast Track

 

Part I, Fundamentals

  • Chapter 1 – Fundamentals of Application Architecture
  • Chapter 2 – .NET Platform Overview
  • Chapter 3 – Architecture and Design Guidelines

   

Part II, Design

  • Chapter 4 – Designing Your Architecture
  • Chapter 5 – Deployment Patterns
  • Chapter 6 – Architectural Styles
  • Chapter 7 – Quality Attributes
  • Chapter 8 – Communication Guidelines

   

Part III, Layers

  • Chapter 9 – Layers and Tiers
  • Chapter 10 – Presentation Layer Guidelines
  • Chapter 11 – Business Layer Guidelines
  • Chapter 12 – Data Access Layer Guidelines
  • Chapter 13 – Service Layer Guidelines

   

Part IV, Archetypes

  • Chapter 14 – Application Archetypes
  • Chapter 15 – Web Applications
  • Chapter 16 – Rich Internet Applications (RIA)
  • Chapter 17 – Rich Client Applications
  • Chapter 18 – Services
  • Chapter 19 – Mobile Applications
  • Chapter 20 – Office Business Applications (OBA)
  • Chapter 21 – SharePoint Line-Of-Business (LOB) Applications

   

Appendix

  • Cheat Sheet – patterns & practices Pattern Catalog
  • Cheat Sheet – Presentation Technology Matrix
  • Cheat Sheet – Data Access Technology Matrix
  • Cheat Sheet – Workflow Technology Matrix
  • Cheat Sheet – Integration Technology Matrix

As you can see, this book can be very useful and helpful for those programming using the .NET framework. I recommend you download and check it out. Have fun!

Jason

How to Timeout or Pause using Visual Basic.NET

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
 

The Subroutine below will put a pause or timeout in your program for the milliseconds specified in the “howLong” parameter. A single Second (1 second) equals 1,000 (one thousand) milliseconds. I also have DoEvents and a Threading.Thread delay for the calling thread inside the loop. I recommend you keep the 1 millisecond thread timeout. You can remove the DoEvents code if you want since the messages should be easily processed and not make your app appear frozen with the Threading.Thread code. Also with the Thread delay the CPU usage will not be high by your codes timeout code.

    '
    'All you need to do is Call this Subroutine and pass how long you want the procedure to timeout
    'or pause in the "howLong" parameter with a milli-seconds value.
    'Remember 1,000 milliseconds equals 1 second.
    '
    Sub timeoutPause(ByVal howLong As Integer)

        'This sub will pause or timeout your applications code for the specified amount of milli-seconds.

        'Setup a new DateTime variable with the time in milliseconds and add the milliseconds
        'value passed in the "howLong" procedure.
        Dim timeOut As DateTime = Now.AddMilliseconds(howLong)

        Do

            'Keep the app from freezing and allow Windows to continue processing yours applications messages.
            Application.DoEvents()
            '
            'I recommend you keep using the Thread.Sleep sub to keep the cpu usage down. It takes a millisecond value.
            Threading.Thread.Sleep(1)
            '
            'Keep looping and waiting until the elasped time specified in the "howLong" parameter has expired.
        Loop Until Now > timeOut

        MsgBox("The code paused for: " & howLong.ToString & " milli-seconds")

    End Sub