Showing posts with label Php. Show all posts
Showing posts with label Php. Show all posts

Wednesday, May 20, 2009

Microsoft preps for open-source cloud apps PHP gets Azure tinge

Microsoft has unveiled a toolkit for PHP developers building open-source applications that help fluff its planned Azure cloud.

PHPAzure is a software development kit (SDK) for programming to both Windows Azure and the underlying SQL-like Windows Azure Storage service's blobs, tables, and queues. PHPAzure is an open-source project developed with RealDolmen and hosted on Microsoft's CodePlex site.

The PHPAzure community technology preview (CTP) was unveiled by Microsoft India and is due for completion on August 21. Azure is itself currently in CTP and has been promised for delivery by the end of this year.

PHP is one of the web's most popular programming languages, running more than 20 million sites. It's also used in conjunction with Apache, Linux, and MySQL - a web server, operating system, and database combo that Microsoft is in competition with.

Microsoft's recognized the importance of winning over PHP developers and has worked with Zend Technologies to fine-tune PHP to Windows until now. The risk was developers would otherwise build their PHP applications on Windows and deploy on Linux instead.

With PHP being a default web-programming environment, Microsoft has accepted it must embrace the language as a way to populate Azure with applications, moving it from a standing stop.

PHPAzure sounds like a framework for PHP programmers to build to Azure and its underlying storage system rather than a new language from Microsoft. Features include PHP classes for Windows Azure blobs, tables, and queues, for HTTP transport, AuthN/AuthZ, REST, and error management, and there is manageability, instrumentation, and logging support. You can read more on the architecture here.

Bootnote

Sybase has announced plans for its server products to work in Amazon's cloud. The company said it'll make Amazon Machine Images (AMIs), developer guides, and developer software for its software freely available for development and testing. Sybase is also working with Amazon to devise "flexible utility computing models" of its software to enable pay-per-use billing on the Amazon cloud.

Once a database contender to Oracle, Sybase today has a diverse set of products covering mobile and business intelligence. But the announcement will likely only apply to its database and data integration and replication products. It will expand the number of database options available on Amazon and keep Sybase in the game - though it's coming a little late. Amazon's EC2 currently offers IBM's DB2 and Informix, Oracle 11g, Microsoft's SQL Server Standard Edition 2005, and MySQL Enterprise.

Sybase also said it's working with Symantec and its Veritas Storage Foundation to optimize its Virtualized Resource Management framework from the company's ASE Cluster Edition for use in cloud-based storage. ®

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/

Thursday, November 13, 2008

The quest for the perfect Content Management System

As the Web has grown, the problem of content management seems to have absorbed more time and energy than even the effort required to create actual content. As a consequence the quest for the perfect Content Management System (CMS) has become high on the list of many corporations.

One of the more highly regarded CMS solutions is Joomla, a free, open source, cross platform product that has developed a huge following and is now used by the likes of the United Nations, MTV, Harvard University, and Citibank.

Joomla requires PHP and MySQL along with Apache or Microsoft IIS and can manage any kind of content including text, photos, music, and video. What’s even more impressive is that Joomla is also a content management framework that can be augmented to support other content and process management goals.

These modifications are provided by extensions and the Joomla Extensions Directory currently lists a total of 3,996 extensions that cover everything from adding CAPTCHA support through to file managers and RSS syndication to CRM, help desk, shopping carts, and wiki integration.

One of the extensions that is currently receiving a lot of attention is Teamlog published by YOOtheme GmbH, a Joomla development company.

Teamlog, which is currently in beta and free, adds an AJAX-driven time tracking interface to Joomla for project management. Designed to be very simple to use, Teamlog supports tracking of tasks and to-do items and is designed to be “foolproof” – essentially providing a working plan for multiple projects along with extensive reporting and statistics for teams of any size.

Teamlog is very impressive and I’ve heard from other users that it quickly becomes indispensable particularly in distributed environments.

If you are looking for a CMS, Joomla is worth considering; and if you need project-based time tracking, Teamlog is definitely worth considering.

Footnote: I have to note that on its Web site, materials promoting Teamlog YOOtheme includes some video tours of Teamlog. These are awful!

Here you have a terrific application and the voice over sounds like the speaker is disinterested and totally unenthused with what he’s presenting. Worse still the narrative is disorganized!

If your organization has any kind of presentation materials on line you must make sure that the effect of them is to sell and excite otherwise you are simply squandering opportunity.

Source:- networkworld.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/

Thursday, September 18, 2008

