Category Archives: PHP Development

Setting Up A PHP Development Environment for Dreamweaver- Part 2

In the part one of this article, I explained you about things to do before installing a PHP development environment for Dreamweaver. After installing XAMPP and launching, you will see a screen with a short menu. To start the XAMPP Control Panel type ’1′ and press Enter. After this type X and press Enter. This will close the command prompt window.

Starting the servers

You need to go to the Windows Start Menu and launch the XAMPP Control Panel to start the Apache and MySQL servers. Then, click the Start button alongside Apache and MySQL. You will get a confirmation that you have successfully started them. After this you can view that the label on the Start buttons changes to Stop.

If you get a Windows Security alert, which asks you whether to keep blocking MySQL/ Apache, then choose Unblock for both the programs.

In case of errors note the following points:

If you are unable to start Apache, first ensure that you are logged into your computer with an Administrator account. Just selecting the Run As Administrator option may not give enough privileges to start the web server.

If you get an error while starting up, double-click the file C:\xampp\apache\logs\error.log in Windows Explorer, and scroll to the end of the file. It is at this place that you can read any error messages.

The error log for MySQL is located in the C:\xampp\mysql\data folder. It is usually present in a file that uses the same name just as your computer followed by an .err file name extension. If you want open it, you can double-click its icon. When you are prompted to select a program to use, you can choose Notepad.

To enable Apache or MySQL as Windows services so that they start automatically, you must go for the Svc check box alongside each one.

FileZilla and Mercury are File Transfer Protocols and mail programs, which are usually not indispensable for PHP Programming Long Beach in Dreamweaver. Hence, I would not be describing anything in detail about them.

To secure the database please note the following points.

If the installation process is error free and all files have been installed properly, then you can view a web page that asks you to select a language which you are comfortable with.

The menu on the left side of the home screen allows you to access different parts of XAMPP and also other security configuration options.

From the left menu click Security. This takes you to a new browser window or tab which gives a report on the present security status. Click on the link below the report.

You can now see the security console (see Figure 4), which prompts you to create a password for the MySQL superuser, root.

Source: http://www.spyghana.com/setting-up-a-php-development-environment-for-dreamweaver-part-2/

Did you like this? Share it:

Smart Use Of Frameworks Make PHP Development Vibrant

In present days have a web presence is mandatory for all sorts of businesses be they online or brick-and-mortar stores, but just presence is not enough or have a visiting card type website won’t able to compete in today’s environment. Businesses should have something more than that of static web pages and that is interactivity, dynamism and awesome user experiences along with better usability. This we can achieve only through PHP web development because PHP is an excellent opensource option to get ultramodern websites that can meet our small to big business goals.

If we want to do businesses with the help of websites we have to look in depth the PHP development that can create such miracles. Basically PHP is highly flexible web development language, but rather we can say that over flexible that ultimately leads to haphazard and cluttered coding and these becomes more messy in complex PHP web application development so we need to organize these all with the help of some structure or framework that can organize coding and offer enough tools and technologies to make website development process rapid and qualitative.

These frameworks are offering may advantages like they separate coding part from the visual designing so there are ample room to work on both parts simultaneously and without any distractions. This collaboration not only end into the shortest time line, but also offers quality inputs from both parts and easy project management for ever busy project managers. PHP frameworks also offering ease to the PHP developers with template system where you need not to reinvent wheel again and again because you can reuse the code of previous project in the next project and call those functions wherever you need so your coding will become compact and clean as well as comprehensive if PHP web developers apply good coding practices.

There are many effective PHP frameworks are available in the market so you can use CakePHP for small to medium projects and Zend for large size projects thus, we have ample choices to select the frameworks according to our needs.

In CakePHP development we can use scaffolding and strict conventions to make code more organized and streamlined so we would have cost-effective website as well as web application development. Whereas Zend is lean enough to give ample room for big and complex projects to create highly functional and better websites or web applications.

