views:

2323

answers:

8

A preamble: I've been using PHP for over 8 year every now and then, but never used a framework, only wrote scripts and addons. Mostly I used code generators like CodeCharge Studio or custom code for intranet apps. Since I am ok with design patterns, Zend framework doesn't look too hard for me to learn.

Starting with ZF: I've a read the QuickStart manual and wonder what can advance me to being fast with basic Zend web app development. As I understand there are repetitious tasks that take a lot of time.

Questions: For instance, for almost every site I develop there must be User Registration process and I don't want to reinvent the wheel and spend a week for Login/Profile forms.

1) Do you, Zend developers, use some kind of prototypes you've written to roll out a basic site quickly?

2) Or are there some site source codes to be built upon already available?

3) Is there some app generator or minor tool for pages with grids, records etc?

P.S. I stopped learning EJB over 6 years ago because I didn't have anyone to ask similar questions. TIA!

A: 

I'm in your exact situation right now (just less years with php :P)

Currently i'm using Zend FrameWork in action as reference and for what i've seen till now it's pretty easy to reuse your structure from old jobs. Once you've setted up your preferred options and tree structure you can reuse it over and over.

So I think that it's better not rely to third party generators and create your own skeleton. In this mode you will be much more comfortable with the code structure, and you'll have better code's grasp.

Alekc
indeed, looks like incremental evolution of one's own basic project is the case here as a basic prototyping method
PHP thinker
+1  A: 

Akra's DevNotes has a great tutorial that creates a sample application:

http://akrabat.com/zend-framework-tutorial/

This is where I started working with the ZF.

Brian Fisher
A: 

Using framework means, that you're not going to have to do all of that tedious repetitive stuff.

vartec
A: 

As I understand there are repetitious tasks that take a lot of time.

This is true, and as you stated, just about every website has a registration process and the like. While I agree that implementing such features over and over again can be repetitive, to some extent, each application will have its own unique set of requirements - meaning there will be at least a little customization work involved, even if you're reusing code from an older ZF-based project. I will now have a bash at answering your numbered questions

Do you, Zend developers, use some kind of prototypes you've written to roll out a basic site quickly?

Not really. I would not choose the ZF for a 'basic' site, nor would I use any MVC framework. My current assumption is that a basic site consists of about 8 to 12 separate parts, with no really special functionality, and finite requirements. Remember that once we say 'framework', there is almost always a noticeable performance hit, in addition to whatever bugs and issues which might be inherent within that framework. The 'prototypes' you speak of would be in the classes available within the Zend Framework, for example, Zend_Auth for creating a fully featured authentication system in about 15 minutes.

2) Or are there some site source codes to be built upon already available?

Probably, though I have to say, my worst nightmare would be having to support an application built on some kind of framework that wraps another framework. Image how much fun debugging it would be. Imagine how much fun teaching someone to support it would be. You're already using a framework, let's not get greedy now.

3) Is there some app generator or minor tool for pages with grids, records etc?

I'm not quite sure what you mean by this, but if I had to chance a guess, perhaps Zend Studio?

karim79
3- it is usually referred as Scaffolding, I think.
Itay Moav
Good point, I was thinking of a GUI based thing I suppose, like data-aware controls in Visual Studio
karim79
+15  A: 

1) Do ZF developers use some kind of prototypes to roll out a basic site quickly?

The Zend Framework is a little too young yet for components in this area, however there is an unofficial PEAR channel. As of March '09 the thought leaders still seem to be debating the best ways to organize everything. I personally am most excited about the domain-driven initiatives as they will be the most robust.

2) Are there some site source codes to be built upon already available?

The best sources right now are the blogs, sites, and repositories of ZF thought leaders. Here's some links to get you started:

3) Is there some app generator or minor tool for pages with grids, records etc?

There is a scaffolding-generator as a part of Zend_Tool slated for release in ZF v1.8. It's currently in the incubator, I tried it last week and it works, but there are not many components generated in its current state.

Last week I finally took the time to gather sources together (which includes the Stack Overflow ZF questions feed). I've put them under a Zend Framework tag in Google Reader and will be refining the feed sources over time. In case you'd rather manage them yourself, here is the current OPML.

