»
S
I
D
E
B
A
R
«
Sponsored Links


Vork, open-source PHP framework designed for rapid development of performance-oriented scalable applications
Feb 24th, 2010 by NewUser

Vork Enterprise PHP Framework

Vork is an open-source PHP framework designed for rapid development of performance-oriented scalable applications.

The mission of Vork is to provide an MVC architecture and full-featured toolkit in a gimmick-free no-frills approach without adding overhead, creating slow & unscalable abstraction layers or re-inventing native PHP functionality.

Rapid Application Development

  • Native PHP interface with intuitive naming convention, no need to learn new terminology or syntax
  • Hello World! in 5-minutes or less with LAMP/WAMP configuration
  • Developers that already know PHP can use Vork productively within minutes

Performance-Oriented, Scalable, Green and Economical

  • Green-IT: Vork applications serve more traffic with less servers!
  • Enterprise-grade Vork platform has no slow abstraction layers or re-invented PHP functionality
  • Out-of-the-box response time for a Hello World! including making a database connection is typically just 0.0065 seconds!
  • Built-in support for multiple master/slave database configurations with tools to enforce security and increase SQL-statement efficiency
  • Automatically loads code & objects that are needed for the instance and not a byte more!
  • Vork can be configured to operate without any disk-IO to further reduce load time

Standards-Compliant

  • XHTML 1.1
  • PHP 5.0 – 5.3+
  • E_ALL | E_STRICT
  • Section 508
  • W3C WAI
  • Full MVC stack including layouts and components
  • All tools produce valid XHTML 1.1 with semantically-correct markup
  • Accessibility is automated as much as possible to meet Section 508 and W3C WAI standards
  • Code is open-source, built for PHP 5 and fully documented using the phpDocumentor DocBlock standard
  • Universal database support without abstraction layers; ability to easily change database brands at any time
  • Object-oriented source code is E_ALL | E_STRICT and adheres to the Zend Framework Coding Standards
  • Concise URL format is ideal for search engine optimization (SEO) and is easy to communicate verbally
  • CakePHP and Zend Framework objects can be imported into Vork; Vork Helpers and components can be used within Zend Framework and CakePHP
  • CSS-reset with default styles to provide cross-browser display consistency verified in Firefox, Google Chrome, Safari (OS X, iPhone & Windows) and IE6, 7 & 8

Extensive Toolset

  • E-commerce tools to validate & charge credit cards, accept PayPal payments, get UPS shipping rates, track a package, generate QR codes & more!Vork can generate QR codes and 3D charts!
  • Simplified use of Google tools: Maps, Charts, Analytics, AdSense, Sitemap, Payments, Translate
  • Amazon Web Services connection interface with automated caching mechanism
  • One-line of code turns any controller or action into a full-featured Wiki including a Wiki search engine
  • Forms maintain state automatically + ample tools include a WYSIWYG textarea that produces valid XHTML 1.1 markup and works in every browser
  • Internationalization (i18n) – multilingual forms allow users to easily type characters in other alphabets by pressing the phonetically-equivalent English keys
  • Integration with all mainstream JavaScript frameworks: YUI, jQuery, Prototype, MooTools, script.aculo.us, Dojo, SWFObject, Ext Core, Chrome Frame
  • Universal log-in/log-out/forgot-password utility
  • Turn any page of your application into a URL shortening site
  • User input validity is verified both in JavaScript (for user-experience) and in PHP (for security) – form validation rules are only written once
  • Extensive HTML helper functions including generation of Twitter Tweet links, tag clouds and simplified embedding of Adobe Flash
  • Consistent interface to many 3rd-party tools including Meetup event management & sharing boxes like: // Bookmark and Share
  • Email tools including outgoing-mail templates that operate like MVC-elements & spam-proof email address display tools
  • AJAX tools including inline language translation and simplified data-loading
  • Completely automatic SSL-link management to simplify transitions between https:// and http:// pages
  • Image management tools to watermark an uploaded image + generate multiple images in different sizes (fullsize, thumbnail, etc.)
  • POST utility to simplify connecting to web services
  • Effortless media integration including Flickr feeds, YouTube videos and embedding an MP3 player
  • Default 404 “not found” page has a Google Search box pre-populated to search your site for content related to the missing page
  • RSS layout makes it easy for any PHP array to become an RSS 2.0 or Atom feed; RSS reader makes quick work of syndicating feeds
  • Debugging tools that output to your Firefox Firebug console

Requirements

  • PHP – any version between 5.0.2 and 5.3.x
  • A database is optional and any database or cloud-DB that is supported by PHP will work with Vork
  • Works on any web server (Apache, Microsoft IIS, etc.)
  • Works with any operating system (Linux, Windows, Mac OS X, FreeBSD, etc.)
  • Integrated caching through any package with a PHP interface (Memcached, etc.)
Yii PHP Framework Practical Getting Started Tutorial(In Chinese)
Nov 5th, 2009 by wood

Yii PHP Framework实用入门教程
by 周公的专栏

说明:因为最近工作工作关系,需要开发一个在Linux下运行的Web Application,需要对现在比较流行的一些PHP框架做一个了解和评估,下面的这篇文章是笔者最近学习一个比较新的PHP Framework的一点经历和操作步骤,因为官方的手册写得比较晦涩(特别是中文的),曾经尝试遍读它那个手册再动手,读了一大半发现仍无法理解,于是干脆先下手为强了,因而也就有了下面的文章。 

 

介绍

Yii 是一个基于组件、纯OOP的、用于开发大型 Web 应用的高性能 PHP 框架。它将 Web 编程中的可重用性发挥到极致,能够显著加速开发进程。Yii适合大流量的应用,如门户、BBSCMSB2B系统等,功能丰富,性能优异,不过它的中文文档还不完善,并且有些命令行的操作是针对非Windows用户的,不易理解,所以制作了这篇文档。

下载地址:http://www.yiiframework.com/download/

中文文档地址:http://www.yiiframework.com/doc/guide/zh_cn

配置

下面针对本人的机器相关软件环境及路径做下说明:

Apache2.2.4+PHP5.2.5+MySQL5.1.39

在这里需要说明的是需要在设置Windows环境变量,在Path中添加PHP运行环境所在的目录(如本人在原有配置后加上”;C:\PHP”),因为使用Yii时需要PHP的运行环境。此外,在PHP版本选择时建议不要选择比较高的版本,本人是从PHP5.3.0->PHP5.2.11->PHP5.2.5一路降下来才运行成功的,建议尽量暂时不要使用PHP5.3.0PHP5.2.11,本人在使用这两个版本过程中经常遇到一个ext目录下的dll文件不能加载的情况,当然你确认自己对PHP的配置相当熟悉的话例外。

因为在Yii中需要开启pdopdo_mysql,所以请确保在运行环境所使用的php.ini中取消了extension=php_mysql.dllextension=php_pdo.dllextension=php_pdo_mysql.dll的注释。

Apache的网站根路径为D:\wwwroot,在这个根路径下创建一个名为YiiDemo的文件夹,将从网上下载到的Yii压缩包解压之后,拷贝进D:\wwwroot\YiiDemo文件夹,文件结构如下:

 

注:上图中demosframeworkrequirementsYii压缩包中的文件夹,其它文件和文件夹是本人使用Eclipse时创建的。此外,在D:\wwwroot\YiiDemo\framework文件夹下有一个yiic.bat文件,这个文件可以帮助我们快速生成网站架构和MVC相关的文件。

另外,在本实例中MySQLPHP都是用了utf8编码,不建议使用gb2312编码,能显示的中文字符太少,并且对其它东亚语系不支持,甚至连生僻点的繁体中文都不能显示,而utf8可以解决这个问题。

创建网站初始结构

启动Windows命令行程序(在开始菜单上找到“运行”,然后输入“cmd”并回车),可以看到如下命令行窗口:

 

在命令行方式下切换到Yiiframework目录下用以执行yiic命令(实际执行的是yiic.bat),如下:

 

看到如上图所示的信息之后,就可以使用yiic来创建网站结构了,在本例中我们在D:\wwwroot\YiiDemo\framework(注意Apache中网站根路径为D:\wwwroot)下创建网站,网站名字为study,先在D:\wwwroot\YiiDemo\framework下手动创建study这个文件夹,然后使用如下命令创建网站:yiic webapp 网站路径,如下图:

 

在输入创建网站的命令之后就会看到如上图所示的提示,键入”y”之后就会在D:\wwwroot\YiiDemo\study目录创建网站的框架结构,如下图所示:

 

按照本人机器配置,现在就可以看到Yii框架的雏形显示了,网址是:http://localhost/YiiDemo/study/index.php

生成MVC文件

按照默认配置还不能使用数据库,要想获取与数据库的练习,需要更改配置,打开D:\wwwroot\YiiDemo\study\protected\config文件夹下的main.php文件,更改components中的配置即可,’db’这一参数被注释掉了,将’db’参数设置如下:

‘db’=>array(

                                                ‘connectionString’=>’mysql:host=localhost;dbname=study’,

                                                ‘username’=>’root’,

                                                ‘password’=>’jeri’,

                                ),

保存之后即可连接MySQL数据库了,实际使用时要根据自己的实际情况配置。

在此将继续使用yiic这个命令行工具,通过cd切换工作路径到D:\wwwroot\YiiDemo\study这个文件夹,然后在命令行中可以创建modelview文件。如下:

 

需要注意的是,如上图所示,因为yiic.bat文件在D:\wwwroot\YiiDemo\framework文件夹下,而当前命令行的工作路径是D:\wwwroot\YiiDemo\study,所以在运行yiic时建议使用全路径。

使用yiic shell命令就可以进入shell命令行,在命令行看到的输入提示变为“>>”,键入model 表名就会创建对应表的model文件,上图下面就是使用“model user”成功之后就可以看到上图对应的情况。

还可以使用crud (crud分别是create/read/update/delete的缩写,表示常用的增删改查数据库操作)表名创建对应的coltrollerview文件,如下图所示:

 

比如针对表useruserlist等使用modelcrud命令之后,我们就可以在浏览器中查看这些文件了,如查看userlist表中的数据,可以在浏览器中输入http://localhost/YiiDemo/study/index.php?r=userlist,看到如下所示的图:

 

可以看到尽管MySQLPHP都是用了utf8编码,但是数据库中的RealName字段因为是中文数据导致不能正常显示,出现这种情况是因为采用了默认的字符集连接MySQL,在PHP中直接连接MySQL时,如果使用了utf8编码,我们会在PHP代码中做如下设置:mysql_query(”set names ‘utf8′”);但是在Yii中没有提供这样的机会,我们只需要更改D:\wwwroot\YiiDemo\framework\db文件夹下的CDbConnection.php文件中的

public $charset;

改为public $charset=’utf8′;就能正常显示了,如下图所示:

          

好了,至此没有写一行代码,但是已经完成了一个网站的大体框架,并且能初步实现增删改查功能了。

symfony 1.3 goes beta
Oct 28th, 2009 by wood
Any chance of bug #6651 being fixed for symfony 1.3 ? http://trac.symfony-project.org/ticket/6651 It's been opened for 4 months and there's not been any update. Thanks in advance, FWH
Why will Symfony 2.0 finally use PHP 5.3?
Oct 27th, 2009 by wood
I'm really happy with this!!! Though PHP 5.3 is already out, I can't use it so much as I like to, because all the projects I manage and maintain used Symfony 1.2 or a minor version, then, I' m still bound to PHP 5.2. With this news now I'm sure I'll use Symfony 2.0 with PHP 5.3 and finally have the power of namespaces and my beloved closures :D, in my everyday work!!!
Why will Symfony 2.0 finally use PHP 5.3?
Oct 27th, 2009 by wood
This is great news. Looking forward to the upcoming releases.


»  Substance: PHP Frameworks   »  SiteMap