PHP developers have some more advantages of the PHP web development as it is easy to learn if you are little bit familiar with C class languages. Its easy integrations with HTML is avoid the separate APIs and well as IDE and reduce the learning curve of the developers besides reducing investment of the developers. You can embed the PHP code into HTML and compel web server to parse it and send HTML pages to the client browsers to render them thus it avoid any load on client devices and functions on the server. This server side coding has distinct advantage and that is you can create dynamic web pages that a user can create content on those web pages and let users to interact with the owner or with other users in real-time or can make exchanges of the data without any barrier.

Source: http://www.spyghana.com/smart-use-of-frameworks-make-php-development-vibrant/

Did you like this? Share it:

How to create a table with alternative row style using PHP?

Table With Alternative Row Style

Figure 1: Table with Alternative Row Style

How to create a table with look and feel similar to Figure 1 from above? Follow these steps below:

 

Step 1: Create CSS style for the even an and odd class. In figure 2, the background color of the even and odd table are set to different variation of grey color.

CSS Odd Even Class

Figure 2: CSS Code for Odd and Even class

Step 2: Display array data in a table and set table row class to odd or even. Figure 3 displays the code for display the table from Figure 1.

PHP Code To Display Table with Alternative Row Styles

The array $tblData contains randomly generated integers. The variable $key is the array index and $value is the actual integers.

The key line of code to differ the odd and even row is:

The Key Line of Code for Differentiate Odd and Even Rows

($key & 1)  checks if the array index is even or odd. The code sets the table row style to even and odd according the array index.

Did you like this? Share it:

Tips to Choose the Best PHP Services Provider

If you are looking for PHP services like PHP application development, PHP consulting, PHP staff augmentation or PHP software development, where will you go? Where will you start looking for PHP developers or programmers?

First things first; start looking for web development companies that offer the particular PHP service that you require. Generally, Web development companies provide the following PHP services:

• PHP Web-Development (Website and Portals)
• PHP Application Development
• PHP Staff Augmentation
• PHP Software Development
• Product Development
• PHP Trainings
• PHP Consultancy
• PHP Application Support & Maintenance

After you have a list of the PHP service providers, you can start checking and cross-checking their backgrounds. Consider the pointers given below, to choose the web development company that fits your bill:

• Experience and expertise in PHP services
• Standing and reputation of the vendor in the market
• Development facilities and infrastructure
• Development costs/cost-efficiency
• Strength/quality of PHP developers/programmers
• Delivery process and timeline
• Level of Transparency during the implementation process.
• After-sales services like installation, support and maintenance

An ideal PHP services provider should deliver you unparalleled and cost-effective services. The right vendor must give you an edge over your rivals and help you in boosting your business success.

Source: http://technology.ezinemark.com/tips-to-choose-the-best-php-services-provider-7d2d92727ecf.html

Did you like this? Share it:

CakePHP Framework – a difference maker in PHP Development Services

 

by environmental-expert.com

When CakePHP is used for providing PHP development services it benefits both, the web development company and its clients. A web development company uses ocean of technologies with supported tools and frameworks to make a mark in web application development industry using PHP as a base. However which technology, framework or tool should be used for providing PHP development services depends on the type of company and its method of application development.

One of the most known frameworks for PHP application development is CakePHP. As it comes with MIT license (Massachusetts Institute of Technology) it is open source and available free for use. Hence a significant benefit of using CakePHP for providing PHP development services is that companies are able to provide much better services at a much lower cost. Stakeholders with small to medium sized businesses could get good services for a nominal price.

With comprehensive architecture useful for developing, deploying and maintaining applications CakePHP fastens PHP application development process. Hence a web development company can reduce turnover time and help their clients have desired product in a very short period of time, reduced turnover time ensures greater client satisfaction.

Benefits of using CakePHP framework for providing PHP development services can be listed as below:

->It is compatible with PHP4 and PHP5; developers can easily use it without worrying about their PHP version.

->MVC (Model View Controller) based architecture, providing smoother control and handling for development process resulting into clear portrait of PHP development services.

->Allows data conversion between incompatible system types used in databases and object-oriented programming languages through its ORM (object rational mapping). It does so by representing every table from a class.

->Class core functions can be defined on an as required basis

->Plug ins can be added to gain more from CakePHP for providing PHP development services

Did you like this? Share it:

Zend Sends Enterprise PHP Skyward

By Adrian Bridgwater

