Tuesday, November 29, 2011

Building and Using Information Conscious Classes in Visual FoxPro Applications Component 1: Utilizing Visual Class Libraries for Data Access and Home business Rules

Implementing a strategy or strategy implementation is defined as "the translation of strategy into organisational action through organisational structure and design, resource planning and the management of strategic change".

The next component in the implementation stage of the strategy is the management of strategic change. It could also be a change in strategy that will necessitate the change.

Associated with management of strategic change is the problem of change management. Abstract: Visual Class Libraries allow you to build powerful Visual FoxPro applications and to implement powerful Object Oriented features. This article (Part 1) will discuss how to build data aware Visual FoxPro classes for use in your pure Visual FoxPro desktop code. Code contained in a class can be accessible once you create an instance of that class for use in your code.

In , classes are contained in Visual Class Library (.vcx) files or you could even dynamically create one in code using the CREATE CLASS command. You could open the employees table, scan until you find the employee record and then check its status field! Lets imagine that you had the following table called Employee in a Visual FoxPro Database:

CREATE TABLE Employees (EmpID I NOT NULL AUTOINC NEXTVALUE 1 STEPVALUE 1 PRIMARY KEY

The Employees Class

The Employees class will provide the data services required by your application’s form including saving information, deleting data and searching for existing information and then returning these to the form as the need may be.

You can now organize your class based on the following class diagram:

Method

Delete an employee from the table

Method

Search for an Return an Employee Record

Create the Class

  • Select the Visual Class Library to which you want to add the new Employees class on the Classes tab and then choose the New button. The New Class dialog box displays.
  • Enter Employees on the Class Name box and then select Custom from the Based On drop down list box
  • Choose Ok.; The Class Designer displays.

Now that the Class Designer displays, you can proceed to add your properties to your class. You can add properties to your visual class by performing the following action:

  • Choose the New Property menu command from the Class main menu.
  • In the Name box, type the name of your property. For example, EmpID.

  • If you set visibility to Hidden, only members of your class will see it.
  • In the Default/Initial value field, initialize the value of the property.
  • Choose the Add button to add the class.

  • Repeat this action to add all the properties in your class.

  • Choose the New Method menu command from the Class main menu. The New Method dialog box displays.


  • In the Description box, type the description of the class.
  • Choose the Add button to add the method.

  • In the Visibility box, choose Public. Like properties, methods could either be Public, Hidden or Protected.

  • Add Code to your methods

    Visual FoxPro would give the control the name Employees1.

    THISFORM.Employees1.EmpID = THISFORM.txtEmpID.Value

    THISFORM.Employees1.EmpName = THISFORM.txtEmpName.Value

    THISFORM.Employees1.EmpDept = THISFORM.txtEmpDept.Value

    THISFORM.Employees1.EmpStatus = THISFORM.txtEmpStatus.Value

    lAnswer = THISFORM.Employees1.Save(“Data Aware Class”)

    IF NOT lAnswer

    ; cMsg = “Record not saved successfully!”

    ; MESSAGEBOX(cMsg,64,”Data Aware Class”)

    ; RETURN

    ENDIF

    THISFORM.cmdNew.Click; Clear form for new/next record

    ; cMsg = “Enter an employee name!”

    ; RETURN .F.

    ; ENDIF

    ; IF USED(“Employees”)

    ENDIF

    SELECT Employees

    IF THIS.EmpID <= 0

    ENDIF

    REPLACE Employees.EmpName WITH THIS.EmpName

    ENDIF

    RETURN .T.

    Find and Return a Record

    Another critical service that your class would perform would be to search the table for an existing record and then return that record to you. Your Data Form could contain a Find button whose click event could contain the following code:

    IF THISFORM.txtEmpID.Value = 0

    ; MESSAGEBOX(cMsg,64,”Data Aware Classes’)

    ; RETURN

    lAnswer = THISFORM.Employees1.FindEmployee(THISFORM.txtEmpID.value,”Data Aware Classes”)

    IF NOT lAnswer

    ; MESSAGEBOX(cMsg,64,”Data Aware Classes”

    ; THISFORM.txtEmpID.Value = 0

    ; THISFORM.txtEmpName.Value = THISFORM.Employees1.EmpName

    ; THISFORM.txtEmpDept.Value = THISFORM.Employees1.EmpDept

    ; THISFORM.txtEmpStatus.Value = THISFORM.Employees1.EmpStatus

    The code in the FindEmployee method of the class could then look like this:

    IF nEmpID = 0; No employee ID supplied…exit

    IF USED(“Employees”); If file is already in use…use it

    SELECT Employees

    LOCATE FOR Employees.EmpID = THIS.EmpID

    ; IF NOT lFileInUse Close the table

    IF NOT lFileInUse Cloise Table if we opened it

    Your form could call the class method to perform the deletion by having code such as this:

    IF THISFORM.txtEmpID.Value = 0

    ; cMsg = “Display an existing record and then try again!”; MESSAGEBOX(cMsg,64,”Data Aware Classes”

    lAnswer = THISFORM.Employees1.RemEmployee(THISFORM.txtEmpID.Value,”Data Aware Classes”)

    IF NOT lAnswer

    MESSAGEBOX(cMsg,48,”Data Aware Classes”)

    cMsg = “Record was successfully deleted!”

    MESSAGEBOX(cMsg,64,”Data Aware Classes”)

    The above code calls the Class module with the line lAnswer = THISFORM.Employees1.RemEmployee. Now the RemEmployee class can have the following code:

    LOCAL cMsg, lAnswer, lFileInUse

    IF nEmpID = 0; No employee record was supplied

    IF USED(“Employees”)

    SELECT Employees

    IF NOT FOUND()

    ; IF NOT lFileInUse Close the file

    IF NOT lFileInUse

    In the Code above, the calling procedure passes the employee ID of the record to be removed to the RemEmployee method of the class. The method checks for and opens the table if need be and then uses a LOCATE command to check to see if the record already exists.

    Using your class

    Monday, November 21, 2011

    Leadership and Decision-Making

    Leadership and Decision-Making

    Leaders can only make fine decisions when they have knowledge and skills that are consistent with the level of complexity related with their job. Complexity can come from 1 of 3 sources: organizational complexity, leader complexity, and choice complexity.

    When hiring leaders, organizations should look at the candidates' abilities and the complexity of the role. Thompson suggests that the function performed in an organization can be categorized into 1 of five levels of complexity:

    Production level. The vast majority of workers (70 to 80 percent) perform at the production level of an organization. Their function is related with creating goods or services.

    Tactical level. Personnel at this level organize and lead perform teams. The function is not complex. Tactical leaders use linear reasoning processes and can predict with high accuracy how solutions will work.

    Organizational level. Complexity increases at the organizational level. Leaders are responsible for managing massive groups within the organization.

    Strategic level. Strategic work is abstract in nature, while production, tactical and organizational function is concrete. The objective for leaders at the strategic level is to build objectives that will be executed more than extended periods of time, such as 36 to 60 months.

    Visionary level. Function at this level is difficult and covers quite extended time spans. Leaders at the visionary level are responsible for achieving the organization's vision through the use of global resources.

    A different very important consideration is leader complexity. This is defined as an individual's ability to manage the job requirements.

    Leader complexity is determined by two factors: Learned skills, such as leadership abilities, technical expertise, perform experience, and understanding of the enterprise. Innate skills, such as cognitive ability, emotional intelligence, motivation, and personality. Cognitive capability is especially crucial for the reason that it affects how leaders strategy choice making. Leaders with high cognitive ability use several various dimensions to process information and facts.

    They can deal with the high levels of ambiguity and inconsistency that regularly exist in complicated organizational environments. Emotional intelligence is also very important for leaders due to the fact it contributes to productive interpersonal interactions.

    Profitable senior leaders just about consistently exhibit high levels of emotional intelligence. Selection complexity is generally related with nonroutine choices that have no regular solutions.

    As leaders make decisions, they use either a rational strategy or an intuitive technique. Rational choice making is logical, sequential, and analytical.

    The choice maker identifies several solutions and then selects the very best option. Rational choices are frequently much more complex and take longer than intuitive decisions which are made promptly and unconsciously.

    Friday, November 18, 2011

    Trimble Surveying Solutions - Total System, GPS and Terramodel Computer Software

    Trimble Surveying Solutions - Total System, GPS and Terramodel Computer Software

    Trimble provides a wide range of equipment for surveying and related industries. With over 850 patents, each and every piece of equipment and software program plan provides the highest accuracy and the most innovative functions out there to surveyors now.

    Trimble surveying equipment contains advanced total station units which make surveying considerably alot more accurate than was offered with previously used survey tools and procedures. The newest innovations involve capabilities particularly for engineering or construction applications. Optical and mechanical total stations for sophisticated engineering tasks and everyday surveying offer the industry's most advanced tools and methods and optimum efficiency on the job internet site by way of their accurate and flexible style. Optical total stations allow surveyors to pinpoint an precise location by combining conventional surveying tools with GPS receivers, rather than requiring measurements and GPS locating as two discrete actions in the surveying approach.

    Preferred known for GPS technology, Trimble provides GPS, laser, optical and inertial positioning technologies packaged with application software, wireless communication techniques, and other devices. Their positioning solutions contain GPS when paired with software and a base station, location can be determined inside a centimeter, delivering the accuracy necessary for complicated surveying projects.

    Other location determination techniques supplied by Trimble incorporate lasers to identify level, grade, vertical alignment, and distance. The one of a kind laser technology strategies combined with scanning methodology capture the shapes of physical structures, converting them into a digital format. Identified as 3D laser scanning, this technology is on the cutting edge of civil engineering and surveying projects.

    Terramodel laptop or computer software gives surveyors and those in the construction industry an opportunity to depict surveying data in a significantly more readily understandable format. Transfer files from Trimble total stations to software solutions for processing and 3D modeling. Terramodel is a effective computer system software program plan for surveyors, civil engineers, and contractors. This CAD and design package makes it possible for the transformation of raw survey information into a 3D model.

    Terramodel software program uses raw information collected working with Trimble instruments. The software makes it possible for all of the needed calculations, from generating contours to calculating volumes to roadway styles. Use the 3D Visualizer function of Terramodel to view an interactive 3D model, generating the style approach highly effective. Terramodel is an terrific selection for digital terrain modeling wants or surveying computations. The CAD functions readily available in Terramodel permit the performing of surveying, engineering, surface modeling, and CAD tasks, all in one plan, producing it an ideal option for a large number of surveyors.

    The Trimble Access personal computer software suite harnesses the energy of connectivity, permitting surveying teams to easily connect no matter whether in the workplace or in the field. Surveying teams can conveniently send surveying information, not men and women, back and forth.

    Trimble surveying equipment and software program, from total stations to GPS receivers to Terramodel software program for processing the raw information, yield accurate survey results and assist in the processing of this data quickly, permitting surveyors to deliver a high-high quality product relevant to actual world applications in a timely manner. Integrated solutions allow surveyors to collect, manage, and analyze complicated information faster, supplying way more effective results.