Google Groups
Subscribe to Software Outsourcing [ Hire Dedicated Group ]
Email:
Visit this group
Showing posts with label Php Development. Show all posts
Showing posts with label Php Development. Show all posts

Wednesday, May 27, 2009

Hire PHP developer for Open Source Customization & Custom PHP Web Development

PHP is one of the fastest growing web scripting languages on the Internet today, and for good reason.

PHP (which stands for Hypertext Preprocessor) was designed explicitly for the web. Designed in 1994 to enable the creation of dynamic web pages quickly and easily, PHP has exploded in growth and has been adopted by major vendors such as Linux that have included the language with their web servers. PHP is mostly used in conjunction with MySQL Database for web development services like Open Source Ecommerce Websites, Open Source CMS based Websites, & Custom PHP based web applications. This works on Linux Apace MySQL PHP (LAMP) Environment.

PHP Web development is becoming increasingly popular in web development industry mostly because of the fact it is open source. In easy words what Open source Means is you can install a popular ecommerce solution or cms solution and customize it as per your requirements and you have your website up and running in matter of a week.

t Profit By Outsourcing We do Open Source Customization for Popular ecommerce engines (like oscommerce Customization, zen cart Customization, x cart Customization, CS cart Customization, virtuemart customization, and magento customization), CMS engines (Mambo Customization, Joomla Customization, Drupal Customization, typo3 Customization, phpnuke Customization and expression engine customization). Apart from this we also do Custom PHP Web Development.

At Profit By Outsourcing, we provide 2 Options:

• You can hire there Own team of Dedicated PHP Programmer(s) from Profit By Outsourcing, who will work dedicatedly and exclusively on your Projects for 176hrs/mo and will provide a daily work status reports at close of play.
• You can also work with Profit By Outsourcing on a project basis, where we agree on a total project cost for your php web development requirements before project commencement, the cost is calculated on basis of project specifications provided.

Tuesday, December 9, 2008

PHP Zend Framework 1.7 adds Adobe support

The open source Zend Framework 1.7 is now available expanding the PHP framework to work better with Adobe Flex and AIR applications. Adobe and Zend announced back in September that they would be collaborating for Zend Framework and now they've delivered.

"Adobe and Zend have been working together to make Flex and AIR application development much easier for PHP developers," Zend co-founder Andi Gutmans blogged " This announcement marks a significant milestone in those efforts with the production release of the Zend_Amf component in ZF 1.7. Now PHP 5 developers can use the open, binary AMF3 protocol (think of it as ActionScript's native tongue) as easily as any other server-client protocol in Zend Framework."

Action Message Format (AMF) is the protocol that Flex uses to talk to the back end enabling both Flex and Flash based applications to exchange data with servers.

The Zend Framework 1.7 also includes some other neat features that PHP developers will likely benefit from. Among them is the ZendX_JQuery module which provides integration with the JQuery JavaScript toolkit. There is also support in the Zend_Search_Lucene module for indexing Office Open XML documents which could be a very useful thing too.

The 1.7 release comes just under three months after the Zend Framework 1.6 release which made Figlets into something useful for CAPTCHA (if you haven't read that story, you should). Great to see that regular progress continues to be made on this PHP framework. It's something that continues to re-inforce the fact that PHP is still a very modern and capable language for web application development.

Source:- blog.internetnews.com/

Wednesday, September 24, 2008

Partners Support on VMware vCloud Initiative

Attenda
“As ISVs adopt the SaaS model, they are looking to roll out their offerings quickly but with the minimum investment until they have grown their subscriber base,” said Simon Hansford, vice president, products and marketing, Attenda. “Leveraging the VMware vCloud Initiative will allow Attenda new ways of delivering this, whilst allowing our SaaS providers to scale rapidly.
We already find that ISVs adopting SaaS greatly benefit from the increased agility, improved availability and reduce costs that VMware delivers. As a hosting provider leveraging the vCloud initiative, Attenda will be able to offer our ISV clients a far more adaptable resource model that will enable more innovative software products, faster development and the potential for differentiated business models.”

British Telecom
“BT already uses VMware's current ESX technology as a key component of our virtual data centre capability,” said Stefan van Overtveldt, VP Emerging Technology & Innovation, BT Global Services. “It underpins both our internal IT requirements and our external customer journey: Operational Efficiency IT. BT is working closely with VMware on various initiatives to offer our customers across the globe BT's Service Oriented Infrastructure. This next generation of networked IT services will join together the management of network and compute capacity to achieve integrated service levels. BT's Service Oriented Infrastructure strategy and roadmap is aligned with VMware's vCloud initiative.”

CDW
“We currently provide Infrastructure as a Service using VMware,” Clint Harder, sales and product development manager, hosting and managed services, CDW. “Hosted Enterprise Infrastructure is our most in-demand hosted service. The additional of vCloud will let us integrate our Hosted Enterprise Infrastructure into customer VMware infrastructure to provide geographically disperse, high availability application infrastructure. We are very excited about the hosted service opportunities.”

Checkpoint
“The VMware vCloud Initiative will enable customers to have better visibility into how their cloud-based infrastructure is laid out,” said Juliette Sultan, head of global marketing at Check Point Software. “This knowledge will enable them to better deploy security as part of the cloud. As the only company that enables organizations to integrate physical network security and security in the cloud, Check Point sees the opportunity to help customers move into cloud computing securely and more easily.”

Cincinnati Bell
“VMware vCloud has enabled CBTS to build Virtual Data Center our next generation of computing services,” said Dave Heimbach, vice president, product development, Cincinnati Bell. “vCloud enables us to deliver an architecture that brings enterprise class, secure and flexible cloud services, from simple to complex. The vCloud platform allows us to scale our service offerings from providing the virtual infrastructure to run applications to redundant disaster recovery sites.”

Cisco
“Cloud computing is creating new and innovative solutions to meet the demanding computing, storage and IP resource needs of applications,” said Ed Bugnion, vice president and chief technology officer for Server Access and Virtualization Business Unit for Cisco. “Cloud initiatives, like VMware’s vCloud Initiative, supported with the power and intelligence of the Cisco network platform will make it easier for companies to leverage both public and private cloud services, that offer highly secure, cost effective off-load and disaster recovery processing capabilities. This enables rapid deployment of new virtual machines with the appropriate security, network and application policies and more importantly, transfers those policies as virtual machine workloads migrate within private clouds and between clouds.”

DELL
"Dell supports the vCloud Initiative as it makes it easier for enterprises and service providers to implement and provide cloud computing services," said Forrest Norrod, vice president and general manager, of Data Center Solutions at Dell. "Dell helps power the world's clouds by offering customized hardware solutions and management services and we see vCloud as a key to enabling more customers to adopt cloud computing."

Elastra
“The first step, and the first challenge, in building and deploying cloud-based infrastructure has always been the effort involved in consolidating hardware, network, and storage resources,” said Kirill Sheynkman, president & CEO of Elastra Corporation. “The vCloud Initiative from VMware makes these challenges significantly less daunting. Now, ISPs and IT organizations can focus on the architectural challenges of designing application systems instead of scripting their installations and can have a choice of where these systems are easily deployed -- principles that have always been driving Elastra’s technology vision. We look forward to a productive relationship with VMware as our product suite, which already supports VMware ESX deployments, fully embraces and supports the deployment of Elastra Cloud Server designs onto the vCloud platform.”


EMC
“EMC fully supports VMware’s vCloud Initiative as we see virtualization playing a key role in this important and evolving market,” said Jeff Nick, CTO and senior vice president, EMC. “Together with VMware’s technologies, EMC can draw on its broad solutions portfolio and experience in replication, business continuity, virtualization, security and software-as-a-service to enable IT resource mobility, flexibility and end-to-end security in the cloud. These capabilities offer powerful business value for enterprises to provide transparent mobility of information and applications into and out of the cloud back to their own data center when business needs arise.”

EngineYard
"Since 2006, Engine Yard has provided a leading software stack for serving enterprise-level Ruby & Rails applications. By porting our stack to vCloud, we're offering customers a compelling new option for deploying their applications across many different forms of infrastructure."

F5
"vCloud promises a uniquely flexible enabling technology that opens up the door to cloud computing for enterprises of all sizes,” said Erik Giesa, vice president, product management, at F5. “F5 enables vCloud users to transition their application traffic to and from vCloud service providers whenever needed, instantly, seamlessly and without performance impact. F5’s BIG-IP Global Traffic Manager (GTM) product achieves this by checking the health of the new site before routing any traffic and continuously monitoring performance over time with specific checks for enterprise applications like SAP, Oracle and Microsoft Exchange. And, whenever multiple data centers are involved, GTM ensures the best possible performance by directing application traffic from each unique end-user to the most appropriate data center based on geographic proximity, quality of service or business criteria.”

Fujitsu-Siemens
"The VMware vCloud Initiative together with a broad range of our solutions and services enable customers to take advantage of ad hoc services provisioning in a most flexible way and to focus on their business without worrying about capacities or management of these highly complex infrastructures,” said Dr. Joseph Reger, CTO, Fujitsu Siemens Computers “VMware vCloud perfectly fits into our future directions of Dynamic Datacenter.”

Hosting.com
“VMware, through their vCloud Initiative will revolutionize the hosting industry just as the virtual private server did in the early 2000s,” said Darren King, CEO of Hosting.com. “VMware’s Infrastructure allows Hosting.com to provide a secure, scalable utility solution – CloudNine – to provision, support and consult with clients at a level previously unavailable in the hosting industry. VMware and the vCloud ecosystem enable our CloudNine solution to seamlessly provide disaster recovery, shared storage and utility computing to both Enterprise and SMB clients in a cost-effective model.”

INSIGHT
“As the first U.S. VMware aggregator in the enhanced VMware Service Provider Program, Insight can now offer enterprise-ready VMware vCloud services to our hosting clients using VMware market leading technology,” said David Casillo, senior vice president of strategic partnerships & marketing at Insight.

Intel
”For Enterprises IT and Cloud Computing providers who need to bridge the gap between business demands and current capacity, or connect with a broad partner ecosystem to easily integrate cloud computing services into existing IT infrastructures, the Intel VT enabled family of products, combined with VMware VI, is the foundational platform that provides the performance, reliability and scalability that enables the delivery of new virtualization 2.0 based services such as Infrastructure Aggregation, Resource Elasticity, and High Availability,” said Diane Bryant, CIO, Intel Corporation

INX
“As a VSPP partner for many years, INX, Inc. has leveraged not only the VMware Infrastructure virtualization platform to host disaster recovery services, but also offers convenience to customers by delivering virtual appliances on demand,” said Steve Kaplan, vice president, data center virtualization practice, INX, Inc. “We’re excited about how the VMware vCloud Initiative will continue to drive on and off premise application support, while extending our ability to bring new services to our customers.”

Joyent
“At Joyent, we believe the future of cloud computing is enabling customers to maximize their own on-premise clouds while taking advantage of off-premise clouds when needed and as required. This principle of federation is fully supported by Joyent using VMware’s vCloud offerings,” said David Young, founder and CEO of Joyent. “Joyent is now able to offer enterprise customers the future of cloud computing today.”

NEC
“We at NEC welcome the foundation of the VMware vCloud Initiative,” said Takayuki Okada, associate senior vice president, NEC Corporation. “Cloud computing has high expectations as next generation system and service infrastructure. We are sure that the VMware vCloud Initiative will mark a turning point of cloud computing for further disseminating. NEC offers cloud computing environments by delivery of comprehensive products and services from hardware such as servers and storage, middleware and system integration technology for SOA, and service providing infrastructure such as SaaS and PaaS.”

NetApp
"NetApp is a leader in the market today in delivering critical storage capabilities needed to build scalable and cost-effective cloud infrastructures," said Rich Clifton, senior vice president and general manager, Virtualization and Grid Infrastructures Business Units, NetApp. "These include virtual storage volumes, rapid provisioning, deduplication, Ethernet storage fabrics, and scale-out architectures. Additionally, NetApp provides the data protection features to ensure data integrity, recoverability, and isolation within a shared infrastructure. We're excited to partner with VMware in driving the vCloud initiative."

NewLease
"Our Hosting Partners can now offer enterprise-ready cloud services due to VMware,” said Dawn Edmonds, chief operating officer, NewLease Pty Ltd “NewLease is Australia's leading provider of licensing and licensing support for hosters and managed services providers. The addition of VMware to our offerings means that our hosting/managed services partners can deliver highly reliable services to their customers from a centrally managed infrastructure.”

Rackspace
“Rackspace works closely with VMware on many fronts and we believe that VMware’s vCloud framework fits our vision for the next generation of enterprise cloud-based services” said Emil Sayegh, vice president of product group at Rackspace Hosting. “Our current VMware-based offerings will allow corporations to extend the boundaries of their datacenter, and take advantage of external computing resources seamlessly. The combination of Rackspace and VMware can empower users to run their enterprise applications at the location that best meets their business needs.”

Radware
"Our solution for optimizing the virtual environment enables enterprise, service provider, and SMB customers alike to take full advantage of the multiple benefits that VMware’s vCloud offers – specifically, our solution enables transparent migration, without any code change, to an external cloud for mission critical applications as well as SLA assurance for applications deployed in the cloud,” stated Ilan Kinreich, chief operating officer, Radware.

RightScale
"RightScale strongly supports VMware's vCloud Initiative and its capability to provide a common set of cloud infrastructure services from enterprises to public clouds,” said Michael Crandell, CEO, RightScale. “We will continue to work with VMware to leverage vCloud's elastic scalability and dynamic provisioning within RightScale's cloud management platform to deliver scalable, resilient, high-performance cloud applications."

SAVVIS
“Utility computing was the forerunner for what evolved into the enterprise cloud computing solutions we are seeing today,” said Bryan Doerr, CTO, SAVVIS, Inc. SAVVIS pioneered a virtualized IT services delivery platform and now offers VMware-based virtualized services. “As enterprises design new systems they will need to optimize security, performance, and reliability attributes along with the scalability of cloud solutions to meet a range of enterprise requirements.”

Siemens
“Our partnership and leverage of VMware technologies such as vCloud allows us to deliver a global compute platform that offers our internal and external customers access to business services regardless of location or device,” said Michael Kollar, chief architect, Siemens IT Solutions and Services, Inc. “This platform is based on a tiered service model that dynamically scales compute resources to meet customer and business needs.”

SkyTap
“vCloud will give our customers even more control of VMware infrastructure in the Skytap cloud through standard APIs and seamless transition of virtual machines between onsite and cloud environments,” said Scott Roza, CEO, Skytap, Inc. “Utilizing Skytap’s ‘hybrid’ cloud computing model with vCloud has tremendous potential to improve IT’s responsiveness to the business while increasing efficiencies and lowering cost.”

SugarCRM
“SugarCRM is pleased to be working with VMware on its vCloud Initiative,” said Paul Oh, vice president of technology alliances, SugarCRM “The VMware vCloud Initiative advances SugarCRM’s vision of unlocking Customer Relationship Management (CRM) from the chokepoints of proprietary SaaS vendors and moving application services to a shared cloud infrastructure. vCloud is a win for web-based computing, open standards and, most importantly, for customers.”

SunGard
“SunGard is excited to be a part of VMware’s vCloud initiative. New business needs will arise to support end-to-end availability as organizations embrace cloud-based models,” Frank Casey, vice president, product strategy, SunGard Availability Services. “SunGard's expertise and capabilities will enable clients as they leverage cloud solutions while helping to ensure Information Availability.”

Sun Microsystems
"The combination of vCloud and Sun Microsystem's x64 servers creates a powerful, energy-efficient foundation for delivering cloud services," said John Fowler, executive vice president, Systems Group, Sun Microsystems. "Sun's x64 systems and software give customers the performance, reliability, flexibility and massive scaling required for a broad range of applications in a cloud computing environment."

Terremark
“Terremark's Enterprise Cloud platform supports the VMware vCloud Initiative to serve customers with the agility, scalability and performance required for their applications and their businesses,” said Randy Rowland, senior vice president of product development, Terremark.

Third Brigade
“Moving ‘into the cloud’ removes physical computing limitations, but it also bypasses the policy protection provided by your network security perimeter,” said Bill McGee, vice president, products and services, Third Brigade. "Third Brigade host intrusion defense enables you to re-establish consistent security policy on internal and external cloud resources. Integrating with VirtualCenter, VMsafe APIs and the new vCloud platform, Third Brigade's cloud-ready security offerings make it possible to apply location-aware security policy to virtual machines."

T-Systems
“As a global provider of converged IT and telecommunication (ICT) services, we at T-Systems continue to leverage industry-leading products and technologies from VMware in order to provide flexible, high-quality utility and cloud computing enterprise application services for our business customers,” said Dr. Gregory O. Smith, vice president technical deal solution design, T-Systems North America.

Verizon Business
“The launch of VMware vCloud will further enable our customers to take advantage of cloud computing,” said Chris Gesell, director of IT Solutions product marketing of Verizon Business. “Through our expansive global IP network, worldwide data center footprint and rich skill set, Verizon Business is uniquely positioned to help customers harness the power of cloud computing, which will make their infrastructure more efficient and agile.”

WorkStream
“Workstream SaaS Talent Management Suite is enabled through the vCloud, providing highly available web services on demand in Workstream's Version 7 SOA (Service Oriented Architecture) across a diverse technology platform,” said Michael Gioja, CIO of WorkStream.
“VMware templates and snapshots enable reliable and consistently provisioned multiple environments for development, client configuration, user acceptance testing and production usage while maintaining the expected R&D advantages such as single code line, multi or single tenant applications.”


source:- vmware.com/

Monday, September 15, 2008

Zend Framework Coding Standard for PHP

Naming Conventions

1. Classes: -

Zend Framework standardizes on a class naming convention whereby the names of the classes directly map to the directories in which they are stored. The root level directory of the ZF standard library is the "Zend/" directory, whereas the root level directory of the ZF extras library is the "ZendX/" directory. All Zend Framework classes are stored hierarchially under these root directories..

Class names may only contain alphanumeric characters. Numbers are permitted in class names but are discouraged in most cases. Underscores are only permitted in place of the path separator; the filename "Zend/Db/Table.php" must map to the class name "Zend_Db_Table".

If a class name is comprised of more than one word, the first letter of each new word must be capitalized. Successive capitalized letters are not allowed, e.g. a class "Zend_PDF" is not allowed while "Zend_Pdf" is acceptable.

These conventions define a pseudo-namespace mechanism for Zend Framework. Zend Framework will adopt the PHP namespace feature when it becomes available and is feasible for our developers to use in their applications.

See the class names in the standard and extras libraries for examples of this classname convention. IMPORTANT: Code that must be deployed alongside ZF libraries but is not part of the standard or extras libraries (e.g. application code or libraries that are not distributed by Zend) must never start with "Zend_" or "ZendX_".

2. Filenames: -

For all other files, only alphanumeric characters, underscores, and the dash character ("-") are permitted. Spaces are strictly prohibited.

Any file that contains PHP code should end with the extension ".php", with the notable exception of view scripts. The following examples show acceptable filenames for Zend Framework classes.:

Zend/Db.php
Zend/Controller/Front.php
Zend/View/Helper/FormRadio.php

File names must map to class names as described above.

3. Functions and Methods: -

Function names may only contain alphanumeric characters. Underscores are not permitted. Numbers are permitted in function names but are discouraged in most cases.

Function names must always start with a lowercase letter. When a function name consists of more than one word, the first letter of each new word must be capitalized. This is commonly called "camelCase" formatting.

Verbosity is generally encouraged. Function names should be as verbose as is practical to fully describe their purpose and behavior.

These are examples of acceptable names for functions:

filterInput()
getElementById()
widgetFactory()

For object-oriented programming, accessors for instance or static variables should always be prefixed with "get" or "set". In implementing design patterns, such as the singleton or factory patterns, the name of the method should contain the pattern name where practical to more thoroughly describe behavior.

For methods on objects that are declared with the "private" or "protected" modified, the first character of the variable name must be an underscore. This is the only acceptable application of an underscore in a method name. Methods declared "public" should never contain an underscore.

Functions in the global scope (a.k.a "floating functions") are permitted but discouraged in most cases. Consider wrapping these functions in a static class.

4. Variables: -

Variable names may only contain alphanumeric characters. Underscores are not permitted. Numbers are permitted in variable names but are discouraged in most cases.

For instance variables that are declared with the "private" or "protected" modifier, the first character of the variable name must be a single underscore. This is the only acceptable application of an underscore in a variable name. Member variables declared "public" should never start with an underscore.

As with function names (see section 3.3) variable names must always start with a lowercase letter and follow the "camelCaps" capitalization convention.

Verbosity is generally encouraged. Variables should always be as verbose as practical to describe the data that the developer intends to store in them. Terse variable names such as "$i" and "$n" are discouraged for all but the smallest loop contexts. If a loop contains more than 20 lines of code, the index variables should have more descriptive names.

5. Constants: -

Constants may contain both alphanumeric characters and underscores. Numbers are permitted in constant names.

All letters used in a constant name must be capitalized.

Words in constant names must be separated by underscore characters. For example, EMBED_SUPPRESS_EMBED_EXCEPTION is permitted but EMBED_SUPPRESSEMBEDEXCEPTION is not.

Constants must be defined as class members with the "const" modifier. Defining constants in the global scope with the "define" function is permitted but strongly discouraged.

Source:- framework.zend.com/

Saturday, September 13, 2008

Zend Framework Coding Standard for PHP

PHP File Formatting

1. General

For files that contain only PHP code, the closing tag ("?>") is never permitted. It is not required by PHP, and omitting it prevents the accidental injection of trailing whitespace into the response.
IMPORTANT: Inclusion of arbitrary binary data as permitted by __HALT_COMPILER() is prohibited from PHP files in the Zend Framework project or files derived from them. Use of this feature is only permitted for some installation scripts.

2. Indentation

Indentation should consist of 4 spaces. Tabs are not allowed.

3. Maximum Line Length

The target line length is 80 characters. That is to say, ZF developers should strive keep each line of their code under 80 characters where possible and practical. However, longer lines are acceptable in some circumstances. The maximum length of any line of PHP code is 120 characters.

4. Line Termination

Line termination follows the Unix text file convention. Lines must end with a single linefeed (LF) character. Linefeed characters are represented as ordinal 10, or hexadecimal 0x0A.

Note: Do not use carriage returns (CR) as is the convention in Apple OS's (0x0D) or the carriage return/linefeed combination (CRLF) as is standard for the Windows OS (0x0D, 0x0A).

Source:- framework.zend.com/

Monday, September 8, 2008

Zend Framework update focuses on AJAX integration

Zend has added integration with the Dojo JavaScript toolkit in the new version of its PHP programming platform.

Zend Framework 1.6, released yesterday, makes it easy to integrate AJAX and JavaScript with PHP applications, according to the company. There is a Dojo view helper for setting up the Dojo environment, along with form elements and decorators for integrating with Dojo’s Dijit library, which provides interface widgets. A new JSON-RPC server implementation and class can manipulate Dojo data envelopes in Zend.

Also new in Zend Framework 1.6 is interoperability with the SOAP Web services protocol, which Zend said makes connecting Web services to data across the Internet easier. New features around SOAP include client and server classes that can operate in both WSDL (Web Services Description Language) and non-WSDL modes, and auto-discovery. Unit testing features for controllers enable agile practices like unit testing and test-driven development, where a developer writes tests prior to writing code.

“Functional tests for your application will be much easier to write now that Zend Framework has built-in support for testing controllers,” said Wil Sinclair, Zend’s development manager.

Other new features and improvements are a component for displaying large data sets from multiple sources, a service providing text-based CAPTCHA images, and smaller XML documents that are easier to read, the company said.

Zend will tout version 1.6 at ZendCon 2008, taking place Sept. 15-18 in Santa Clara. The conference offers presentations and networking opportunities for PHP developers and business managers.


Source:- sdtimes.com/

Monday, April 14, 2008

PHP and OOP

PHP is mainly a procedural programming language. Procedural programming is so called because the program code gives a set of instructions (i.e. an algorithm) for processing a particular task or set of tasks.

When programming in a procedural manner, the programmer usually breaks down the task/tasks in a top-down manner; this means the program will end up being made of a number of function calls, which can in turn call further functions or tasks.

In procedural programming data is of secondary importance and is normally placed into structures (data structures). As we would expect this data is global to the whole program, allowing us to see and access every function or procedure in the program, each of which will be able to change that data.

This is a very important concept; it means that whenever we change the format of any data structure in our program, all the other procedures and functions that operate on that data will also have to be changed. This can lead us to have to make numerous changes, something we really wouldn't like to happen when developing software of any type.

For around forty years, the idea of thinking about software in terms of objects surrounds us everyday, and indeed we make use of them almost everyday. For example clicking a button in your text editor to change the font color, wakes up the button object, which in turn tells other objects in the program that it had been clicked and that the font color must be changed. Also when we navigate the channels in our digital boxes to check when a tv programme had started, we may use objects, or better an object-oriented programming software, without knowing it.

The idea of having objects communicating with each other to get, give, and process data is the core concept behind programming in object-oriented manner.

At the end, if you think about it, this is what happens exactly in the real world. Although we cannot say we are objects, we surely can say that we do communicate with each other in order to gain information or give information, and sometimes we use the functions provided by a object to carry out one or more task.

Think for example when we make a phone call. We use the phone object to reach someone who is far away from us.

In OOP happens exactly the same and we may say that software objects simulates the part of real world that concerns an application. This is often called application domain or problem domain.

Most recent versions of PHP have increased their support for object-oriented programming, giving the tools to create objects' definitions and have them communicate with each other to run tasks for an application.

PHP, being a web scripting language and born as a procedural programming language, doesn't have all the features of pure object oriented programming languages such as Java and SmallTalk but, still, the possibility to create objects in PHP can bring huge benefits in the form of code design and organization and for the creation of more complex web applications. One of the biggest advantages of OOP versus procedural programming is the ability to promote re-use of code (to improve productivity), as well as being able to adapt methodologies like UML (Unified Modelling Language) and documentors (for PHP is phpdocumentor) to provide API documentation for libraries of classes.

(Article Source: weberdev.com)

Wednesday, December 5, 2007

Object Oriented Prgramming (OOP) without classes!!!

Nowadays, object oriented programming (OOP) is quickly taking place over the traditional procedure oriented programming (POP). Success of the modern programming languages like C# and Java is obviously because of OOPs Power.

As all the OOP languages use CLASS or similar data structures for Object Oriented Programming, we have considered that without a "CLASS", OOP is not possible.

With the same idea in my mind, I’d briefly gone through the code base of "Drupal" - One of the most popular open source content management system and framework built with PHP language. I often read and heard many praise about the power of Drupal, but after the first look at the code base, I amazed that Drupal doesn’t use a single Class in it’s code base! Whole Drupal code base is based on just functions. As PHP, with which programming language Drupal itself is built, is also implementing many powerful OPP features, I could not understand why Drupal is not using these features!

As I’d not seen the keyword 'class' in Drupal code base, I evaluated Drupal as non-OOP as many programmers do. And that was my mistake! Even though, Drupal doesn’t contain any class like data structure, it is still Object Oriented. I realized this fact after details study of Drupal.

Actually, the OOP concept is not based on uses of data structures like CLASS. It is based on the fundamentals of features like Objects, Abstraction, Encapsulation, Polymorphism, Inheritance etc. If these fundamental features are included in programming then it can be considered in OOP.

Drupal covers all these features without classes. I also realized that the power of Drupal is hardly depends on this programming structure only. The way, how the hook system has been implemented in Drupal would never been possible with the use of Classes.

See more details about how Drupal implements Object Oriented Programming (OOP) without using Classes, visit: http://api.drupal.org/api/HEAD/file/developer/topics/oop.html

Thursday, August 9, 2007

PHP Ajax Frameworks

  1. AJASON : AJASON is a PHP 5 library and JavaScript client
  2. AjaxAC : AjaxAC is an open-source framework written in PHP
  3. Ajax Agent : powerful open source framework for rapidly building Ajax or Rich Internet Applications (RIA)
  4. Cajax : A PHP class library for writing powerfull reloadless web user interfaces using Ajax (DHTML+server-side) style
  5. CakePHP : Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
  6. Claw : a convenient and intuitive way of development of PHP5 driven object oriented applications.
  7. DutchPIPE : PHP object-oriented framework to turn sites into real-time, multi-user virtual environments:
  8. Flexible Ajax : Flexible Ajax is a handler to combine the remote scripting technology, also known as AJAX (Asynchronous Javascript and XML), with a php-based backend.
  9. Guava : Groundwork Guava is a PHP-based application framework and environment.
  10. HTML_AJAX : HTML_AJAX is a PEAR package for performing AJAX operations from PHP.
  11. HTSWaf : The HTS Web Application Framework is a PHP and Javascript based framework designed to make simple web applications easy to design and implement.
  12. My-BIC : My-BIC AJAX State of Mind for PHP harmony
  13. PAJAJ : PHP Asynchronous Javascript and JSON
  14. PAJAX : Remote (a)synchronous PHP objects in JavaScript
  15. phpAjaxTags : phpAjaxTags is a port to PHP from java tag library AjaxTags.
  16. PHPWebBuilder : PHPWebBuilder is a PHP framework designed following well-known object oriented designs and principles featuring a highly reusable components architecture, metadata based persistence and traditional GUI style programming support.
  17. Qcodo : open-source PHP 5 framework
  18. Simple AJAX : This tutorial demonstrates how to perform AJAX functionality simply and effectively, using the AJAX JSMX library, coupled with the JSON-PHP library.
  19. symfony : open-source PHP5 web framework
  20. TinyAjax : TinyAjax is a small php5 library that allows you to easily add AJAX-functionality to existing pages
  21. xajax : Ajax-enable your PHP application with a simple toolkit that gets the job done fast.
  22. XOAD : PHP based AJAX/XAP object oriented framework that allows you to create richer web applications
  23. Zoop : oop is an object oriented framework for PHP based on a front controller. It is designed to be very fast and efficient and very nice for the programmer to work with.
  24. Zephyr : zephyr is an ajax based framework for php5 developers.


Source

Friday, July 20, 2007

PHP 6 Overview

PHP 6, it seems, will make the leap and become a more clean environment - which is something I really appreciate.

The register_globals, magic_quotes and safe_mode will finally disappear and hopefully slowly fade away into distant memory. It seems PHP 6 will even refuse to start if these settings are found in php.ini. Dropping support for the long versions of super globals, like HTTP_POST_VARS, is also scheduled. This is long overdue.

One thing I at first was a bit hesitant to is moving all the database extensions out of the core into PECL. It looks like this is not set in stone and seems to be an ongoing discussion. After thinking about it myself I think it would be the right thing to do. It would boost the usage of PDO and make it more used and thus more mature. It would also clear up some of the confusion among newcomers in the PHP sphere. "Use PDO or make an active choice" - would probably be the best for the future of PHP.

SOAP is widely used today and good support for SOAP has been around as an extension you have to actively turn on if you needed it. It also has many limitations as has been discussed recently on the PECL-DEV mailing list. There is also a new PHP SOAP extension being developed that is using Apache Axis 2 from the Apache Foundation. I think what is suggested for PHP 6, to fix most of the remaining issues as well as implement support for some of the security extensions of SOAP, is the right way to go. I really think SOAP needs to be natively supported in PHP rather than having to depend on an external library as is the case with the Axis2 extension.

Named parameters to functions and methods has also been discussed. Even though I can remember how I enjoyed writing Smalltalk code with named parameters more than 10 years ago in university I don't think it should be implemented in PHP. Luckily those that decide on the roadmap thought the same as me.

Something that really annoys me today is that you can call methods both statically and dynamically whether they are marked static or not. It just doesn't make sense. This will in the yet distant PHP 6 generate an E_FATAL. Now that makes sense.

This above is all well but it is in the planned additions it gets really interesting. PHP 6 will have the opcode cache APC included in the core distribution. It will not be turned on by default - but I think this is the first small step towards a future with JIT compilation or something along those lines. Good UTF support is another thing that is sorely needed and it seems a lot of work will be directed to clean up the string handling in PHP 6.

Source: dotdavid.com

Drupal 7 and PHP

Article by PHP Open Source - PHP provides open source for the development.

----------------------

Drupal has long prided itself for staying ahead of the curve technologically. In order to be able to write the best quality Drupal software, Drupal developers need the best programming tools available. Today, the best PHP available is PHP 5.

PHP 5 has been deployed and tested in production environments for three years. Unfortunately, web hosts have been slow to adopt PHP 5, which has made it difficult for Drupal and many other PHP projects to fully embrace PHP 5's features.

Now a growing consortium of PHP projects have joined together and push for wider PHP 5 adoption. By all embracing PHP 5 together, the projects involved in the GoPHP 5 effort are sending a message to web hosts that it is time to embrace PHP's future.

Drupal is now part of that movement.

Drupal is such a powerfull opensource. It will be embaded now with php5. This new verson called Drupal 7 .

Drupal 7 is compitable with php5 or higher.

It was announced at drupal.org today, that Drupal 7 will be PHP 4 incompatible. This is a huge decision to take, since it will make it impossible for many to run Drupal 7.

By Offshore Software Development India - Php Development India
OffshoreSoftwareDevelopmentIndia.com

Monday, July 16, 2007

21 Things You Must Know About CakePHP

Easily creating static pages

I needed to create several pages that didn't use any models and contained static data inside the default layout. My first thought was to create a controller for these pages and define an action for each static page I needed. However, this solution seemed tedious and would make it difficult to quickly add new pages. Enter the pages controller - simply create a view inside the views/pages/ folder and it'll automatically be rendered in /pages. For example, if I created /views/pages/matt.thtml it would be accessible via http://www.example.com/pages/matt

Static pages - Adjusting the page title

If you're using the pages controller and you need to change the page title, add the following to your view:
<? $this->pageTitle = 'Title of your page.'; ?>

Static pages - Adjusting other data sent to the layout

If you need to send data to the layout (such as a variable indicating what section to highlight on the nav bar), add this to your view:

<? $this->_viewVars['somedata'] = array('some','data'); ?>

That array should then be accessible as $somedata inside your layout.

Creating a simple admin center

If you need to create an administrative back-end for your CakePHP site and would like all the actions with administrative capabilities to exist under a specific folder, open up config/core.php and uncomment:
define('CAKE_ADMIN', 'admin');
This will then make all actions that are prefixed with "admin_" to be accessible via:
/admin/yourcontroller/youraction. For instance, if I created an action in my posts controller called "admin_add," I would access this via: www.example.com/admin/posts/add
From there I could simply password the admin folder to prohibit unwanted users from adding posts.

Viewing the SQL queries that are running behind the scenes

You can easily see the SQL queries that CakePHP is running by adjusting the DEBUG constant in config/core.php. 0 is production, 1 is development, 2 is full debug with SQL, and 3 is full debug with SQL and dump of the current object. I typically have debug set at 2, which renders a table at the bottom of the page that contains SQL debug information.
If rendering a table at the bottom of your site is constantly breaking your layout during development (especially if you're making AJAX calls and you're getting SQL inside your pages, not just the bottom), you can easily style this table to be hidden by adding this to your CSS:
.cakeSqlLog { display: none; }
This will allow you to view debug information in the HTML source code without your layout getting mangled, just don't forget to set debug back to 0 when your site goes live.

Multiple sources of documentation

Don't just rely on the manual. The wiki and the API are invaluable sources of information. The tutorials in the wiki are especially useful, and the API may be daunting at first, but you'll quickly find the information in there is crucial to building a site with CakePHP.

Using bake.php

Bake is a command line PHP script that will automagically generate a model, controller, and views based on the design of your database. I highly recommend using scaffolding to get a prototype going of a table that may change a lot in the beginning. If you're fairly certain the data is not subject to any drastic change, I recommend using bake instead. With bake all the files are generated and written to disk and you can make modifications from there. It saves a lot of time doing the repetitive tasks such as creating associations, views, and the basic CRUD controller operations.
Using bake is really easy. Once you have a table(s) in your database created, change directories to the /cake/scripts/ folder and run:
php bake.php
If you choose to bake interactively it'll walk you through the steps required to create your model, controller, and views. Once everything has been baked I usually go through all the generated code and make custom modifications as needed.

Mind permissions when moving cake around

When I changed from the development server to the live server I tarred up my entire cake directory and scp'd it to the new server. Immediately I started having an issue where any time the debug level was set to 0 (production mode), data would not be returned for certain database calls. This was a bit of a catch 22 since I needed to view debug information to troubleshoot the problem.
Someone in #cakephp kindly pointed out that permissions on the /app/tmp folder need to be writeable by apache. I changed the permissions to 777 and the issue went away.

Complex model validation

I needed to validate beyond just checking to make sure a field wasn't empty or it matched a regular expression. In particular, I needed a way to verify that the email address users registered with was unique. In the wiki I found this gem: this advanced validation tutorial, which covers some advanced methods of validation that were very useful.

Logging errors

$this->log('Something broke');
This will log your error to /tmp/logs/ (I initially made the mistake of thinking it would log it to the apache error log)

Creating a controller that uses other models

Suppose you have a controller that needs data from a bunch of different models, simply add this to the top of your controller:
class yourController extends AppController
{
var $uses = array('Post','User');
}

This controller would then have access to both the Post and the User model.

Creating a model for a table that doesn't actually exist in the database

I needed a way to create a model and controller without actually having an associated table in the database. I particularly wanted to make use of the $validate array so I could easily validate my fields and keep the validation logic in the model. CakePHP will throw an error if you create a model for a table that doesn't exist. Adding this to the model fixed the problem:
var $useTable = false;
You can use this to change tables names as well.
var $useTable = 'some_table';

Call exit() after redirecting

This should be no surprise to anyone who has done any serious web development in the past, but make sure you call exit() after running $this->redirect() if there's code afterward that you don't want to run. I've always done this in the past, but I made the assumption that $this->redirect() would make an exit call for me (which it didn't).

Advanced model functions

Unless you delve in to the API, there are some very useful model functions at your disposal you might not know exist. I highly recommend reading over the Model Class Reference at least once. Here's a few key functions I wasn't aware of that I found to be very useful:

  • generateList() - I use this function primarily to populate select boxes with data from associated tables
  • findBySql() - Sometimes you just need to write your own SQL
  • findCount() - Returns number of rows matching given SQL condition
  • hasAny() - Returns true if a record that meets the given conditions exists.

Again, I highly recommend reading over the entire model class reference, you'll be surprised at what you learn.

Inserting multiple rows in succession

I had a situation where I needed to iterate through a list of items and insert new rows for each. I quickly discovered that if you insert an item and then immediately insert another, the item that is inserted next doesn't insert at all. Instead the previously inserted row was being updated. For example:
$items = array('Item 1','Item 2','Item 3');
foreach ($items as $item) {
  $this->Post->save(array('Post' => array('title' => $item)));
}

This code will result in a single entry in the posts table: "item 3." CakePHP inserted "item 1", but then updates it to become "item 2," then "item 3" because $this->Post->id gets the value of the last inserted ID. Normally this functionality is very useful, but in this particular instance it was not. I found was to setting $this->Post->id = false after each insert solved the problem.

Inserting logic before or after controller functions

Suppose you needed an array of colors to be available to every view rendered by your controller but you don't want to have to define this data in every action. Using the beforeRender() callback will allow you to do this:
function beforeRender() {
  $this->set('colors',array('red','blue','green');
}

This would make $colors accessible in every view rendered by that controller. beforeRender() is called after the controller logic and just before a view is rendered.
There's also beforeFilter() and afterFilter(), which are called before and after every controller action. For more information, read up on callbacks in the models section of the manual.

Adding a WYSIWYG editor to CakePHP

I found this great tutorial on getting TinyMCE set up with CakePHP. Basically you just link the tiny_mce .js file to your page and then add a small bit of init code to every page that you want textareas to be converted into TinyMCE editors.

Writing your own SQL for HABTM relationships

I had an issue with trying to create a HABTM (has-and-belongs-to-many) relationship where I needed to specify my own SQL statement. According to the docs (at the time of this writing) you should set finderSql in your model, but according to the cakePHP source you should set finderQuery instead. It's just a foul-up in the docs, but I figured it'd be worth noting to save others from having to figure it out for themselves. Trac ticket here: https://trac.cakephp.org/ticket/1217

Sending email

I found two tutorials in the wiki: Sending email and Sending email with PHPMailer
I highly recommend the latter of the two, sending emails with PHPMailer is more secure and there's less of a headache because you don't have to deal with constructing the mail headers yourself.

Customizing HTML generated by the Helper

I needed to change the default <option> generated when I called $html->selectTag() to say something like "Please Select" rather than an empty space (default). I also wanted radio buttons to have labels so the user doesn't have to click exactly on the radio button itself but can instead click anywhere on the text associated with it.
Create the file /app/config/tags.ini.php and add the following:
; Tag template for a input type='radio' tag.
radio = "<input type="radio" name="data[%s][%s]" id="%s" %s /><label for="%3$s">%s</label>"
; Tag template for an empty select option tag.
selectempty = "<option value="" %s>-- Please Select --</option>"

You can get a full list of available tags in /cake/config/tags.ini.php. I wouldn't recommend modifying that file, however, because you could lose your changes when you upgrade CakePHP.

Creating a custom 404 error page

If you need to change the page that users see when a document is not found, create:
/app/views/errors/error404.thtml



source

Friday, July 13, 2007

Go PHP 5 - Major PHP Projects and Web Hosts agrees to go for PHP 5

Support GoPHP5.org PHP 4 has served the web developer community for seven years now, and served it well. However, it also shows its age. Most of PHP 4's shortcomings have been addressed by PHP 5, released three years ago, but the transition from PHP 4 to PHP 5 has been slow for a number of reasons.

PHP developers cannot leverage PHP 5's full potential without dropping support for PHP 4, but PHP 4 is still installed on a majority of shared web hosts and users would then be forced to switch to a different application. Web hosts cannot upgrade their servers to PHP 5 without making it impossible for their users to run PHP 4-targeted web apps, and have no incentive to go to the effort of testing and deploying PHP 5 while most web apps are still compatible with PHP 4 and the PHP development team still provides maintenance support for PHP 4. The PHP development team, of course, can't drop maintenance support for PHP 4 while most web hosts still run PHP 4.

It is a dangerous cycle, and one that needs to be broken. The PHP developer community has decided that it is indeed now time to move forward, together. Therefore, many popular software projects like Drupal, phpMyAdmin, phpPgAdmin, Propel, Symfony, Typo3 etc. have all agreed that effective February 5th, 2008, any new feature releases will have a minimum version requirement of at least PHP 5.2.0. Furthermore, the listed web hosts have agreed that effective February 5th, 2008, they will include PHP 5.2 (or a more recent version) in their service offer.

It is our belief that this will provide web hosts reason to upgrade and the PHP development team the ability to retire PHP 4 and focus efforts on PHP 5 and the forthcoming PHP 6, all without penalizing any existing project for being "first out of the gate".

Source

Saturday, June 23, 2007

Top PHP Frameworks

Zend Framework

The Zend Framework is still pretty new, and very beta, so there's still a few things to come (like a user authentication module), but it does already have quite a lot. Although it doesn't have a lot of checks in the chart, the Zend Framework does include other modules, to handle PDF files, RSS feeds, Web Services (Amazon, Flickr, Yahoo), and more. The Zend Framework also includes several different database objects, making it extremely simple to query your database, without having to write any SQL yourself.

At the moment the Zend Framework doesn't come with a full-blown ORM, but the framework developers are still debating whether to add an ORM layer or not. This might be something we see in the future, and you can always write your own ORM implementation, and have it added to the framework, as it accepts user contributions.

The Zend Framework is looking quite promising, and is definitely working to fix the common PHP problems. The stable version will probably have a lot more checks in the comparison chart!

CakePHP

CakePHP is mostly an advanced MVC framework, with a few extra modules added on top. It can handle most of the database stuff for you, and it includes support for Ajax and data validation. It also has a unique user authentication module called 'Access Lists', which can be used to give different users access to different parts of your CakePHP website.

This framework seems quite thorough and ready for use, although the CakePHP website is extremely confusing. There doesn't seem to be a stable version yet, which is a bit surprising since it's been in development for months now, but I guess it's probably possible to use the beta version on a production website as well.

Symfony Project

As you can see from the chart the Symfony Project seems like a very extensive framework, and it even includes a full-blown ORM, called Propel, which is another open source project and probably one of the best ORM solutions for PHP. Symfony also includes Creole for the database abstraction layer and Mojavi for the Model-View-Controller model layer. Because it simply re-uses these other projects, instead of re-writing them, this framework probably has the most extensive functionality, and this is clearly shown in the chart.

The only two downsides to this framework is that fact that it can't be run on PHP4, but this is pretty logical considering it needs much of PHP5's new features, and that it's so complicated. Most of the tasks, like paging, are much more complicated in Symfony than in other frameworks, and simplicity definitely doesn't describe this framework.

Seagull Framework

The Seagull framework seems like a pretty good framework, and it comes with quite a lot of features. Another positive thing is that it runs on PHP4 as well, which is a really good thing in my book, as I still use PHP4 and most web hosts don't support PHP5 yet.

Unfortunately Seagull doesn't come with any Ajax support, which is a bit of a shame, but a simple Google search returns a tutorial on adding Ajax support yourself, and it's likely it will be added in the future.

Source



Monday, June 18, 2007

Generate PDFs with PHP

In order to use PHP's PDF manipulation capabilities, you need to have the PDFLib library installed on your system. If you're working on Linux, you can download a copy from http://www.pdflib.com/pdflib/index.html and compile it for your box. If you're running Windows, your job is even simpler - a pre-built PDF library is bundled with your distribution, and all you need to do is activate it by uncommenting the appropriate lines in your PHP configuration file.

Additionally, you'll need a copy of the (free!) Adobe Acrobat PDF reader, so that you can view the documents created via the PDFLib library. You can download a copy of this reader from http://www.adobe.com/

Once you've got everything in place, it's time to create a simple PDF file. Here goes:

// create handle for new PDF document
$pdf = pdf_new();

// open a file
pdf_open_file($pdf, "philosophy.pdf");

// start a new page (A4)
pdf_begin_page($pdf, 595, 842);

// get and use a font object
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);

// print text
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730);

// end page
pdf_end_page($pdf);

// close and save file
pdf_close($pdf);
?>

Save this file, and then browse to it through your Web browser. PHP will execute the script, and a new PDF file will be created and stored in the location specified at the top of the script. Here's what you'll see when you open the file:

1225_1 (click to view image)

Anatomy Lesson

Let's take a closer look at the code used in the example above.

Creating a PDF file in PHP involves four basic steps: creating a handle for the document; registering fonts and colours for the document; writing or drawing to the handle with various pre-defined functions; and saving the final document.

Let's take the first step - creating a handle for the PDF document.

// create handle for new PDF document
$pdf = pdf_new();

This is accomplished via the pdf_new() function, which returns a handle to the document. This handle is then used in all subsequent operations involving the PDF document.

Next up, you need to give the PDF file a name - this is accomplished via the pdf_open_file() function, which requires the handle returned in the previous operation, together with a user-defined file name.

// open a file
pdf_open_file($pdf, "philosophy.pdf");

Once a document has been created, you can insert new pages in it with the
pdf_begin_page() function,

// start a new page (A4)
pdf_begin_page($pdf, 595, 842);

and end pages with the - you guessed it! - pdf_end_page() function.

// end page
pdf_end_page($pdf);

Note that the pdf_begin_page() function requires two additional parameters, which represent the width and height of the page to be created in points (a point is 1/72 of an inch). In case math isn't your strong suit, the PHP manual provides width and height measurements for most standard page sizes, including A4, the one used in the example above.

In between the calls to pdf_begin_page() and pdf_end_page() comes the code that actually writes something to the PDF document, be it text, images or geometric shapes. In this case, all I'm doing is writing a line of text to the document - so all I need to do is pick a font, and then use that font to write the text string I need to the document.

Selecting and registering a font is accomplished via the pdf_findfont() and pdf_setfont() functions. The pdf_findfont() function prepares a font for use within the document, and requires the name of the font, the encoding to be used, and a Boolean value indicating whether or not the font should be embedded in the PDF file; it returns a font object, which may be used via a call to pdf_setfont().

$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);

Once the font has been set, the pdf_show_xy() function can be used to write a text string to a particular position on the page.

// print text
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730);

As you can see, this function requires a handle to the PDF document, a reference to the font object to be used, the text string to be written (obviously!), and the X and Y coordinates of the position at which to begin writing the text. These coordinates are specified with respect to the origin (0,0), which is located at the bottom left corner of the document.

Once the text has been written, the page is closed via a call to pdf_end_page(). You can then add one or more extra pages, or - as I've done here - simply close the document via pdf_close(). This will save the document contents to the file specified in the initial call to pdf_open_file(), and destroy the document handle created.

Source

Saturday, June 16, 2007

What's new in PHP V5.2, Part 5: Tracking file upload progress

PHP V5.2 added hooks for developers to take advantage of tracking file upload progress in real time. This article, Part 5 of a five-part "What's new in PHP V5.2" series, shows how to monitor file uploads and write code accordingly, with the creation of a PHP progress bar.

Web 2.0 is the hottest buzzword on the Internet, with investors lining up to put money into any bucket labeled by it. There are many descriptive terms for the millions of Web sites and applications they house. With Web 2.0, we describe a category of Web sites that provide a voice to the millions of users of the Internet. Distinctive in that they all provide a venue for users to meet and share opinions and data relating to common interests, these sites generate enormous amounts of content rapidly.

Each of the users provides some kind of content -- reviews of coffee shops, routes to work, etc. YouTube is a great example of this, providing a place for people to upload videos and have other users watch them and provide feedback. YouTube is the current darling of the Web 2.0 observers, noting that YouTube's popularity grew faster than any site on the Internet to date. This popularity can be attributed to a great deal of varied content, along with the ability for users to lend their voices to the content in the form of comments. And not just comments -- users can even upload video comments in response to video.

Text fields, ahoy

Many Web sites that accept files sport the dreaded Browse button next to a text field urging users to upload each file one at a time. This can take a long time, especially in the case of video, or even photos or other items that come in a groups of smaller files. Since each file requires its own upload, it can be quite a chore. Given that uploading huge files can be tedious for impatient users, it is important to provide them positive feedback to keep them from giving up and going away.

Fortunately, PHP V5.2's new hooks into the file upload process allow us to show users in real time what is happening with their uploads. In this article, we will create a progress bar using PHP V5.2 for our users (see Download for source code).





Hook, line, and sinker

The new "hooks" in PHP V5.2 are actually data points that are available during the file transfer process if you have the right libraries installed and configured. They use a feature called the Alternative PHP Cache. When a PHP script receives an uploaded file, the interpreter will automatically check the $_POST array for a hidden field named APC_UPLOAD_PROGRESS, which becomes a cached variable, storing information about the upload so your scripts can access it. With this information cached and at your fingertips, you can give your users visual feedback to improve their user experience.

We will cover the implementation of the APC code in your HTML form, as well as identifying it in your PHP and how to access the cached information. There are many ways to represent this data — from Ajax to FLEX — but what we will focus on is how to prepare access to the data these front-end technologies will need.





Setting up

APC is not enabled by default in PHP V5.2. Since the new hooks are a part of APC, we need to make sure to install the extension and make it available to the PHP interpreter. This is accomplished by downloading the php_apc extension files. In our case, we are using an installation of WAMP, a freely available packaged PHP for Windows®, which includes Apache and MySQL. It offers a nice user interface and is easy to manage with menus that support configuration options.

To set up APC on WAMP:

  1. See Resources to download the libraries and WAMP.
  2. Install WAMP.
  3. Put the php_apc.dll file in the extensions folder for PHP. This is /php/ext by default.
  4. Use the system tray WAMP menu to select PHP settings>PHP Extensions>Add Extension.
  5. In the command-line interface that pops up, type php_apc.dll and press Enter.
  6. Using a text editor, open /php/php.ini and add the line apc.rfc1867 = on (it doesn't matter where). If you're trying to test locally and plan to upload large files so you can actually see progress, you'll also want to add the following directives: apc.max_file_size = 200M, upload_max_filesize = 200M, and post_max_size = 200M. Don't do this on a live production server, though, or you're likely to use up bandwidth and disk space allotments, not to mention slowing everyone else down to a crawl.
  7. Restart PHP.

APC should now be set up and initialized. The RFC1867 features of APC — the features that enable you to track file uploads — should now be enabled as an option, and you should be ready to look into our file uploads to enable real-time status.


Source

Friday, June 15, 2007

What is PHP:DataGrid?

PHP:DataGrid is the answer to the above problem. It's basically a PHP component, that's very similar to the ASP.NET DataGrid control. PHP:DataGrid will take care of all the boring tasks leaving you the easy and interesting parts. Very little PHP code is actually necessary for PHP:DataGrid, and you can change its looks and layout using simple HTML tags.

The only downside of PHP:DataGrid is that it's not free. You have to purchase it from TPG PHP Scripts, but it's $24.99 for a Developer license, which grants you permission to use it in all your personal projects, and I certainly believe that the advantages far outweigh the cost. Even only the time saved by PHP:DataGrid is already worth the cost for me. (editor's note: use coupon code phpit for a 10% discount!).

Let's have an actual look at PHP:DataGrid. If you don't want to purchase the component yourself, then you can always have a look at the demo's only.

The Basics

To create a new datagrid, we must use the php:datagrid tag. This tells the PHP:DataGrid component that a datagrid must be shown. The only thing that we must set is the name of the datagrid. This is a required attribute, and cannot be left out. A simple datagrid looks like this:

That's the only thing necessary to display a datagrid. But we're forgetting one thing - we haven't binded any data to the datagrid yet. If you forget to do this, nothing will be displayed, except for an error.

Binding Data

Binding data to a datagrid is really easy, and requires only one line of real PHP code. The PHP:DataGrid component automatically creates a variables called $_DATAGRID (not a superglobal, unfortunately). To bind data, you have to call the bind() method on the $_DATAGRID variable, like so:

$_DATAGRID->bind('test', $data);

That's all! The test datagrid will now be shown, with the data contained in the $data variable. The $data variable must be an array that was retrieved using mysql_fetch_array() and a loop (see the datagrid example below if you're unsure about this) or similar format. In any case, it should look like this:

Array
(
[0] => Array
(
[id] => 1
[title] => Item 1
[category] => 4
)

[1] => Array
(
[id] => 2
[title] => Item 2
[category] => 7
)

[2] => Array
(
[id] => 3
[title] => Item 3
[category] => 3
)
)

The above is a valid $data array. It won't accept any other format, and an error will be shown if you do bind a different format.

An Example

The below code is a working example of a simple datagrid. It retrieves the 10 latest tutorials from the PHPit.net database, and shows it in a datagrid.

// Include PHP:DataGrid
include ('/path/to/phpdatagrid.php');

// Connect to database
$link = mysql_connect ('localhost', 'sa', '[db-pass]');

// Select database
mysql_select_db('phpit', $link);

// Do query and Get data
$result = mysql_query ("SELECT title, description, author, datetimestamp, filename FROM tutorial ORDER BY datetimestamp DESC LIMIT 0, 10");
$data = array();
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
array_push ($data, $row);
}

// Bind data (THIS IS IMPORTANT)
$_DATAGRID->bind ('test', $data);

[ View live demo ]

As you can see little code is used for the datagrid. Most of the code is actually spent on connecting to the MySQL database, and getting the data. If you use any kind of database class, this will be significantly easier.

If you have a look at the datagrid, you will notice that it looks ugly, and pretty bad. That's because we haven't added any styling at all. But that will have to wait until Part 2 of our DataGrid series.

Summary

In this part of our DataGrid series, we've looked at the basics of the PHP:DataGrid component: what it is, and how to put it on our website. But it doesn't look pretty yet, and in the next parts we'll be looking at creating a pretty datagrid, and talk about more of its functions (e.g. templates, inline editing, sorting and more!).

Source

Tuesday, June 12, 2007

Download Drupal

Drupal 5.1 and 4.7.6 released

Heine - January 29, 2007 - 19:15

Drupal 4.7.6 and 5.1 are available for download. These are maintenance releases that fix problems reported using the bug tracking system, as well as a security vulnerability.

Upgrading your existing Drupal sites is strongly recommended.

Download

Useful Microsot Word Short Cut Keys

1

Ctrl + Shift + A

AllCaps

Makes the selection all capitals (toggle)



2

Alt + Ctrl + 1

ApplyHeading1

Applies Heading 1 style to the selected text



3

Alt + Ctrl + 2

ApplyHeading2

Applies Heading 2 style to the selected text



4

Alt +
Ctrl + 3

ApplyHeading3

Applies Heading 3 style to the selected text



5

Ctrl + Shift + L

ApplyListBullet

Applies List Bullet style to the selected text



6

Alt + F10

AppMaximize

Enlarges the application window to full size



7

Alt + F5

AppRestore

Restores the application window to normal size



8

Ctrl+B

Bold

Makes the selection bold (toggle)



9

Ctrl + PgDn

BrowseNext

Jump to the next browse object



10

Ctrl + PgUp

BrowsePrev

Jump to the previous browse object



11

Alt + Ctrl + Home

BrowseSel

Select the next/prev browse object



12

Esc

Cancel

Terminates an action



13

Ctrl+E

CenterPara

Centers the paragraph between the indents



14

Shift+F3

ChangeCase

Changes the case of the letters in the selection



15

Left arrow

CharLeft

Moves the insertion point to the left one
character



16

Shift + Left arrow

CharLeftExtend

Extends the selection to the left one character



17

Rt arrow

CharRight

Moves the insertion point to the right one character



18

Shift + Rt arrow

CharRightExtend

Extends the selection to the right one character



19

Alt + Shift + C

ClosePane

Closes the active window pane (if you are in Normal View and have, for example, the Footnote pane open)



20

Alt+Drag (or press Ctrl + Shift + F8 and drag, but Alt + Drag is far easier!)

ColumnSelect

Selects a columnar block of text



21

Ctrl +Shift+C

CopyFormat

Copies the formatting of the selection



22

Shift + F2

CopyText

Makes a copy of the selection without using the clipboard (press Return to paste)



23

Alt + F3

CreateAutoText

Adds an AutoText entry to the active template



24

Ctrl+ Backspace

DeleteBackWord

Deletes the
previous word without putting it on the Clipboard



25

Ctrl + Del

DeleteWord

Deletes the next word without putting it on the Clipboard



26

Ctrl+W, Ctrl+F4

DocClose

Prompts to save the document and then closes the active window. (But doesn't intercept the menu command)



27

Ctrl + F10

DocMaximize

Enlarges the active window to full size



28

Ctrl + F7

DocMove

Changes the position of the active window



29

Ctrl + F5

DocRestore

Restores the window to normal size



30

Ctrl + F8

DocSize

Changes the size of the active window



31

Alt + Ctrl + S

DocSplit

Splits the active window horizontally and then adjusts the split



32

Alt + Shift + F9

DoFieldClick

Executes the action associated with macrobutton fields



33

Ctrl + Shift + D

DoubleUnderline

Double underlines the selection (toggle)



34

Alt R, G

DrawGroup


Groups the selected drawing objects



35

Alt R, I

DrawSnapToGrid

Sets up a grid for aligning drawing objects



36

Alt R, U

DrawUngroup

Ungroups the selected group of drawing objects



37

Ctrl+Shift+F5 (Or: Alt I, K)

EditBookmark

Brings up the bookmark dialog



38

Del

EditClear

Performs a forward delete or removes the selection without putting it on the Clipboard



39

Ctrl+C

EditCopy

Copies the selection and puts it on the Clipboard



40

Ctrl+X

EditCut

Cuts the selection and puts it on the Clipboard



41

Ctrl+F

EditFind

Finds the specified text or the specified formatting



42

F5, Ctrl+G

EditGoTo

Jumps to a specified place in the active document



43

Alt E, K

EditLinks

Allows links to be viewed, updated, opened, or removed



44

Ctrl+V

EditPaste

Inserts the Clipboard contents at the insertion
point



45

Alt E, S

EditPasteSpecial

Inserts the Clipboard contents as a linked object, embedded object, or other format



46

Alt + Shift + Backspc

EditRedo

Redoes the last action that was undone



47

F4

EditRedoOrRepeat

Repeats
the last command, or redoes the last action that was undone
(unfortunately, doesn't work for as many commands in Word 2000 as in
Word 97 and below, but this is still one of Word's most useful
shortcuts, if not the most useful)



48

Ctrl+H

EditReplace

Finds the specified text or the specified formatting and replaces it



49

Ctrl+A

EditSelectAll

Selects the entire document



50

Ctrl+Z

EditUndo

Reverses the last action



51

Alt + PageDn (to select to end of column, use Alt + Shift + PgDn)

EndOfColumn

Moves to the last cell in the current table column



52

Ctrl+Shift+End

EndOfDocExtend

Extends the selection to
the end of the last line of the document



53

Ctrl+End

EndOfDocument

Moves the insertion point to the end of the last line of the document



54

End

EndOfLine

Moves the insertion point to the end of the current line



55

Shift+End

EndOfLineExtend

Extends the selection to the end of the current line



56

Alt+End

EndOfRow

Moves to the last cell in the current row



57

Alt + Ctrl + PgDn

EndOfWindow

Moves the insertion point to the end of the last visible line on the screen



58

Shift + Alt + Ctrl + PgDn

EndOfWindowExtend

Extends the selection to the end of the last visible line on the screen



59

F8 (press Esc to turn off)

ExtendSelection

Turns on extend selection mode and then expands the selection with the direction keys



60

Alt + F4 (&lt;9>)

FileCloseOrExit

Closes
the current document, or if no documents are open, quits Word. Horrible
command, as it makes it a long winded business to quit Word. But
there's a simple solution - assign Alt+F4 to FileExit instead.



61

Alt + F4 (Word 97)

FileExit

Quits
Microsoft Word and prompts to save the documents (does intercept the
menu item, but not the keyboard shortcut, or the x button. An AutoExit
macro is usually a better way of intercepting this).



62

NOT Ctrl+N!!

FileNew

Creates
a new document or template (brings up the dialog). Note that: Word
pretends that Ctrl+N is assigned to FileNew but it isn't, it's assigned
to FileNewDefault You can fix this in Word 2000 by assigning Ctrl+N to
the FileNewDialog command. In Word 97 the only way to fix it is to
create a macro called FileNew (to do this, press Alt + F8, type
"FileNew" without the quotes and Click "Create". The macro will
automatically contain the code needed to make it work).



63

Ctrl+N

FileNewDefault

Creates a new document based on the Normal
template.



64

Ctrl+O

FileOpen

Opens an existing document or template



65

Alt F, U

FilePageSetup

Changes the page setup of the selected sections



66

Ctrl + P

FilePrint

Prints the active document (brings up the dialog)



67

Ctrl+F2

FilePrintPreview

Displays full pages as they will be printed



68

Alt F, I

FileProperties

Shows the properties of the active document



69

Ctrl+S

FileSave

FileSave



70

Alt F, A (or F12)

FileSaveAs

Saves a copy of the document in a separate file (brings up the dialog)



71

Ctrl+Shift+F

Font

Activates the Fonts listbox on the formatting toolbar



72

Ctrl+Shift+P

FontSizeSelect

Activates the Font Size drop-down on the formatting toolbar



73

Alt + Ctrl + K

FormatAutoFormat

Automatically formats a document (or sometimes, automatically screws it up)



74

Alt O,
B

FormatBordersAndSha ding

Changes the borders and shading of the selected paragraphs, table cells, and pictures



75

Alt O, E

FormatChangeCase

Changes the case of the letters in the selection



76

Alt O, C

FormatColumns

Changes the column format of the selected sections (brings up the dialog)



77

Alt O, D

FormatDropCap

Formats the first character of current paragraph as a dropped capital (must select it first)



78

Ctrl+D

FormatFont

Brings up the Format + Font dialog



79

Alt + Shift + R

FormatHeaderFooterL ink

Links the current header/footer to the previous section (but does not intercept the button on the Header Footer toolbar)



80

Alt O, P

FormatParagraph

Brings up the Format Paragraph dialog



81

Alt O, S

FormatStyle

Applies, creates, or modifies styles



82

Alt O, T

FormatTabs

Brings up the Format Tabs dialog




83

Shift + F5

GoBack

Returns
to the previous insertion point (goes back to up to 3 points, then
returns to where you started; this is one of the most useful shortcuts
of them all. Also useful when opening a document, if you want to g
straight to where you were last editing it)



84

Ctrl + &gt;

GrowFont

Increases the font size of the selection



85

Ctrl + ]

GrowFontOnePoint

Increases the font size of the selection by one point



86

Ctrl + T (or drag the ruler)

HangingIndent

Increases the hanging indent



87

F1

Help

Microsoft Word Help



88

Shift + F1

HelpTool

Lets you get help on a command or screen region or examine text properties



89

Ctrl + Shift + H

Hidden

Makes the selection hidden text (toggle)



90

Click on it

HyperlinkOpen

Connect to a hyperlink's address



91

Ctrl + M (or drag the ruler)

Indent

Moves
the left indent to the next tab stop



92

Alt + Ctrl + M (or Alt I, M)

InsertAnnotation

Inserts a comment



93

F3

InsertAutoText

Replaces the name of the AutoText entry with its contents



94

Alt I, B

InsertBreak

Ends a page, column, or section at the insertion point



95

Alt I, C

InsertCaption

Inserts a caption above or below a selected object



96

Ctrl + Shift + Return

InsertColumnBreak

Inserts a column break at the insertion point



97

Alt + Shift + D

InsertDateField

Inserts a date field



98

Alt + Ctrl + D

InsertEndnoteNow

Inserts an endnote reference at the insertion point without displaying the dialog



99

Alt I, F

InsertField

Inserts a field in the active document



100

Ctrl+F9

InsertFieldChars

Inserts an empty field with the enclosing field characters



101

Alt I, L

InsertFile

Inserts the
text of another file into the active document



102

Alt I, N

InsertFootnote

Inserts a footnote or endnote reference at the insertion point



103

Alt + Ctrl + F

InsertFootnoteNow

Inserts a footnote reference at the insertion point without displaying the dialog



104

Ctrl + K

InsertHyperlink

Insert Hyperlink



105

Alt I, D

InsertIndexAndTable s

Inserts an index or a table of contents, figures, or authorities into the document



106

Alt + Ctrl + L

InsertListNumField

Inserts a ListNum Field



107

Alt + Shift + F

InsertMergeField

Brings
up a dialog to insert a mail merge field at the insertion point. (It
does not intercept the button on the Mail merge. toolbar)



108

Ctrl + Return

InsertPageBreak

Inserts a page break at the insertion point



109

Alt + Shift + P

InsertPageField

Inserts a page number field



110

Ctrl + Shift + F3


InsertSpike

Empties the spike AutoText entry and inserts all of its contents into the document



111

Alt + Shift + T

InsertTimeField

Inserts a time field



112

Ctrl + I

Italic

Makes the selection italic (toggle)



113

Ctrl + J

JustifyPara

Aligns the paragraph at both the left and the right indent



114

Ctrl + L

LeftPara

Aligns the paragraph at the left indent



115

Down arrow

LineDown

Moves the insertion point down one line



116

Shift + down arrow

LineDownExtend

Extends the selection down one line



117

Up arrow

LineUp

Moves the insertion point up one line



118

Shift + up arrow

LineUpExtend

Extends the selection up one line



119

Ctrl + F11

LockFields

Locks the selected fields to prevent updating



120

Alt + Shift + K

MailMergeCheck

Checks for errors in a mail merge



121


Alt+Shift+E

MailMergeEditDataSo urce

Lets you edit a mail merge data source



122

Alt + Shift + N

MailMergeToDoc

Collects the results of the mail merge in a document



123

Alt Shift + M

MailMergeToPrinter

Sends the results of the mail merge to the printer



124

Alt + Shift + I

MarkCitation

Marks the text you want to include in the table of authorities



125

Alt + Shift + X

MarkIndexEntry

Marks the text you want to include in the index



126

Alt + Shift + O

MarkTableOfContents Entry

Inserts a TC field (but it is far better to use Heading Styles to generate your Table of Contents instead)



127

Alt or F10

MenuMode

Makes the menu bar active



128

Alt + Shift + F11

MicrosoftScriptEdit or

Starts
or switches to Microsoft Development Environment application, allowing
you to view the HTML/XML source code that would be behind the document
if it were in ..htm format (or that is behind it if it already is in
.htm format).



129

Alt + Ctrl + F1

MicrosoftSystemInfo

Execute the Microsoft System Info application



130

F2

MoveText

Moves the selection to a specified location without using the clipboard (press Return to execute the more)



131

Tab

NextCell

Moves to the next table cell



132

F11

NextField

Moves to the next field



133

Alt + F7

NextMisspelling

Find next spelling error



134

Alt + down arrow

NextObject

Moves to the next object on the page



135

Ctrl + F6

NextWindow

Switches to the next document window, equivalent to selecting a document from the Window menu.



136

Ctrl+Shift+N

NormalStyle

Applies the Normal style



137

Ctrl + 0

OpenOrCloseUpPara

Sets or removes extra spacing above the selected paragraph



138

F6

OtherPane

Switches
to another window pane in Normal View (for instance, if you have if you
have a Footnotes pane open in Normal view and want to switch to the
main document and back without closing the pane).



139

Alt + _

OutlineCollapse

Collapses an Outline in Outline View by one level



140

Alt+Shift+rt arrow

OutlineDemote

Demotes the selected paragraphs one heading level



141

Alt + +

OutlineExpand

Expands an Outline in Outline View by one level



142

Alt+Shift+down arrow

OutlineMoveDown

Moves the selection below the next item in the outline



143

Alt+Shift+up arrow

OutlineMoveUp

Moves the selection above the previous item in the outline



144

Alt+Shift+left arrow

OutlinePromote

Promotes the selected paragraphs one heading level



145

Alt + Shift + L

OutlineShowFirstLin e

Toggles between showing the first line of each paragraph only or showing all of the body text in
the outline



146

Ins

Overtype

Toggles the typing mode between replacing and inserting



147

PgDn

PageDown

Moves the insertion point and document display to the next screen of text



148

Shift+ PgDn

PageDownExtend

Extends the selection and changes the document display to the next screen of text



149

PgUp

PageUp

Moves the insertion point and document display to the previous screen of text



150

Shift + PgUp

PageUpExtend

Extends the selection and changes the document display to the previous screen of text



151

Ctrl + down arrow

ParaDown

Moves the insertion point to the beginning of the next paragraph



152

Shift + Ctrl + down arrow

ParaDownExtend

Extends the selection to the beginning of the next paragraph



153

Ctrl + up arrow

ParaUp

Moves the insertion point to the beginning of the previous paragraph



154

Shift + Ctrl
+ up arrow

ParaUpExtend

Extends the selection to the beginning of the previous paragraph



155

Ctrl+Shift+V

PasteFormat

Applies the previously copied formatting to selection



156

Shift + Tab

PrevCell

Moves to the previous table cell



157

Shift + F11

PrevField

Moves to the previous field



158

Alt + up arrow

PrevObject

Moves to the previous object on the page



159

Ctrl + Shift + F6

PrevWindow

Switches back to the previous document window



160

Sfift+F4

RepeatFind

Repeats Go To or Find to find the next occurrence



161

Ctrl+Spacebar

ResetChar

Makes the selection the default character format of the applied style



162

Ctrl+Q

ResetPara

Makes the selection the default paragraph format of the applied style



163

Ctrl +R

RightPara

Aligns the paragraph at the right indent



164

Ctrl + *

ShowAll


Shows/hides all nonprinting characters



165

Alt + Shift + A

ShowAllHeadings

Displays all of the heading levels and the body text in Outline View



166

Ctrl + &lt;

ShrinkFont

Decreases the font size of the selection



167

Ctrl + [

ShrinkFontOnePoint

Decreases the font size of the selection by one point



168

Ctrl + Shift + K

SmallCaps

Makes the selection small capitals (toggle)



169

Ctrl + 1

SpacePara1

Sets the line spacing to single space



170

Ctrl + 5

SpacePara15

Sets the line spacing to one-and-one- half space



171

Ctrl + 2

SpacePara2

Sets the line spacing to double space



172

Ctrl + F3

Spike

Deletes
the selection and adds it to the "Spike" AutoText entry (which allows
you to move text and graphics from nonadjacent locations)



173

Alt + PgUp

StartOfColumn

Moves to the first cell in the current column




174

Ctrl+Shift+Home

StartOfDocExtend

Extends the selection to the beginning of the first line of the document



175

Ctrl +Home

StartOfDocument

Moves the insertion point to the beginning of the first line of the document



176

Home

StartOfLine

Moves the insertion point to the beginning of the current line



177

Shift+Home

StartOfLineExtend

Extends the selection to the beginning of the current line



178

Alt+Home

StartOfRow

Moves to the first cell in the current row



179

Alt+Ctrl+PgUp

StartOfWindow

Moves the insertion point to the beginning of the first visible line on the screen



180

Shift+ Alt+Ctrl+PgUp

StartOfWindowExtend

Extends the selection to the beginning of the first visible line on the screen



181

Strl + Shift + S

Style

Activates the Style drop-down on the Formatting toolbar



182

Ctrl + =

Subscript


Makes the selection subscript (toggle)



183

Ctrl + +

Superscript

Makes the selection superscript (toggle)



184

Ctrl + Shift + Q

SymbolFont

Applies the Symbol font to the selection



185

Alt A, F

TableAutoFormat

Applies a set of formatting to a table



186

Alt A, H

TableHeadings

Toggles table headings attribute on and off



187

Alt + click

(Alt + drag to select several)

TableSelectColumn

Selects the current column in a table



188

Click in left margin

TableSelectRow

Selects the current row in a table



189

Alt + double-click

TableSelectTable

Selects an entire table



190

Alt + Ctrl + U

TableUpdateAutoForm at

Updates the table formatting to match the applied Table Autoformat settings



191

Shift + F9 (Alt + F9 toggles all field codes on or off)

ToggleFieldDisplay

Shows the field codes or the results for the
selection (toggle)



192

Alt T, C

ToolsCustomize

Allows
you to customizes the Word user interface (menus, keyboard and
toolbars) and store the customizations in a template (defaults to
Normal.dot, so be careful!)



193

Alt + F8

ToolsMacro

Runs, creates, deletes, or revises a macro



194

F7

ToolsProofing

Checks the spelling and grammar in the active document



195

Ctr.l + Shift + E

ToolsRevisionMarksT oggle

Toggles track changes for the active document



196

Shift + F7

ToolsThesaurus

Finds a synonym for the selected word



197

Ctrl+U

Underline

Formats the selection with a continuous underline (toggle)



198

Ctrl + Shift + T

(or drag the ruler)

UnHang

Decreases the hanging indent



199

Ctrl + Shift + M

(or drag the ruler)

UnIndent

Moves the left indent to the previous tab stop



200

Ctrl+Shift+F9

UnlinkFields


Permanently replaces the field codes with the results



201

Ctrl + Shift + F11

UnlockFields

Unlocks the selected fields for updating



202

F9

UpdateFields

Updates and displays the results of the selected fields



203

Ctrl + Shiift + F7

UpdateSource

Copies the modified text of a linked file back to its source file



204

Hover over comment

ViewAnnotations

Show or hide the comment pane



205

Dbl-click the endnote reference

ViewEndnoteArea

If
in Normal View, opens a pane for viewing and editing the endnote
(toggle). If in Page/Print Layout View, switches from the body text to
the endnote or vice versa



206

At + F9

ViewFieldCodes

Shows the field codes or results for all fields (toggle)



207

Dbl-click the footnote reference

ViewFootnoteArea

If in Normal View, opens a pane for viewing and editing the footnote (toggle). If in Page/Print Layout View,
switches from the body text to the footnote or vice versa.



208

Alt V, F

ViewFootnotes

If
in Normal View, opens a pane for viewing and editing footnotes and
endnotes (toggle). If in Page/Print Layout View, switches from the body
text to the footnotes/endnotes or vice versa.



209

Alt V, H

ViewHeader

Displays header in page layout view



210

Alt V, N

(or Alt + Ctrl + N)

ViewNormal

Changes the editing view to normal view



211

Alt V, O

(or Alt + Ctrl + O)

ViewOutline

Displays a document's outline



212

Alt V, P

(or Alt + Ctrl + P)

ViewPage

Displays
the page more-or-less as it will be printed, and allows editing (In
Word 2000 the menu item is called Print Layout, but fortunately the
command hasn't changed.



213

Alt + F11

ViewVBCode

Shows the VB editing environment (Tools + Macro + Visual Basic Editor)



214

Alt + left arrow

WebGoBack


Backward
hyperlink (useful if you clicked on a page number hyperlink in the
table of contents and then want to return to the TOC)



215

Alt + rt arrow

WebGoForward

Forward hyperlink



216

Alt W, A

WindowArrangeAll

Arranges windows as non-overlapping tiles



217

Ctrl + left arrow

WordLeft

Moves the insertion point to the left one word



218

Shift + Ctrl + left arrow

WordLeftExtend

Extends the selection to the left one word



219

Ctrl + rt arrow

WordRight

Moves the insertion point to the right one word



220

Shift + Ctrl + rt arrow

WordRightExtend

Extends the selection to the right one word



221

Ctrl + Shift + W

WordUnderline

Underlines the words but not the spaces in the selection (toggle)



source