Scalable PHP that leverages cloud infrastructure and services

Zend Technologies has had a busy month. In addition to releasing Zend Studio 8, the company has also announced a new cloud application platform to accelerate enterprise PHP adoption in the cloud.

The Zend PHP Cloud Application Platform  has been built to provide access to cloud application services and management, while delivering the cloud’s generally accepted benefits in terms of elasticity and high availability.

As an enterprise-grade web application infrastructure, the company asserts that this offering integrates technologies from new Zend product releases as well as cloud services offered through Zend partners.

“PHP powers one-third of the world’s websites and already accounts for a substantial portion of all cloud application deployments,” said Andi Gutmans, CEO and co-founder of Zend. “With this solution, Zend enables developers to quickly build portable cloud applications, provides IT operations teams with a reliable and manageable high-performance PHP environment, and offers a ‘pay-per-use’ pricing model that best fits cloud application deployments.”

Zend PHP Cloud Application Platform highlights include:

  • Native and portable cloud services — rapid development of cloud or native cloud applications using Zend Framework  components.
  • Enterprise PHP stack — high-performance, supported application stack including PHP, Zend Framework, necessary extensions and drivers.
  • Monitoring and diagnostics — application monitoring and diagnostics across multiple server instances for identification and triage of application- and service-level issues.
Did you like this? Share it:

PHP Smarty

 

by Wikipedia

Smarty is a web template system written in PHP. Smarty is primarily promoted as a tool for separation of concerns. Smarty is intended to simplify compartmentalization, allowing the presentation of a web page to change separately from the back-end. Ideally, this eases the costs and efforts associated with software maintenance.

Smarty generates web content by the placement of special Smarty tags within a document. These tags are processed and substituted with other code. Tags are directives for Smarty that are enclosed by template delimiters. These directives can be variables, denoted by a dollar sign ($), functions, logical or loop statements. Smarty allows PHP programmers to define custom functions that can be accessed using Smarty tags.

Smarty has been referred to as "most popular PHP templating engine in use today". It is currently under active development, with Smarty 3 in release candidate stages, with substantial functional and performance improvements.

Did you like this? Share it:

All About PHP Smarty – The PHP Template Engine – Part 2

 

Filters

Smarty allows you to specify (‘register’ or ‘load’ actually) filters through which you can run your templates before or after they are compiled. Prefilters are functions that your templates are run through before they’re compiled; postfilters after; and output filters, upon the template output as it is requested.

‘Why filters?’ you say. Prefilters allow you to do things like removing unwanted comments (such as those created by Dreamweaver) and ensuring content in the templates you don’t want does not go through to the compiler. Postfilters let you add additional information to your templates, such as the template creation date (as a comment) after they’re compiled. Output filters give you the ability to modify your template output, allowing you to do things like obfuscating email addresses on your Web page to protect against spambots (using a preg_replace()).

Config Files

Config files are configuration files where you can store global template variables. This allows you to store variables that should affect every template (i.e. global variables) in a central location. A good example of such a variable would be the color scheme for your templates. Your template designers only have to change the values in the config file should a color scheme revamp be required. This saves them suffering through the painful alternative of going through every individual template to change the colors.

Config files also allow for sections, which are not unlike those in .ini files. The section names are enclosed in brackets (e.g. [welcome_page]) and are only loaded upon request. Anything that’s not in a section is globally available (upon a call to the config_load function).
Plug-ins

The Smarty plug-in architecture was introduced in version 2.0 and allows you to customize Smarty to suit your purposes (however grand or nefarious). The prefilters, postfilters and output filters I discussed earlier are just some of the plug-in types available to the customizer. Other plug-in types are the modifier, block, compiler, resource and insert types.

With plug-ins, you can create your own template functions, variable modifiers and filters. You can even change the data source you want Smarty to read from (the default is from flat files), using a resource plug-in. With a resource plug-in, you can save your templates in a database, and retrieve them using sockets (or any other method you use to access templates with PHP. This means you can access just about any source).
Conclusion

Smarty is a quality template engine and one you should definitely consider, should you be on the lookout for a PHP version.

