php

Security of Views 2 when dealing with Drupal cache

By: 
Fernando Paredes Garcia
Date: 
June 19th, 2011

I've been working with Views since Drupal 5.x, at that time it was the longest form you could ever have imagined. But it was still an awesome module with its ability to facilitate the creation of lists and tables to display content. With the release of Drupal 6.x, the community had to wait a while to get Views 2.0 in place. It came with great UI usability improvements, amazing enhancements and a brand new API.
 
Views 2 UI improvements
 

PHP & MySQL Frameworks and Content Management Systems (CakePHP, CodeIgniter, Symfony, Joomla & Zend)

Why we use a Framework or Content Management Systems like CakePHP, CodeIgniter, Symfony, Zend & Joomla

Frameworks like CodeIgniter, Symfony, Zend, CakePHP, etc., are used by all of our teams in San Diego, Cordoba, Miraflores, and Madrid. In most cases, they are extremely helpful and important because they exist to help web developers write less code, which saves time. Software is all about re-usability and adapting to change rapidly with as little ramp-up time as possible. Many projects while working through tight deadlines have to ponder and think about all the “mystical” ways to write components. Is the better solution to reuse someone else's code now and in the future?

Our lead systems architect in San Diego says, "While working with our internal employees as an outsourced team in Argentina and Peru, frameworks create a common central point based on the MySQL and PHP (LAMP Platform), which allows the entire organization to stay on the same page with regards to web development. That common point is critical because we all know that project specifications change so quickly that by the time someone else comes along to reuse your stuff, it probably needs to be re-written anyway."

We can honestly say that the projects we have worked on using a framework started more easily and finished a little faster than if we wrote raw code (one line at a time). As requirements change and grow for these projects post-deployment, we are less concerned of maintainability because of the community that often backs each and every framework. These communities often update the core of the framework and supply module/package updates on an almost weekly basis...and almost every one of those are free to download.

Frameworks and Content Management Systems we prefer here at SGC

CakePHP

www.CakePHP.org
CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development schedules and helps us as developers to write less code.

CodeIgniter

www.CodeIgniter.com
CodeIgniter is a powerful PHP framework with a very small footprint, built for projects that need a simple and elegant solution. As developers we know many of our customers live in the real world of shared hosting accounts and this streamlined package is thoroughly documented, making CodeIgniter one of our preferred frameworks.

Symfony

www.Symfony-Project.org
Symfony is a full-stack framework and a library of cohesive classes written in PHP. The framework provides an architecture of components and tools for us as developers to build complex web applications faster than raw code.

Symfony is built based on experience. It does not reinvent the wheel, it uses best practices of web development and integrates some great third-party libraries at the same time. Symfony is one of the most popular PHP frameworks around because of those embedded benefits.

Zend

www.Zend.com
Zend Framework is an open source, object oriented web application framework for PHP 5. Zend Framework is often called a "component library" because it has many loosely coupled components that can be used more or less independently. Zend Framework also provides an advanced Model-View-Controller (MVC) implementation that can be used to establish a basic structure for your Zend Framework applications. A full list of Zend Framework components along with short descriptions may be found in the » components overview. This QuickStart will introduce you to some of Zend Framework's most commonly used components, including Zend_Controller, Zend_Layout, Zend_Config, Zend_Db, Zend_Db_Table and Zend_Registry, along with a few view helpers.

Joomla

www.Jommla.org
Joomla is an award-winning PHP content management system (CMS), which enables us to build websites and online applications for our clients on the LAMP platform. Many aspects, including its ease-of-use and extensibility, have made Joomla one of the most popular website software packages available for free download. Best of all, Joomla is an open source solution that is freely available to everyone.

Joomla is designed for a clean install and set up which supports even developers that may not be senior. Many web hosting services offer custom hosting just for the Joomla package and best of all it is PHP and MySQL

Components that make up quality PHP & MySQL Frameworks

  • MVC: Indicates whether the framework comes with inbuilt support for a Model-View-Controller setup.
  • Multiple DB's: Indicates whether the framework supports multiple databases without having to change anything.
  • ORM: Indicates whether the framework supports an object-record mapper, usually an implementation of ActiveRecord.
  • DB Objects: Indicates whether the framework includes other database objects, such as a TableGateWay.
  • Templates: Indicates whether the framework has an inbuilt template engine.
  • Caching: Indicates whether the framework includes a caching object or some other way of caching.
  • Validation: Indicates whether the framework has a built-in validation or filtering component.
  • Ajax: Indicates whether the framework comes with built-in support for Ajax.
  • Auth Module: Indicates whether the framework has a built-in module for handling user authentication.
  • Modules: Indicates whether the framework has other modules, like an RSS feed parser, PDF module, or anything else (useful).
  • EDP: Event Driven Programming.New!

A content management system is software that keeps track of every piece of content on your Web site, much like your local public library keeps track of books and stores them. Content can be simple text, photos, music, video, documents, or just about anything you can think of. A major advantage of using a CMS is that it requires almost no technical skill or knowledge to manage. Since the CMS manages all your content, you don't have to.

