Home > internet and communication > Build Website Like Pro With Zend Framework

Build Website Like Pro With Zend Framework

For PHP warriors who wants to better on website creation, they have to study the sacred book named Zend Framework.

What is really Zend Framework? How Zend Framework can assist your work in making up the website? Before discussing further, let us look at the problems that are often encountered in making the website.

If you do a whole website alone, it might take many months, week sacrificing every night, forget to eat and shower, and alone in the woods, hehehehe. But, at the time when your website launched, comments that appeared was “Ohhh …just like this, huh?”. Or in other cases, you may be incorporated in a team, involving development team of programmers, designers, database administrators, each of team has a skill and different responsibilities, but it does not create a good working system that caused the project difficult to maintain and eventually become dormant.

It is prone to occur in the development of a dynamic website, in terms of layout changes can occur, the business process, or database structure for the project.

Here’s a simple illustration that cause of complex problems: a designer produce the layout in HTML and give it to programmers, programmers turned it into a PHP file and do programming. A month later there is necessary changes in the layout, what happened?

There are two possible scenarios, the first, confusing designers will have to change the HTML layout has been mixed with PHP code which is not understood, the second scenario, the programmer will confused because designers gives a new layout in the HTML form that must be connected again with PHP.

If these problems keep happening, emerged the third scenario, which is required programmers to concurrently to a designer and vice versa. Not surprisingly, then we look for a “superman” with a lot of requirements, which if summarized into two points, which reads: 1) can do anything and 2) doing everything.

Do not be discouraged if you have experienced some problem, there is no any tools that can help you make sure everybody will be satisfied or a project would succeed. In addition, that life suppose will seem less passionate without challenges.

Fortunately, there is always a solution for every problem. In addition to looking for a superman, another solution is to use tools that can improve productivity and build a good structure in your website creation. The tool was called Zend Framework.

Zend Framework or abbreviated ZF is a object oriented framework web application that implement using MVC “architecture-at-will” that allows programmers to use again (reuse) a component whenever desired without requiring other ZF components, so that minimize dependence.

For your first time hearing ZF, of course, quite dizzy reading the above definition, the definition should not be made to arouse interest?

Therefore, for now dispose of the above definition. Simply you know that ZF is a library containing a collection of functions that are ready to use in your web application. Wow! (More interesting definition, isn’t it?).

Sorry, I have been pleased with PHP

The use of ZF is for PHP programmers, but whether all the PHP programmers need to use ZF?

“I have many years working with PHP, has been working on dozens of websites with good, so I’m not interested in the ZF or the other.” Said a maniac who represented all PHP programmers, when they heard there is new language programming tool.

Of course, if you could choose, a programmer would prefer to avoid using something new, because it imagined providing time for learning, adaptation, training, and troublesome at the moment things are already handled, another new technology that must be learned! Eventually the programmer only productive in learning, not work.

Fortunately, ZF replace the present rather than PHP. You do not have to use the new IDE or leave the rules and syntax of PHP has been learned. ZF only complete your weapons to be able to make a good website in less time, in a team development as well as individuals.

Although it is impossible you can get something without trying one or learning anything, it is important that you need to know is how to work and use it ZF possible.

Acquainted with the Zend Framework
Like PHP, ZF is in the open source world, ZF including “new stuff”. First release of Zend Framework 1.0 released in 2007. Sponsored by Zend Technologies, founded by Andi Gutmans and Zeev Suraski, is none other than the core contributors who make PHP.

ZF quality sounds no doubt by looking at the rows of user companies ZF, such as IBM, Siemens, Berlin museum, and so on. Large companies like Google, Microsoft, IBM, and Strike iron is their technology partners.

What’s on offer ZF? Perhaps in the feature below that makes you attracted to immediately try to ZF.

Support the Implementation of MVC
MVC or Model-view-controller is an architectural pattern in software engineering and as the name implies, shared understanding of the application based on the model, view, and controller.

Take the example of a car, what parts are called the model, view, and who control in a car? The so-called model is a process that is available, such as brakes and steering, while the view is an interior / exterior or packaging of the car, the controller is giving input, in this case is the driver.

Now we move the point of view of the car to the MVC web application, you may have a variety of processes, such as data entry, validation, and so on (which is the model), your application user interface consists of buttons, checkboxes, etc. (the view), and the task controller to handle the input obtained from the user interface and run the requested process.

Thus MVC architecture is created in your application. Sure with the goal of reducing complexity (especially for relatively large applications), adding flexibility and self reuse, and separate the business process (which is built by programmers) and the presentation layer (which was built by the designers).

In this MVC pattern created a clear separation between logic application and logic display. So, the story of confused designer or the programmer no longer occurs.

Use architecture-at-will

Terms of architectural use-at-will is refer to the terms of use the components when its desired, means you are free to choose to use ZF components, according to the needs. Understanding framework of ZF does not mean limiting your work on alone ZF component parts.

For example, you could just use the ZF components and filters for validation form, but for the purposes of the database, you use your own routines database, without any necessity to use the database component of the ZF.

In the blog that addressed the http://andigutmans.blogspot.com, Andi Gutmans concluded that the importance of rapid development and the appropriate infrastructure raises the need for a solution of one-size-fits-all.

This is to be achieved with the use of architecture-at-will, which is provides the functions needed, but still gives you the freedom to control and do tweaking.

Filters and Validation Data

You should apply if a website and filter data validation incoming, and sometimes making functions for the function-work that is quite a nuisance.

Imagine a registration form we often see on the website, where users enter the necessary data, such as usernames, passwords, name, address, e-mail, telephone, and so on. No one ensures that all data will be entered correctly; security issues can also arise if you do the validation only from the client side (e.g. validation using JavaScript).

Zend allows you to perform filtering and validation of data from the server side, for example, to validate the e-mail address. You do not need to think or write a complex regular expression.

Handling Database

ZF provides classes to work on RDBMS databases that support MySQL, Microsoft SQL Server, Oracle, PostgreSQL, and others. Job handling the database will be easier, but it also provided profiling feature that can examine the query performance.

As a comparison, let’s say you have a piece of PHP code for data entry below:

$sql = “INSERT INTO ms_product (code,name,remark) VALUES (‘01′,’Keyboard’,'qwerty’);

mysql_query($sql);

you can writ using ZF like this:

$db->inaert(‘me_product’, array(

‘kode’=>’01′ , ‘name’=>’Keyboard’,

‘Remark’=>‘qwerty’)

Coding the structure will better facilitate the programmers to understand and modify the program.

Other

Furthermore, ZF provides for the needs of library web services, like Amazon E-Commerce, Flickr, Yahoo!, Audioscrobbler, and others. Also provides solutions for multilingual applications, session handling, logging, e-mail, making / reading / editing PDF files, and much more.

In the official site ZF (http://framework.zend.com), also presented roadmap contains exciting features for the further ZF development.

You can start by trying to use the ZF components as needed. Start from simple things, such as making the form, session, validation, and others. Do not forget the ZF documentation available, the individual components of ZF elaborated with a clear description with examples.

More About MVC

If you want to implement the total Zend Framework MVC pattern in your project, it is better to build a strong structure of the application from scratch. Could be trouble at first, but it is relatively easy in handling large scale systems later on, especially in a development environment that involves a lot of personnel with different responsibilities in one system.

Zend Controller is a system which embodies the ZF MVC, the typical layout of the file system that implements the Zend Controller are as follows:

application/ controllers/

IndexCOntroller.php models/

views/

scripts/

index/

index.phtml

helpers/

ltera/

html/ .htaccess index.php

Where is the root directory of html document? Other directories separate files, each of which serves as a model, view, and controller.

Still required some technical steps you can follow the ZF documentation (especially the Zend Controller) until finally you can display your website in your browser.

Surely the steps above would be very inconvenient if the website that appears only write a message a welcome or Hello World.

But, imagine if you create a website with wide scope, where the application logic and display can be changed at any time and involves a lot of personnel who might be in and out. In that condition, the implementation of the MVC will usefulness demonstrate.

Conclusion
Speaking of programming tools was to be accompanied by practices that unfortunately can not be added to feature in an article. But, hopefully this article can provide initial insight on the ZF reader.

What is clear, as a stabilized framework and has a broad community, you seem to wait for the development of appropriate features from the next draw ZF

Related posts:

  1. Any Ttraffic to Your Website?
  2. Select Processor Like a Pro
  3. When the Pro Install a Motherboard
  1. No comments yet.
  1. No trackbacks yet.
CommentLuv Enabled
Incoming search terms for this article:mvc zend framework (2), build website with zend framework (2), (1), zend framework create website (1), zend framework large scale websites (1), zend framework large sites (1), zend framework make changes to website (1)
Get Adobe Flash playerPlugin by wpburn.com wordpress themes