Combine Smarty’s template compilation and PHP’s inherent efficiency in generating Web pages, and you’ve got yourself a winner in the speed race. Smarty also offers extensive functionality, including template functions and variable modifiers, which can be extended using a well-designed plug-in architecture.

All that speed and functionality doesn’t come at the price of usability: the learning curve is no steeper than that of other template engines. Smarty is also supplemented with excellent documentation that’s available online and for download at the Smarty Website.

Andrei Zmievski, one of the authors, works on the PHP development team too, and he keeps Smarty’s development closely tied to that of PHP. So you can be confident that the latest changes to PHP (like the recent register_globals issue in PHP 4.2.0) will be supported by Smarty.

Did you like this? Share it:

All About PHP Smarty – The PHP Template Engine

 

By Cheah Chu Yeow

Smarty is a PHP template engine written by Monte Ohrt and Andrei Zmievski. Yet another template engine you say? The authors (and I too) would disagree. Smarty is different from the rest of the pack. What differentiates Smarty from other template engines like FastTemplate and patTemplate is that Smarty compiles your templates into PHP scripts, eliminating the overhead incurred in parsing the templates every time they’re accessed. This makes Smarty very scalable for large applications and high-traffic Websites …and if that didn’t make any sense to you, just take it that Smarty is very fast and would work well in stressful and high-traffic conditions!

The Smarty template engine has several other outstanding features besides template compilation, and we’ll discuss these a little later. But first, let’s de-mystify template compilation…

Template Compilation Explained

What does ‘compilation of templates’ mean, anyway? What do Web pages have to do with compiling? Isn’t compiling something C++ and Java programmers do? Yes – but this is a different sort of compilation.

Smarty parses your templates and creates PHP scripts from them (instead of binaries, as in general programming). Then, when your Web page is viewed, Smarty reads from these PHP scripts instead of pulling the templates themselves, which saves the work of having to parse your templates again. Smarty is smart about when to compile, too: it only re-compiles your templates when you make changes to them, so you don’t have to worry about manually compiling the templates (this is similar to JSP, if you’re aware of how it works).

The good thing about this is that you don’t even have to know the PHP scripts are there, nor how compiling works. It’s all hidden from view, so if you employ template designers to work on your templates, they (or you, if you design your own templates) don’t have to know that Smarty is a ‘compiling template engine’.

Caching

Smarty also features built-in caching of your template outputs. Smarty caches the output of the template contents, saving the overhead expense involved in retrieving your data from a data source. This data source would usually be external and slow, and is often the bottleneck in your application, like a remote database. Smarty caches the output of your template with this data from your data source, and saves you from having to connect to the database every time your Web page is accessed. If you have a slow-responding database server or are making multiple queries to your database, this caching feature would greatly improve the performance and responsiveness of your Web pages.

Of course, there are cases when you don’t actually want your template output to be cached, for instance, a stock ticker or situation where you constantly make changes to your database, which need to be immediately reflected on your Web pages. No problem! Smarty is again smart enough to allow you to specify what should or should not be cached.

In fact, you can have cached and un-cached portions on the same template page, as Smarty allows you to specify exactly what you don’t want cached (like that stock ticker at the bottom of the page) and what you do want cached (such as your navigation bar, which is seldom changed). You can also set the cache expiry time so that your template output is cached only for a specific length of time. You can thus achieve the middle-ground between having up-to-date dynamic content and quick-to-load Web pages.

One point to note (and which the authors of Smarty are quick to point out) is that this caching functionality is totally different from that of Zend Cache, PHP Accelerator and the like. Caching tools like PHP Accelerator cache the complied bytecode of your PHP scripts, whereas Smarty caches the output of your templates. As such, Smarty can work hand in hand with Zend Cache, where Zend Cache would cache the PHP scripts that Smarty creates from your templates. This makes for excellent performance, as evidenced by benchmarks. To quote the authors:

"Smarty’s performance _really_ excels in combination with a PHP accelerator."

Variable Modifiers