A Web content management (WCM) system is a CMS designed to simplify the publication of web content to websites and mobile devices, in particular, allowing content creators to submit content without requiring technical knowledge of HTML or the uploading of files. Several web based content management systems exist both in the Open Source and commercial domains. However, this is one area where OSS has gained dominance over proprietary counterparts.

MVCs - Model View Controller

Model - This is the part of your application that defines its basic functionality behind a set of abstractions. Data access routines and some business logic can be defined in the model.

View - Views define exactly what is presented to the user. Usually controllers pass data to each view to render in some format. Views will often collect data from the user, as well. This is where you're likely to find HTML markup in your MVC applications.

Controller - Controllers bind the whole pattern together. They manipulate models, decide which view to display based on the user's request and other factors, pass along the data that each view will need, or hand off control to another controller entirely. Most MVC experts recommend » keeping controllers as skinny as possible.

Linux, Apache, MySQL & PHP | Perl | Python (LAMP Platform)

Linux | Apache | MySQL | PHP/Perl/Python

The LAMP is most often used to create dynamic websites with immense databases such as Facebook. On a website like this, one script can drive multiple pages of content. Additional scripts are used here to process form data and mail content. That too could be done through the main script using included files.

LAMP projects can include social networking integration, forums, forms, uploads/downloads, payment gateways, communities of users, management tools, calendars, shopping carts, mailing lists and all sorts of useful applications. The source code for many of the open source projects on the web are built using LAMP stacks and most are free, while advanced projects often require a registration fee for commercial use.

PHP

Using PHP scripting and MySQL database enables us to create applications that will run on just about any computer environment, regardless of operating system. PHP has thousands of programming functions to facilitate almost any task and working in conjunction with the most popular database in the world leaves SGC endless programming options.

If a computer can run the Apache web server application, then PHP & MySQL will function fluidly in the environment. This means we can develop a project on my Windows PC, and send it to a hosting partner that runs Linux box. The combination of these four tools leaves us with the LAMP (Linux Apache MySQL, PHP/Python/Perl) platform.

PHP is a multi-purpose scripting/programming language that is suited for server-side web development. PHP generally runs on an Apache Web server, however it can also run on Windows IIS machines. PHP is available free of charge, and the PHP Group provides all of the source coding for users to build, extend and design applications for their own use.

PHP primarily acts as a filter, taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data. Most commonly, the output will be HTML. Since PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor.

MySQL

MySQL is the world's most popular open source database software, with over 100 million copies of its software downloaded or distributed throughout its history. With its superior speed, reliability and ease of use, MySQL has become the preferred choice for Web, Web 2.0, SaaS, ISV, Telecom companies and forward-thinking corporate IT Managers because it eliminates the major problems associated with downtime, maintenance and administration for modern, online applications.

Data can be exported from MySQL for use in spreadsheets or databases on your PC using many tools that are readily available. Similarly, data residing in existing PC spreadsheets and databases can be imported to an online database. This portability of data opens up all sorts of uses, especially for workgroups and for those who need to access data from both home and work.

MySQL Sandbox

By: 
Nesbot
Date: 
April 15th, 2010

Certainly staying on top of the latest version of PHP, MySQL and other packages allows for quicker, efficient, secure and robust development. It can also cause a problem: backwards compatibility.

This brings me to a situation we had sometime ago, a client approached to re-develop their site in Drupal (which is no problem for us), the only constraint was that their current server is running MySQL 4.1, and like I mentioned I'm trying to keep up with the latest and newest version, so naturally we're running 5.1.

While in reality this would not be an issue, I've had so many sour experiences with missing PHP extensions, different Apache versions, even different Linux distributions.

So how to resolve this MySQL dilemma? My first option was to install another instance of MySQL and add another port and socket, sounds easy enough. Wrong, it is a very tedious and confusing process (well at least for me), lack of proper documentation, endless number of packages, not to mention fiddling on a dev server while developers are working and testing and/or clients reviewing, etc, etc.

And that's when I found MySQL Sandbox, as they describe it "MySQL Sandbox is a tool that installs one or more MySQL servers within seconds, easily, securely, and with full control."

All you need to do is download MySQL Sandbox, install, download the version of MySQL you need (version 3 till whatever is out now), run MySQL sandbox with the version of MySQL you want and viola! You have a separate instance of MySQL. You can connect just by changing the port number and socket to the version of MySQL you want to run (e.g if the version is 4.1.22 your port will be 4122).

The setup is very seamless, you must have Python installed, and then add the MySQL Sandbox start script to your Linux startup so it loads back up in case your server takes a fall in the middle of the night.

The only issue I've found so far is that it keeps the created Databases on RAM/VRAM so once you reboot your server your MySQL Sandbox DB's disappear. So it should not be used for production purposes, I believe with some work you can probably set up the Sandbox for production, although I would not recommend it.

Feel free to comment or ask questions via our contact form.

Syndicate content

Copyright 1999-2011 ©SGC | All Rights Reserved
Our Work | Terms of Service | Privacy Policy | Sitemap | XML | Admin
Phone: (888) 622-7098 | Fax (858) 737-7921