Graud
Graud

Reputation: 29

How does one start using a PHP framework?

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.

Upvotes: 2

Views: 3211

Answers (8)

tjserb
tjserb

Reputation: 11

It seems there is a bias and/or ignorance of Dreamweaver here. Dreamweaver is a great starting point for learning php the code hinting is the best, It links directly to php.net and tells you everything you can possibly need to know about any code. It has a lot of good functions for dynamic development. I used to be biased toward it too but it turns out that it's a great tool. I like it way more than Eclipse or some of the other IDE's out there. Not saying there is no value in those tools just stating my opinion from my experiences. Dreamweaver is not just a "wysiwyg editor." In fact, I only use it to code by hand. Site specific code hinting lets you import the classes for any framework you want so even though you're not familiar with the available classes as long as you know what it starts with your good to go. I learned the language faster than anything else out there.

I do recommend a good book to get started and Lynda.com has a couple of great starter videos to get you on your way. They even have one that shows you how to use Dreamweaver to code with any language. Or any other editor, that's actually how I learned Eclipse. There's a ton of resources out there. Grab the low hanging fruit first!

Upvotes: 1

jbrass
jbrass

Reputation: 941

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.

Upvotes: 0

Artur Bodera
Artur Bodera

Reputation: 1682

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.

Upvotes: 0

Steve Hill
Steve Hill

Reputation: 2321

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.

Upvotes: 1

alvincrespo
alvincrespo

Reputation: 9334

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!

Upvotes: 3

typeoneerror
typeoneerror

Reputation: 56988

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

Upvotes: 1

RageZ
RageZ

Reputation: 27323

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.

Upvotes: 1

Pascal MARTIN
Pascal MARTIN

Reputation: 401172

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 ;-)

Upvotes: 8

Related Questions