Janea Taylor – COMPUTERS ARE FUN!


What is AJAX?
August 4, 2006, 3:40 am
Filed under: AJAX, Advanced, Development

The term Ajax is used to describe a method of development that uses Asynchronous JavaScript and XML. Ajax is a collection of various components, technologies and dynamic development tools. It is not a programming language, or a single tool itself. It is the combination of several tools. Ajax is considered a method or way of creating dynamic web applications. Ajax is similar to DHTML in that it is a combination of technologies used together to create an application (Wikipedia – Ajax, 2006).

A significant advantage to using Ajax technology is that it provides the ability to update dynamic information on a webpage quickly, without having to reload the page. Ajax combines HTML, CSS (Cascading Style Sheets), JavaScript, DOM (Document Object Model, XML, XSLT, and specifically the XMLHttpRequest to create such dynamic functionality (Webopedia – What is Ajax?, 2006). The XMLHttpRequest is used to provide asynchronous updates.

Many of the technologies used in Ajax implementations have been around for quite some time. Creating the Ajax suite was simply a way to organize these tools into a conglomerate of components, which can be used to define or identify the functionality of an application (AjaxInfo.com – What is Ajax?, 2006).

One of the most popular Ajax implementations you will find today is Google Maps. The way Google Maps functions as compared to other map applications is very different in that functions such as zooming and moving directions can be performe without refreshing the page. This type of application uses HTML, CSS, JavaScript and XML. These technologies used together create the Ajax model. (Webopedia – What is Ajax?, 2006).

Resources:

Wikipedia – Ajax. (2006). Retrieved August 4, 2006 from http://en.wikipedia.org/wiki/AJAX

Webopedia – What is Ajax? (2006). Retrieved August 4, 2006 from http://www.webopedia.com/TERM/A/Ajax.html

AjaxInfo.com – What is Ajax? (2006). Retrieved August 4, 2006 from http://www.ajaxinfo.com/default~viewart~5.htm



Web Development – Cookies
August 3, 2006, 4:01 am
Filed under: Advanced, Development

A cookie is used in a web application to store data on a user’s computer. A cookie is a text file, which contains information that is sent to a web server any time a user visits a website. Often times the information stored is used to help customize and personalize a website. For instance, a user’s name and interests may be stored in the cookie, and when they visit the website that created the cookie, the website displays their name and interests (Webopedia – What is a cookie?, 2006).

Cookies can be used to personalize e-commerce applications. They can contain values that are read by the web server which provide a personal experience when browsing a website. For example, when a user enters in their name for the first time, that information may be stored in a cookie. Then, every time the user visits the website, their name is read from the cookie and displayed on the web page. Cookies are also used in shopping cart applications to store temporary data, such as items that are stored in a shopping cart (Merchandizer.com –What Exactly Are Cookies?, 2006).

The only real disadvantage to using cookies is that some user’s may not have their browser’s enabled to use them for security reasons. Although cookies are merely text files and are considerably safe to use, there are some security concerns when it comes to using cookies. For instance, a user’s credit card information or other personal information, such as a social security number might be stored in a cookie, which could be read by anyone who has access to the user’s system (Cookie Central – The Cookie Concept, 2006).

If security is a concern, it is possible to control your web browser’s security settings to allow or prevent cookies from being created on your computer (Webopedia – Do Cookies Compromise Security?, 2006). This can cause issues however when attempting to use certain web applications. For instance, disabling cookies may prevent you from being able to use shopping cart applications. As a user adds items to their shopping cart, these items are stored in a temporary cookie. If cookies are disabled, the items will not be placed in the shopping cart (Merchandizer.com –What Exactly Are Cookies?, 2006).

Resources:

Webopedia – What is a Cookie? (2006). Retrieved August 3, 2006 from http://www.webopedia.com/TERM/c/cookie.html

Merchandizer.com –What Exactly Are Cookies? (2006). Retrieved August 3, 2006 from http://www.merchandizer.com/Ecommerce-Articles/2006%5C03%5Cwhat-exactly-are-cookies.html

Cookie Central – The Cookie Concept. (2006). Retrieved August 3, 2006 from http://www.cookiecentral.com/c_concept.htm

Webopedia – Do Cookies Compromise Security? (2006). Retrieved August 3, 2006 from http://www.webopedia.com/DidYouKnow/Internet/2002/Cookies.asp



Event Handling
July 14, 2006, 4:12 am
Filed under: .NET, Advanced, Development

An event is a message that signifies that something has happened (MSDN – Events in Visual Basic, 2006). Once an Event occurs, the Event can be handled by using an Event Handler. An Event Handler is a method that contains code, which is executed when a specific event occurs (TopXML : Handling Events, 2006). Events can be based on user input or they can be raised manually by writing code to do so. The .NET Framework contains several built in Events such as the Click event. When a user clicks on an object, if the object contains an Event Handler for the Click event, then the code within the Event Handler will be executed. Custom Event Handlers can also be created by the developer (MSDN – Raising an Event, 2006).

Although there are some similarities in the way events are handled using WebForms vs. WinForms, there are also some significant differences. Some events that are available for WinForms controls are not available for WebForm controls and vice versa, however, like WinForms, WebForms can be coded using any .NET language. (WDVL: WebForms, 2006). The main difference between events in WebForms vs. WinForms has to do with the way controls interact with the application. For instance, in WinForms applications the controls are always client-side, but with WebForms, the controls can be run on the server but rendered on the client. Similarly to WinForms, code can be added “behind” WebForm pages and controls based on Events (Find Tutorials, 2006).

Just like WinForms, when an event is raised on a WebForm, the Event Handler executes the code within the Event Handler Method. The difference is that, instead of executing immediately on the client, a message is sent to the web server, the event is handled on the server and then a message containing the output is sent back to the client from the server (TAKempis – ASP.Net Fundamentals, 2006).

Resources:

MSDN – Events in Visual Basic. (2006). Retrieved July 14, 2006 from http://msdn2.microsoft.com/en-us/library/ms172877.aspx

TopXML : Handling Events. (2006). Retrieved July 14, 2006 from http://www.topxml.com/dotnet/handling_events.asp

MSDN – Raising an Event. (2006). Retrieved July 14, 2006 from http://msdn2.microsoft.com/en-us/library/wkzf914z.aspx

WDVL: WebForms. (2006). Retrieve July 14, 2006 from http://www.wdvl.com/Authoring/Tools/NET/net2_4.html

Find Tutorials. (2006). Retrieve July 14, 2006 from http://tutorials.findtutorials.com/read/category/85/id/162

TAKempis – ASP.Net Fundamentals. (2006). Retrieved July 14, 2006 from http://www.takempis.com/aspnet_fundamentals.asp



Components vs. Classes
July 2, 2006, 3:46 am
Filed under: Advanced, Development

In general programming terms, a component is a reusable piece of code that can also be referred to as a class. However, classes and components are not necessarily the same thing. The main difference between a class and a component is that a component is graphical class, which is built into the IDE and can be dragged and dropped onto a class object (Classes vs. Components, 2006). A class may not necessarily be considered a component, but a component can be considered a class. A class is typically part of a larger entity known as a namespace. In the same respect, a namespace is simply a collection of classes. Classes are inherent in the object-oriented programming model. They are used as descriptors for objects. Objects are instances of classes. Different object-oriented languages have built-in classes. The .NET Framework is unique in that it offers set of built in namespaces and classes that are language independent. This means that whether you are coding in Visual Basic, C# or any other .NET language, they all make use of the same namespaces and classes. In addition, custom classes can be created to the developer’s specification. In any case, objects or instances of classes contain what are known as properties. Property types are inherent to the class that the object belongs to but each instance of an object can contain different property values (MSDN – TextBox Class, 2006). Here is an example of how to define a property value for an object, which is an instance of a class and part of an overall namespace

System.Windows.Forms.txtTextBoxObject.Text = “value”

Using the example above, the following statements are true

- System.Windows.Forms is the namespace

- TextBox is the class or component

- txtTextBoxObject is the object or instance of the TextBox class

- .Text is the property

- “value” is the property value for the object or specific instance of the TextBox class

In the example shown above the data type of the .Text property is string. Depending on the object and its available properties, the data type of a property may be a data type other than string. It may be a Boolean, integer, dataset, or even a custom defined data type. Property values can also be converted when assigned to a property of an object. For instance, a string value can be converted to an integer value which may actually be required if the property data type is integer. It is a good idea to add Option Explicit On and Option Strict On to class objects before actually coding them. Option Explicit On requires that all variables and their data types be explicitly declared (MSDN – Option Explicit, 2006). Option Strict On requires that values and their data types must be not be implicitly converted (MSDN – Option Strict, 2006). In other words, you must explicitly convert values to specific data types. Using these options decreases the possibility and frequency of runtime errors.

One of the most advantageous aspects of using components is the reusability factor. It is an extreme disadvantage to have to rewrite code repeatedly. Using components or classes and creating objects, then modifying each object and its properties as necessary can save a lot of time and energy when developing applications that use multiple objects with similar properties. Another advantage is that you do not always have to write your own code or develop your own components. There are many classes and components available that other developers have created which you can obtain and use in your own application. Some of these classes or components you may be able to download from the Internet free even. Some of the more complex classes you may have to purchase, but in many cases, the expense is worth not having to spend the time developing them from scratch.

The two main types of class data are Hidden and Exposed. Exposed data is available to the author and to the developer as well, but Hidden data is available only to the author of the class. The difference between an author and a developer is that the author is responsible for creating classes but the developer simply uses instances of classes. If while creating a class, the author specifies data as Hidden, then that data will not be accessible to the developer. Specifying the visibility of a variable determines whether it is Hidden or Exposed (DSU.edu – Instructor’s Notes). The visibility types for variables are Public, Friend, and Private. Public variables are exposed and accessible by other projects and classes. Friend variables are exposed to classes inside the same project but hidden to classes in other projects. Private variables are hidden from all other classes and only available from within the same class it is declared.

Resources:

Classes vs. Components. (2006). Retrieved July 2, 2006 from http://www.vbip.com/books/1861007167/chapter_7167_10.asp

 

MSDN – TextBox Class. (2006). Retrieved July 2, 2006 from http://msdn2.microsoft.com/en-us/library/system.windows.forms.textbox.aspx

MSDN – Option Explicit. (2006). Retrieved July 2, 2006 from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/valrfoptionexplicitrequireexplicitdeclarationofvariables.asp

MSDN – Option Strict. (2006). Retrieved July 2, 2006 from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/valrfoptionstrictenforcestricttypesemantics.asp

DSU.edu – Instructor’s Notes. (2006). Retrieved July 2, 2006 from http://courses.dsu.edu/cis251/VBNET/Ch%2012%20NOtes.htm



File Access
March 25, 2006, 4:18 am
Filed under: Advanced, Development

When working with files in an application, there are different methods of accessing the data within those files (File Access Types, Functions and Statements, 2006). One method, known as sequential file access is primarily used to read from and write to plain text files. The data within a text file may be separated into blocks through the use of a delimiter such as a comma or carriage return. When data is read from a text file, each block of text must be processed. This can significantly slow down the process of reading data from a file if the file contains a lot of data, in which case it may be faster to use the random file access method.

Random file access may be faster than sequential file access because it does not have to process every record in a file to access a specific record (Working with Random Access Files, 2006). If random file access is to be used, the data within the text file must be structured using specified record lengths and fields. Random file access can also be used to access binary files as long as the data is structured. If the data is not structured or the record lengths and data types are unknown, then it is possible to use another method of accessing data known as binary file access, however if the binary file access method is used, the order in which data is written to the file must be known (Working with Binary Access Files, 2006).

An example of sequential file access would be accessing data on a magnetic tape whereas accessing data on a disk, such as a CD or a hard drive would be considered random file access (What is Random Access?, 2006). Sequential file access would be more beneficial than random or binary file access in a case where each record in a file must be accessed in the same order. For instance, if you have a text file that contains a list of numbers and you need to calculate a running total of the numbers. However, if you were working with a file that contained a lot of data and you needed to quickly access a specific record, such as an address, you would use the random file access method rather than the sequential or binary access method. Binary file access would be the preferred file access method in a situation where you need to read from or write to a file other than a plain text file. For instance, if you needed to access a specific file within a .zip file, you would use the binary file access method because it is capable of accessing files that contain variable length data (Reading from and Writing to a File Opened for Binary Access, 2006).

References:

Halvorson, M. (2003). Microsoft Visual Basic .NET Step By Step.

United States of America: Microsoft Press

File Access Types, Functions and Statements. Retrieved March 25, 2006 from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vbconSequentialFileAccess.asp

What is Random Access?. Retrieved March 25, 2006 from http://www.webopedia.com/TERM/R/random_access.html

Working with Random Access Files. Retrieved March 25, 2006 from http://java.sun.com/docs/books/tutorial/essential/io/rafs.html

Working with Binary Access Files. Retrieved March 25, 2006 from http://support.microsoft.com/default.aspx?scid=kb;en-us;151335

Reading from and Writing to a File Opened for Binary Access. Retrieved March 25, 2006 from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vagrfwritingtofileopenedforbinaryaccess.asp



Software Piracy
December 15, 2005, 4:27 am
Filed under: Advanced, Development, Security

Any company that develops and distributes software for profit must deal with the issues revolving around software theft. When software is stolen, it is known as piracy. To legally guard against piracy, software developers include with their software a licensing agreement, which states under which circumstances a person is allowed to use, copy and/or redistribute their software (Cashman, Shelly, & Vermaat, 2004, p. 359). There are different licensing models available from which developers can choose.

Some of the different licensing models include single-user licensing, multi-user licensing and on-demand licensing. A single-user license is commonly used when distributing desktop software such as word processing and graphics applications. A single-user licensing agreement typically states that the software may be installed on one computer only and that one backup copy of the software can be made. If the software is removed from the computer, it may be sold or given to someone else. The software may not be installed on a network server or on multiple computers (Cashman et al., 2004, p. 360). To install software on a network or on multiple computers, software distributors will often require the purchase of a multi-user license (EditPad Pro, 2005). Often times, a software company will offer multi-user licenses at somewhat of a bulk discount price however it is up to the company to determine the overall cost. Another type of licensing agreement that is gaining popularity is known as on-demand licensing, or subscription based licensing (CNET, 2005). In the on-demand licensing model, a user purchases the right to use a company’s software on a limited time basis. For instance, a company might agree to allow the user to access their software for a 12-month period, after which time the user may purchase another license or discontinue use of the software. In an on-demand hosted environment, the software is actually located at the software vendor’s location but can be accessed by the customer during their subscription period (Sand Hill, 2005). This type of licensing model offers the most benefit to the actual software developer because it provides them with more control over how the customer uses their software. They are able to cut off access to their software as needed which reduces the risk of unauthorized access and virtually eliminates the possibility of illegal redistribution.

I would recommend that any software development company if possible, adopt the on-demand hosted licensing model, as it will provide the most security when dealing with issues revolving around software piracy.

References

Cash Cashman, T.J., Shelly, G.B, & Vermaat, M. E. (2004). Discovering Computers: Fundamentals editions. Boston: Course Technology

EditPad Pro. (2005). Retrieved December 15, 2005 from
http://www.editpadpro.com/multiuser.html

CNET. (2005). Retrieved December 15, 2005 from
http://news.com.com/Software+No+longer+business+as+usual/2100-1012_3-5958760.html?tag=html.alert

Sand Hill. (2005). Retrieved December 15, 2005 from http://www.sandhill.com/opinion/editorial.php?id=56