Best of luck! -Matt

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
    <head>
        <title>expertseries | Zend Framework | Google Reader</title>
    </head>
    <body>
        <outline title="Zend Framework" text="Zend Framework">
            <outline text="A.J. Brown" title="A.J. Brown" type="rss"
                xmlUrl="http://feeds.feedburner.com/ajbrowns_blog" htmlUrl="http://ajbrown.org/blog"/&gt;
            <outline text="Armando Padilla" title="Armando Padilla"
                type="rss" xmlUrl="http://www.armando.ws/?feed=rss2" htmlUrl="http://www.armando.ws"/&gt;
            <outline text="Benjamin Eberlei" title="Benjamin Eberlei"
                type="rss"
                xmlUrl="http://www.whitewashing.de/about/rss/all" htmlUrl="http://www.whitewashing.de"/&gt;
            <outline text="Bradley Holt" title="Bradley Holt" type="rss"
                xmlUrl="http://bradley-holt.blogspot.com/feeds/posts/default" htmlUrl="http://bradley-holt.blogspot.com/"/&gt;
            <outline text="Cal Evans" title="Cal Evans" type="rss"
                xmlUrl="http://blog.calevans.com/feed/" htmlUrl="http://blog.calevans.com"/&gt;
            <outline text="Chris Hope" title="Chris Hope" type="rss"
                xmlUrl="http://feedproxy.google.com/ElectricToolboxBlog" htmlUrl="http://www.electrictoolbox.com"/&gt;
            <outline text="Codecaine.co.za" title="Codecaine.co.za"
                type="rss" xmlUrl="http://www.codecaine.co.za/rss/" htmlUrl="http://www.codecaine.co.za/"/&gt;
            <outline text="Douglas Brown" title="Douglas Brown"
                type="rss" xmlUrl="http://www.brownphp.com/feed/" htmlUrl="http://www.brownphp.com"/&gt;
            <outline text="Federico Cargnelutti"
                title="Federico Cargnelutti" type="rss"
                xmlUrl="http://blog.fedecarg.com/feed/" htmlUrl="http://blog.fedecarg.com"/&gt;
            <outline text="Jani Hartikainen" title="Jani Hartikainen"
                type="rss" xmlUrl="http://codeutopia.net/blog/feed/" htmlUrl="http://codeutopia.net/blog"/&gt;
            <outline text="Juozas Kaziukėnas" title="Juozas Kaziukėnas"
                type="rss" xmlUrl="http://dev.juokaz.com/feed/rdf" htmlUrl="http://dev.juokaz.com"/&gt;
            <outline text="Matthew Turland" title="Matthew Turland"
                type="rss" xmlUrl="http://ishouldbecoding.com/atom/1" htmlUrl="http://ishouldbecoding.com/"/&gt;
            <outline text="Matthew Weier O'Phinney"
                title="Matthew Weier O'Phinney" type="rss"
                xmlUrl="http://weierophinney.net/matthew/feeds/index.rss2" htmlUrl="http://weierophinney.net/matthew/"/&gt;
            <outline text="Michelangelo van Dam"
                title="Michelangelo van Dam" type="rss"
                xmlUrl="http://www.dragonbe.com/feeds/posts/default" htmlUrl="http://www.dragonbe.com/"/&gt;
            <outline text="Mike Rötgers" title="Mike Rötgers" type="rss"
                xmlUrl="http://www.roetgers.org/feed/" htmlUrl="http://www.roetgers.org"/&gt;
            <outline text="Nick Lo" title="Nick Lo" type="rss"
                xmlUrl="http://www.ingredients.com.au/nick/feed/" htmlUrl="http://www.ingredients.com.au/nick"/&gt;
            <outline text="Pádraic Brady" title="Pádraic Brady"
                type="rss"
                xmlUrl="http://blog.astrumfutura.com/feeds/index.rss2" htmlUrl="http://blog.astrumfutura.com/"/&gt;
            <outline text="Raphael Stolt" title="Raphael Stolt"
                type="rss"
                xmlUrl="http://raphaelstolt.blogspot.com/feeds/posts/default" htmlUrl="http://raphaelstolt.blogspot.com/"/&gt;
            <outline text="Rob Allen" title="Rob Allen" type="rss"
                xmlUrl="http://akrabat.com/feed/" htmlUrl="http://akrabat.com"/&gt;
            <outline text="Robert Basic" title="Robert Basic" type="rss"
                xmlUrl="http://feeds2.feedburner.com/robertbasic/blog/" htmlUrl="http://robertbasic.com/blog"/&gt;
            <outline text="Stack Overflow ZF" title="Stack Overflow ZF"
                type="rss"
                xmlUrl="http://stackoverflow.com/feeds/tag/zend-framework" htmlUrl="http://stackoverflow.com/questions/tagged/zend-framework"/&gt;
            <outline text="Thomas Weidner" title="Thomas Weidner"
                type="rss"
                xmlUrl="http://www.thomasweidner.com/flatpress/feed/rss2/" htmlUrl="http://www.thomasweidner.com/flatpress/"/&gt;
            <outline text="Tom Graham" title="Tom Graham" type="rss"
                xmlUrl="http://www.noginn.com/feed/" htmlUrl="http://www.noginn.com"/&gt;
            <outline text="Zend Dev Zone" title="Zend Dev Zone"
                type="rss"
                xmlUrl="http://feeds.feedburner.com/ZendDeveloperZone" htmlUrl="http://devzone.zend.com/"/&gt;
        </outline>
    </body>
</opml>
Matt Gardner
Thanks for all the resources. I have been coding ColdFusion for 5 years and got pushed into php and Zend at the same time, so these will help..
JasonBartholme
+1  A: 

If you're already acquainted with MVC and design patterns, then why not look into tools to helps you code faster?

Although I generally like free tools, I must say using Zend Studio IDE (based on Eclipse) helps going faster (30-day free trial).

The main points (apart from the debugger/profiler):

  • it can generate a skeleton for MVC applications
  • default code skeletons for basic bricks (controllers, views, models)

and -last but not least-

  • auto-completion for all Zend classes (and you can Ctrl+click through the classes names to open them). Very convenient I must say.

Just make sure to have a computer with a whole lot of memory!

Marc
A: 

There is a good german book, you can find a starter app in an archive on this site and study the code: http://www.zend-framework-buch.de/

A: 

We have a tool that can help: nWire for PHP analyzes your code, helps you navigate through it and visually represents components and associations. You will eventually need to read the code and with nWire this becomes much easier.

zvikico