views:

229

answers:

8

This may sound like a really stupid question but I'm a noob so excuse that please. But how does one use a PHP framework like Zend or CakePHP. I know they are code libraries that can be used to speed up the development process but how to implement it in the first place. I downloaded Zend framework but what do I do with it. All the documentation I have seen assumes that one knows how to start using it but it's not like an installer that can be installed and start using. So what to do with that Zend framework folder? Do I "connect" it with my IDE or something??? I use Dreamweaver.

+8  A: 

There are two solutions, generally :

  • If what you like the most is discovering, go by yourself, and in a couple of days, you'll find the way ;-)
  • Or if you just want to be able able to develop, spending less time to discover the framework, you can follow a tutorial.

For Zend Framework, you might want to take a look at the electronic book Survive The Deep End! : it's not finished, but there are 10 chapters that should already get you started.

You can also take a look at the official Quickstart : it's not going much into the details, but is far shorter, and is probably an interesting read too ;-)

Pascal MARTIN
There is also Rob Allen's tutorial http://akrabat.com/zend-framework-tutorial/
Gordon
+1  A: 

A framework is only a bunch of source file, you won't start it but "use it".

For the Zend Framework I advise you to look at the quickstart guide. I would walk thought the installation on the framework and settings your project base.

RageZ
+1  A: 

Start with the Quickstart: http://framework.zend.com/manual/en/learning.quickstart.intro.html If you don't know the basics of PHP, I recommend you pick up a book. I loved this one back when I first learned PHP. http://www.amazon.com/PHP-MySQL-Web-Development-4th/dp/0672329166/ref=sr_1_1?ie=UTF8&s=books&qid=1265261741&sr=1-1

Typeoneerror
+3  A: 

The way I approach learning a framework is usually looking into its documentation. There are also plenty of tutorials for most of the frameworks available, such as CodeIgniter, CakePHP, Zend. Here are a couple of links I think you'd enjoy, all from the net.tutsplus.com website.

Getting Started with CakePHP

Configuring Zend Framework

Considerations for Choosing a Web Development Framework

Web Development Frameworks Pro's Use

Hope this helps!

alvincrespo
+1  A: 

You should take a look at these links

First related link from SO

Creating your project This one is from the ZF documentation site. It should guide you through your setup.

Lombo
+1  A: 

If you're using Dreamweaver, I'm guessing you're coming from a non-developer background (it's a generalism I know).

In short, if you're trying to learn a framework, it's probably best that you know some PHP first, and you'll find that a lot easier if you use a decent editor. There's plenty out there that support PHP much more effectively than Dreamweaver ever could, particularly for larger projects involving external libraries - I won't go into detail here as there's probably a million posts on SO covering such things.

I would personally advise you starting with CakePHP. You'll probably end up using Zend Framework later, but their documentation glosses over many of the nice things about modern development techniques, whereas CakePHP values "convention over configuration" - you have to do very little to get a site up and running.

Stephen Orr
A: 

I suggest you dump Dreamweaver and pick a real PHP-oriented IDE, like Zend Studio, Komodo IDE or Eclipse with PHP plugin/environment (free).

Then, the most popular and effective way of learning a framework (or most technical stuff really) is to learn by examples. All of the frameworks (Cake, Zend Framework, EZC, CodeIgniter etc.) have "quick start" examples, and most of show how to use the MVC capabilities (model, view, controller, basically reading url, producing and showing appropriate content).

Here is a list of most popular (hence well maintained) PHP frameworks:

http://www.phpframeworks.com/top-10-php-frameworks/

After you dig through the examples provided on frameworks' webpages, you should consider writing a simple application that does something more than display "Hello World!". Write something you are used to write every day, but use a framework this time. Pick 3 of the frameworks you think are most user-friendly for you and try to rewrite any of your existing scripts using each of the frameworks.

You'll have a winner in no time.

Sidenote: try to avoid depreciated PHP 4 frameworks, or those that claim PHP 4 compatibility is so important that they will not use PHP 5 features. PHP 5 brings a lot of important object-programming features that, after you learn them, you will be using everywhere. I recommend a modern, quickly evolving and often patched PHP 5 framework. Because a framework is just a piece of software, a strong developer community means quick bug fixing and a polished end result - this will save you a lot of time.

Joust
A: 

The best thing to get if you dont already have it is a wamp or mamp server to do testing on you. You can download wampserver for windows and mampserver for mac. From there you can install the framework locally and mess around with it.

bucho