Smarty also provides variable modifiers, which, as the name implies, allow you to modify the contents of a variable. You can do things like uppercase a string (e.g.{$title|upper} which would convert your $title into all uppercase characters), truncate a string (e.g. {$content|truncate:30} which would allow you to display the first 30 characters of $content and follow that with ‘…’, particularly useful for displaying email or forum topic previews) or even use regular expressions to search and replace a string (e.g.{$article|regex_replace:"/bad word/":"***"} which would replace all occurrences of ‘bad word’ in $article with ‘***’).

Variable modifiers give your template designers the ability to modify your template variables without being confused by those funny characters we programmers so like to use. This sanitized method of ‘programming’ gives your template designers greater control over the formatting of your template variable, though they would need to know the variable modifiers available to them. It is still, without doubt, a useful feature, as the syntax is kept simple and is accessible to even non-programmers.

Template Functions

Smarty provides built-in and custom functions for use in your templates. These functions are like the API of Smarty templates, except that custom functions can be modified but not built-in functions. Functions allow you to do things like program conditional output (using if statements), perform iteration with dynamic loops (using foreach or section), load config files, cycle though a set of values (useful for alternating table row colors), keep a counter (useful for numbering list data), and much more.

It’s particularly of use to those of us generating Web pages with content from databases are the looping functions (section and foreach), which you can use to loop over and display a result set.

Did you like this? Share it:

Joomla Development

 

By Karolos Tsiligkirian, Ezinearticles.com

There are many advantages of using Joomla in comparison with other web design platforms. Let’s look at some of these advantages:

(1.) Joomla is in reality a complete CMS – that is a content management system. A CMS ensures that the pages of a website can be easily updated, as well as maintained. For example, it includes the addition or removal of some of the pages, and the dividing of content to separate categories. This is a very big benefit compared to making a website in straight forward HTML or Dreamweaver (or any other HTML editor).

(2.) But, what is the main reason behind using Joomla? Why don’t we use anything else, for example, a product based on Microsoft or IBM or any other kind of commercial product. Joomla is a free and open source product. It means that you have no need to pay any kind of fee for licensing that you would usually pay for commercial products of bif companies. As Joomla is open source there is a big pool of community sources available for providing assistance and support. The community of Joomla is available worldwide in all countries and there are a number of groups of local users who support it extensively with Forums and extra add-ons. There is a forum on the website Joomla.org that has around 200,000 members in total and they all provide input, as well as support into the process of making Joomla the best CMS platfom you can find.

(3.) A good reason for using Joomla is that it is very easy to extend its functionality. You can easily make anything with the help of its infrastructure. It can be a simple brochure website, an interactive membership site or even a fully featured shopping cart. The reason behind this is that there more than 5700 extensions for Joomla, for every possible use. Just name it! Image galleries, forums, shopping carts, video plug-ins, blogs, tools for project management and many more.

(4.) But again, some people state that they they prefer WordPress instead of Joomla. WordPress is also very popular and makes it easy to add some new pages or categories. WordPress also has many templates available, and this makes it a very attractive alternative for making websites quickly, as well as easily. WordPress is a fantastic blogging platform with CMS features. But of you need a real extendible CMS, Joomla is the best tool, especially for medium to big size websites. This complexity doesn’t mean that the design aspect is lagging. Joomla sites can be extremely pleasing to the eye! Just check out portfolio.

(5.) ACL. Joomla provides an access restriction system. There are different user levels with varying degrees of access control. Access restrictions can be defined for every content or module item. In the new Joomla version (1.6) this system is ever more powerful than before. The power of this ACL system is light-years ahead of that of WordPress.

(6.) SEO Friendly. Joomla is very friendly to the search engines. In case of very complex websites, it is sometimes necessary though to invest in SEO plugins like SH404.

There are a number of web applications that are used for the development of a website. Out of all these applications, Joomla is one of the top-3 most demanded CMS platforms. Joomla is used for simple sites, marketing portals, presentations, newspapers, ecommerce sites and many others.

You will be able to find a lot of information about Joomla on a number of search engines. You should remove the thought from your mind that the web development companies are going to cost you an arm and a leg, when you tell them about your plan for making the perfect website. This is not true. Creating the desired website by means of Joomla can become the best way by which you can save your money.

Why? Because it facilitates Rapid Website Development, it provides open source and it reduces the "code maintance" costs. Contact us for more information.

Did you like this? Share it: