Drupal ThemesUser login |
Dev Shed ArticlesCompleting Regular Expression BasicsIn this conclusion to a four-part series on parsing and regular expression basics in Perl, we finish our study of regular expressions; you'll even learn how to create your own. This article is excerpted from chapter one of the book Pro Perl Parsing, written by Christopher M. Frenz (Apress; ISBN: 1590595041).
- Regexp::Common::Comments This module generates regular expressions that match comments inserted into computer code written in a variety of programming languages (currently 43). The syntax to call these regular expressions is as follows, where refers to the base comment matching functionality and... Categories: PHP - MYSQL - LAMP stuff
Abstracting Access to MySQL for an MVC-Based Framework in PHP 5In this third part of the series, I further enhance the functionality of this sample MVC framework by adding a class to it that takes care of interacting with MySQL in a simple manner. Youll see the importance of this abstraction class when I show you the definition of the corresponding model, which will aggregate an instance of MySQL to handle the data layer very easily.
- Despite how intimidating this task may sound to you, building a framework in PHP 5 that follows the structure imposed by the Model-View-Controller design pattern is much easier than you may think. So, if youre interested in learning the key concepts that surround this process, either for building... Categories: PHP - MYSQL - LAMP stuff
Developing the Router/Dispatcher Class for a Simple MVC-based Framework in PHP 5In this second part of the series, I add another crucial component to this example MVC-driven framework. It's a basic router/dispatcher class. While the incorporation of this brand new module turns the framework into a more functional piece of code, there are other components that still need to be developed.
- Given the huge number of MVC-driven PHP frameworks available these days, which come loaded with lots of powerful features aimed at speeding up the development of web applications, its fair to think that building software packages like these may be a difficult and demanding task. While this is und... Categories: PHP - MYSQL - LAMP stuff
Building a Simple MVC-based Framework in PHP 5In this first part of a series, I develop the first module of a model-view-controller (MVC) driven framework, which happens to be a front controller. By combining this component and a basic .htaccess file, its possible to route all HTTP requests to the (still-undefined) dispatcher class.
- As you may know, one of the most popular approaches that can be taken for speeding up the development of PHP applications without having to start coding them from scratch is using either a proprietary or a third-party framework. Yes, nowadays PHP frameworks are available in so many flavors and sizes... Categories: PHP - MYSQL - LAMP stuff
Modifiers, Boundaries, and Regular ExpressionsIn this third part to a four-part series on parsing and regular expressions in Perl, you will learn about cloistered pattern modifiers, boundary assertions, troubleshooting regular expressions, and more. This article is excerpted from chapter one of the book Pro Perl Parsing, written by Christopher M. Frenz (Apress; ISBN: 1590595041).
- Cloistered Pattern Modifiers In the previous section, you saw how to apply pattern modifiers to an entire regular expression. It is also possible to apply these modifiers to just a portion of a given regular expression; however, the syntax is somewhat different. The first step is to define the s... Categories: PHP - MYSQL - LAMP stuff
Plan a Good DatabaseOrganize a collection of data somehow for later usage and you will get a database. In the last couple of years, with the spread of the Internet, databases have become something you will come across everywhere on the World Wide Web. Most websites have a strong database behind them. With this phase of the web's evolution, if you work in software development, eventually you will need to create and plan a database from scratch. This article is here to teach you and show you what traits a solid plan should have.
- To start, we need to separate the concept of data and information. While in the everyday usage these two merge, in the world of databases these are two very separate things. Data is the representation of facts/concepts of stuff that is adequate for human or automatic (by a machine) processing. The i... Categories: PHP - MYSQL - LAMP stuff
New Open Source Update Fedora 13 is Released to the PublicThe open source community has a new tool to tinker with thanks to the release of Fedora 13 from the Fedora Project. The Fedora Project is a group dedicated to bringing free open source software to the public. They are continuing to do so with this current release, which comes just half a year after the release of Fedora 12.
- Fedora 13 is the latest edition of the free Linux-based operating system from the group. Anyone can download and use the operating system. They are also free to modify it to their needs and distribute it as they see fit. Fedora 13 is just the latest way that the Fedora Project encourages the innovat... Categories: PHP - MYSQL - LAMP stuff
Quantifiers and Other Regular Expression BasicsIn this second part of a four-part series on parsing and regular expression basics in Perl, you'll learn about quantifiers, modifiers, and more. This article is excerpted from chapter one of the book Pro Perl Parsing, written by Christopher M. Frenz (Apress; ISBN: 1590595041).
- Quantifiers As you saw in the previous section, you can create a simple regular expression by simply putting the characters or the name of a variable containing the characters you seek to match between a pair of forward slashes. However, suppose you want to match the same sequence of characters ... Categories: PHP - MYSQL - LAMP stuff
A Final Example of Late Static Bindings in PHP 5.3Late Static Bindings (LSB), a powerful feature bundled with PHP 5.3, are much easier to master than you might think. Achieving intimate knowledge of them requires only an average background in working with objects and classes. This article concludes a six-part series that shows you what you can do with LSB.
- So, if you're a developer interested in grasping the key concepts that surround the implementation of LSB, then I recommend you start reading this article series right now. Through its tutorials you'll learn how to take advantage of the functionality offered by LSB to create flexible hierarchies ... Categories: PHP - MYSQL - LAMP stuff
Factoring (X)HTML Objects with Late Static Bindings in PHP 5.3In this fifth part of a six-part series on late static bindings, I define some sample classes which are responsible for creating some block-level (X)HTML objects, such as simple divs and paragraphs. Once we get these classes up and running, we'll be ready to test the factories created in the previous part and see if theyre actually as functional as they look.
- As youll possibly know, PHP 5.3 includes, among a few other useful things, a new feature called Late Static Bindings (LSB). It comes in handy for resolving at runtime from which class a given static method has been called. Even though this major release of the language also offers a solid support fo... Categories: PHP - MYSQL - LAMP stuff
Late Static Bindings in PHP 5.3 with the Abstract Factory PatternIn this fourth part of the series, I demonstrate how Late Static Bindings can be useful for implementing the abstract factory design pattern. The feature will be used at the instance level within the constructor of an abstract factory class, where at least one of its concrete implementations is tasked with factoring a couple of block-level (X)HTML objects, such as divs and paragraphs.
- Among the new features that have been packaged with PHP 5.3, theres one that turns out to be remarkably useful during the development of object-oriented applications. It allows programmers to efficiently solve common issues that occur when its necessary to deal with hierarchies of classes in a sta... Categories: PHP - MYSQL - LAMP stuff
Parsing and Regular Expression BasicsParsing helps us to extract the information we need from the mounds of data available. Regular expressions assist us in the hunt. This four-part article series will show you how to use Perl with regular expressions to accomplish your parsing tasks. It is excerpted from chapter one of the book Pro Perl Parsing, written by Christopher M. Frenz (Apress; ISBN: 1590595041).
- The dawn of a new age is upon us, an information age, in which an ever-increasing and seemingly endless stream of new information is continuously generated. Information discovery and knowledge advancements occur at such rates that an ever-growing num ber of specialties is appearing, and in many fie... Categories: PHP - MYSQL - LAMP stuff
The Get_called_class() Function in PHP 5.3In this third part of a series on late static bindings, you will learn how to use the get_called_class() function bundled with PHP 5.3 for determining at runtime which class has been called in a static context. In certain situations this function can be used as a replacement for late static bindings, but LSB has a wider range of possible uses; keep this in mind when developing your own object-oriented applications.
- If you ask a group of developers whats so exciting about PHP 5.3, its very probable they'll tell you that this major upgrade of the language now supports native namespaces and anonymous functions. While these enhancements have been widely commented on and discussed in blogs and forums everywhere,... Categories: PHP - MYSQL - LAMP stuff
Registry Classes in Action with Late Static Bindings in PHP 5.3In this second part of the series, I show you how useful late static bindings can be for dealing with a hierarchy of classes in static environments. In this case, the classes that compose that hierarchy are simple implementations of the registry design pattern, but this feature can be utilized in different situations and yield similar results.
- The release of PHP 5.3.0 a few months ago put a big smile on the face of many developers. This major upgrade of the language has been packaged with some new and exciting features that allow you to build more robust and reliable applications, particularly when using the object-oriented paradigm. By ... Categories: PHP - MYSQL - LAMP stuff
Using Late Static Bindings in PHP 5.3PHP 5.3 introduced a number of valuable features to the popular and constantly developing language, but some of them seem less useful at first glance than they actually are. Late static bindings fall into this category. This article series shows you how to unlock the true power of LSB to work for you.
- Without a doubt, PHP is in steady and constant evolution. Its dynamic nature is one of the most relevant factors that has contributed to turning it into the mature language that we see nowadays. This doesnt mean that its API is a beautiful model of consistence and efficiency, though, especially w... Categories: PHP - MYSQL - LAMP stuff
Install Linux with KnoppixIf you're interested in installing the Debian GNU/Linux distribution, you'll want to know that the Knoppix installer can save you a lot of trouble. This article walks you through the process. It is excerpted from the book Knoppix Hacks, Second Edition: Tips and Tools for Hacking, Repairing, and Enjoying Your PC, written by Kyle Rankin (O'Reilly, 2009; ASIN: B002QX441K). Copyright © 2009 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media
- Once you are comfortable using Knoppix for your desktop, you might find yourself booting onto the CD more often. While you can create persistent settings and a portable home directory to mount, at some point you might decide you would like to use Knoppix full-time by installing it to your hard drive... Categories: PHP - MYSQL - LAMP stuff
Python 3.1: String FormattingIn this conclusion to a three-part series on Python 3.1, you'll learn how to format strings and put them together in different ways. We'll also review what we covered in the series as a whole, which includes your first Python program. This article is excerpted from the book Beginning Python: Using Python 2.6 and Python 3.1,, written by James Payne, Developer Shed Editor-in-Chief (Wrox, 2010; ISBN: 0470414634).
- If you like what you're reading here, you can find it at Wrox or purchase the entire book at Amazon. Putting Strings Together in Different Ways Another way to specify strings is to use a format specifier. It works by putting in a special sequence of characters that Python will interpret as a ... Categories: PHP - MYSQL - LAMP stuff
Python 3.1: Strings and QuotesIn this second part of a three-part series that introduces you to Python, you'll learn about the importance of strings, how they work, and why Python uses three different kinds of quote marks. It is excerpted from the book Beginning Python: Using Python 2.6 and Python 3.1,, written by James Payne, Developer Shed Editor-in-Chief (Wrox, 2010; ISBN: 0470414634).
- If you like what you're reading here, you can find it at Wrox or purchase the entire book at Amazon. What is a String? A string is one of several data types that exist within the Python language. A data type, as the name implies, is a category that a particular type of data fits into. Every type o... Categories: PHP - MYSQL - LAMP stuff
Python 3.1: Programming Basics and StringsReady to take your first steps in Python? This three-part article series walks you through the basics, introducing important concepts such as strings. In this first part, you'll learn how programming is different from using a computer, how to install Python, and how to start using the Python shell. It is excerpted from the book Beginning Python: Using Python 2.6 and Python 3.1,, written by James Payne, Developer Shed Editor-in-Chief (Wrox, 2010; ISBN: 0470414634).
- If you like what you're reading here, you can find it at Wrox or purchase the entire book at Amazon. How Programming is Different from Using a Computer The first thing you need to understand about computers when youre programming is that you control the computer. Sometimes the computer doesnt do... Categories: PHP - MYSQL - LAMP stuff
Hash FunctionsIn this second part of a two-part series on hashes in Perl, you'll learn about hash functions and hashes in different contexts. This article is excerpted from chapter five of the book Beginning Perl, written by James Lee (Apress; ISBN: 159059391X).
- Hash in List Context When we discussed lists and arrays, we spent a lot of time talking about the difference between list and scalar context. Lets look at what happens when we evaluate a hash in list context. This is demonstrated with the following program: #!/usr/bin/perl -w # listcontext.pl... Categories: PHP - MYSQL - LAMP stuff
|
Popular contentDrupal Showcasedrupal security feed |