PHP upgrade improves Windows backing

PHP (Hypertext Preprocessor) 5.3, a significant upgrade to the server-side scripting language for Web applications, is expected to be available in a beta release in October, a representative of the PHP community said on Wednesday.

Version 5.3 features improved support for Windows, said Andi Gutmans, who is participating in development of the release and is CTO at PHP tools vendor Zend Technologies. Gutmans spoke about the release during an interview at the company's ZendCon 2008 conference in Santa Clara, California on Wednesday afternoon.

"The community has worked on creating a much better binary package for PHP on Windows, which includes the latest [Microsoft] compilers," to benefit performance, Gutmans said. Additionally, more recent third-party libraries are featured for running PHP applications on Windows, with support for XML, graphic manipulation, and database access.

Namespaces, a capability enabling mixing and matching of PHP code from various sources, is highlighted in 5.3. This feature enables better maintenance and reuse, Gutmans said. "It allows you to modularize your applications for better maintenance and it makes it easier to use various frameworks together," he said. Frameworks like Zend's PHP framework and PEAR (PHP Extension and Application Repository) could be leveraged, said Gutmans.

A full implementation of garbage collection, which provides more efficient use of memory, is featured in PHP 5.3 as well. With garbage collection, long-running PHP scripts will make more efficient use of memory by avoiding conditions that could lead to memory leaks, Gutmans said.

Another feature, PHP archive (phar) files, enables bundling of a PHP application into a single archive. This makes it easier to distribute and deploy a PHP application, Gutmans said. The concept is similar to the JAR (Java Archive) files used in the Java world.

Version 5.3 also offers significant performance enhancements as well a client library integrating PHP with the MySQL database. In general terms, PHP 5.2 applications should function on the PHP 5.3 runtime, according to Gutmans.

Internationalization support has been enhanced, for building of applications that can be multilingual. Specifically, the ICU (International Components for Unicode) library is being exposed. Developers can perform functions like sorting and transformations.

Although Gutmans previously estimated a late-2008 release for PHP 5.3, the release now is expected to reach the release candidate phase in the first quarter of 2009. General availability will follow.

Also at ZendCon on Wednesday, Zend offered insights on what it views as the next-generation of PHP applications. These will be easily maintained, extensible, powerful, and lucrative, said Wil Sinclair, manager of the advanced technology group at Zend.

The first generation of PHP applications was very simple and lacked testing, he said. They had layers for presentation, application control, database access, and business logic. The next generation of applications has had perhaps millions of users, is object-oriented, and is typically modular, Sinclair said.

Next-generation systems have been built on the Model View Controller framework and are unit-tested. "Now, we've got an assurance of quality, not necessarily a guarantee," Sinclair said.

PHP has entered the commercial world, he said. Sinclair presented as an example Magento, an open-source e-commerce platform built on PHP 5 on top of Zend Framework. Built by Varien, Magento has had more than 450,000 downloads and more than 170 Magento Connect extensions. The application has processed millions of dollars in transactions, according to Sinclair.

The first public beta of Magento appeared in August 2007, and the 1.0 launch was on March 31, he said.

"We definitely see Magento as a next-generation PHP application, said Roy Rubin, founder and CEO of Varien.

Meanwhile, open-source WSO2 leveraged ZendCon to make a play in the PHP realm. The company launched WSO2 Web Services Framework for PHP (WSF/PHP) 2.0 this week, featuring a scripting language library enabling developers to build and consume SOAP and REST Web services. Security and reliability are offered for enterprise SOA, the company said. The technology was demonstrated at ZendCon.

Data services, interoperability, and security are extended in the release. Developers also gain a framework for deploying PHP services meeting enterprise SOA standards, according to WSO2. Additionally, developers can bridge to tens of thousands of PHP Web applications and enterprise data sources, applications, and services.

Capabilities are added in four key areas with version 2.0:

-- Replay detection to track whether a message is fresh or has been sent previously, thus preventing replay attacks that could lead to denial of service

-- WS-Trust backing to issue, renew, and validate security tokens for trusted relationships

-- WS-SecureConversation support to allow a series of messages to be protected by a single session key and improve efficiency of the operation

-- Public Key cryptography standards enablement for handling multiple client x509 certificates simultaneously

Developers can send and receive binary data as attachments using MTOM or a SOAP message with attachments. MTOM in version 2.0 has been optimized via caching. WSDL support has been expanded via tools. WSF/PHP 2.0 is available for download now.

source:- techworld.com.au/

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/