IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
ASP Classic
Search ASP Classic Group:

Advanced
-Collapse +Expand ASP Classic Store

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► eMag   Print This    All Groups  
View Group Edition:
Full Edition Your Edition || Prev Next || Subscription Center

Prestwood IT Newsletter Feb 2009 Issue - ASP Classic Edition

Subscribe!

Start subscribing now! It's free!

Each month on or after the 1st, and only once a month, we will send you content from up to 5 community groups. If you select this ASP Classic group, you'll receive the following content below mixed in with the other groups you elect to include.

Prestwood eMag
Our monthly opt-in coupons+newsletter.
portal.prestwood.com
  February 2009 - ASP Classic Edition Year 11 Issue 2  
Your full service technology partner!


Expert guidance from working professionals!
Wes Peterson
Coding Services topic:
I.T. Strategies for Hard Times
by Wes Peterson

Difficult economic periods call for hard decisions. It's easy to be tempted to cut back on your IT expenditures but that can be a major mistake.

I.T. is the goose that's been laying the golden egg for businesses -for decades, now.   You don't want to starve the goose; you want to tune it up. It's crystal-clear that computing has enabled businesses to reduce costs, and increase productivity.

Custom-written software is one of the major ways that businesses gain advantages in savings, profits and productivity.  The reason is pretty simple: No two businesses, even in the same industry, do things the same way.  Mass-produced software, even for a specific industry, seldom addresses every requirement of a given business.

Working Remotely with PS topic (classic post):
Upload a File to Prestwood / Download Files
by Mike Prestwood

For file management (to and from you), we do not normally use FTP. Instead we use our My Uploads feature to both upload a file to Prestwood and to view existing account files.

To get to your uploads, from the main pull-down menu click My | More... | My Uploads. Use the Upload a File option to send us a file. Use the File Manager options to view existing files you and others have uploaded to your account and files attached to notes. You can add a note to your account, tickets, and PSDP items (tasks, defects, requirement items, etc). All note attachments also show up in your My Uploads area.


Technical Writing topic (classic post):
Guidelines for Good Sample Code
by Peter Gruenbaum

Sample code often provides the quickest, clearest way to learn how an SDK works. If you have software engineering experience, then you should already know many principles for writing good code. However, what you may not realize is that some of the good practices that you learned for writing good production code do not apply to writing good sample code. Some techniques, such as comments and clear variable names, apply to both production code and sample code. However, there are good reasons to use hard-coded values in sample code, which should be avoided in production code, and there are good reasons to avoid object-oriented designs when writing sample code.


PrestwoodBoards topic (classic post):
New Version of Cross Reference Encyclopdedia

I deployed yet another new version of my Cross Reference Computer Language Encyclopedia. This new version of the software that drives the cross reference data includes fixing defects and some minor enhancements.

Check it out...

The Cross Reference Encyclopedia is also available from the pulldown menu (Programmer Community | Cross Reference Encyclopedia). Enhancements and fixes included:

  • CrossRef stats replaced the ambiguous "Version 1.1a" on the main CrossRef page:
  • Numerous browsing defects fixed. Previously, clicking around led to some unexpected data showing and in some cases no data.
  • Removed "View All" option and replaced it with a shorter "Overview" page. The "View All" page was getting too long to be of much use so I transitioned to a browse feature. You can still print out each category so "grabbing" a printable version is still possible.

Role-Based Tech Talk topic:
Crash, Bomb, Hang, and Deadlock
by Scott Wehrly
This article explores and defines the following terms: crash, bomb, hang, deadlock, exception, fatal error, and blue screen of death.





 ASP Classic Group Top 
Visit Group | My Group Settings
OOP topic (classic post):
ASP Classic Destructor (Class_Terminate)
by Mike Prestwood

When an object instance is destroyed, ASP calls a special parameter-less sub named Class_Terminate. For example, when the variable falls out of scope. Since you cannot specify parameters for this sub, you also cannot overload it.

When an object instance is created from a class, ASP calls a special sub called Class_Initialize.


OOP topic (classic post):
ASP Classic Constructors (Class_Initialize)
by Mike Prestwood

When an object instance is created from a class, ASP calls a special parameter-less sub named Class_Initialize. Since you cannot specify parameters for this sub, you also cannot overload it.

When a class is destroyed, ASP calls a special sub called Class_Terminate.


 Monthly ASP Classic Lesson
Language Details Topic:
Code Snippet of the Month

Use the scriptiing dictionary object which is available on later versions of ASP Classic (all still commonly in use). Both Access VBA and VB Classic use a collection for this but collections are not supported in ASP Classic.

Dim StateList
Set StateList = Server.CreateObject("Scripting.Dictionary")

StateList.Add "CA", "California"
StateList.Add "NV", "Nevada" 
Response.Write "I live in " & StateList.Item("CA")
Dim StateList
 
set StateList = Server.CreateObject("Scripting.Dictionary")

StateList.Add "CA", "California"
StateList.Add "NV", "Nevada"
 
Response.Write "I live in " & StateList.Item("CA")

ASP Classic Topic:
Run ASP pages on Linux/Unix! This software was originally developed by ChiliSoft.
Sun Java System Active Server Pages software allows organizations to deploy Active Server Pages (ASP)-based web applications on a variety of web servers and operating systems. ASP applications currently supported by Microsoft IIS can now be powered by the Java System Web Server for increased security. Legacy ASP applications running on Windows NT can be transitioned to the Solaris Operating System for ongoing maintenance and support.
ASP Classic Topic:
FAQ of the Month: Find Last Day of Week
Question:

How do you find last Monday? I want to return a date for last Monday or today if today is Monday.


Answer:
While Weekday(ADate) <> vbMonday

     ADate = DateAdd("d", -1, ADate)
WEnd

You could wrap this up in a function as follows: 

Function SU_GetLastDOW(ADate, AWeekDayConst)

    While Weekday(ADate) <> AWeekDayConst
        ADate = DateAdd("d", -1, ADate)
    WEnd
    
    SU_GetLastDOW = ADate
End Function
Language Details Topic:
Tip of the Month

Call Application.Lock to freeze ASP code while you set IIS application variables the Application.Unlock to unfreeze. No actions take place on the server while locked. 

Application.Lock


Application(YourAppVar) = AValue
Application.Unlock
 


Editor's Final Word


For eMag footer

Nothing is particularly hard if you divide it into small jobs.


Henry Ford

Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]