w00t! Zend Framework 0.7.0 is ready! (UPDATE) 0.8.0

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

w00t! Zend Framework 0.7.0 is ready! (UPDATE) 0.8.0

Post by Luke »

http://framework.zend.com/ :mrgreen:

Dude this framework is so awesome! It's starting to look pretty mature. Looks like a lot of things have moved out of the incubator in this release.
Last edited by Luke on Thu Feb 22, 2007 10:43 am, edited 1 time in total.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Stuff 0.7, I want 0.8 - new rewrite of Zend_Filter and Zend_Validate addition due to reach core at that point :). Hell, they might even add a working isEmail() check...

Overall though, it's a solid release, and it does show a lot of maturity. I've been working off SVN HEAD since 0.2 and recent changes since 0.6 have improved things quite a bit. Anyone else here using the ZF? Or are you all full baked phpCake addicts? :)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I can't stand cakePHP... I tried really hard to like it, but it forces me to do things their way too much.

EDIT: Oh and by the way Maugrim, if you look at my controllers in the application I'm building, they'll look strangely similar to yours: :D

Code: Select all

public function accountAction()
    {
        /**
         * Check request type, and redisplay form if not POST
         */
        if($this->getRequest()->getMethod() !== 'POST' || !isset($this->_post))
        {
            $this->_forward('register', 'index');
            return;
        }

        /**
         * Get filtered input data or else exit current action
         */
        if (!$clean = $this->validateProcessInput('account'))
        {
            $this->_forward('register', 'index');
            return;
        }
        
        $user = new Table_User;
        $user->username = $clean->exportValue('account_username');
        $user->setPassword($clean->exportValue('account_password'));
        $user->business_email = $clean->exportValue('account_business_email');
        $user->group_id = Table_Group::MEMBER;
        $user->date_created = date(Table_Abstract::DATE_TIME, time());
        $user->active = Table_User::INACTIVE;
        $user->activation_key = $user->generateKey();
        $user->touch();
        
        /**
         * Register a new session object to get a unique namespace just for
         * this registering session. This will be removed once user is saved
         */
        $session = new Zend_Session('register');
        $session->user = $user->asArray();
        
        /**
         * Show next form
         */
        $this->_forward('register', 'personalform');
        return;
    }
Thanks man! :D :D
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

lol, work away. It's just cool to see forwarding used properly for once!
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Maugrim_The_Reaper wrote:lol, work away. It's just cool to see forwarding used properly for once!
I can't really say anything about that, here's an example of a controller written about 3 or 4 months ago before I downloaded astrum futura and before I really knew what I was doing: :oops:

Code: Select all

public function addAction(){
	
		if(!$this->user->isLoggedIn()){
			$this->localRedirect();
		}
		
		$Type = new Type;
		$available_types = $Type->toSelect();
		
		require 'forms/member/base.php';
		require 'forms/member/rules.php';
		
		if($Form->isSubmitted()){
			if($Form->getSubmitValue('lat') && $Form->getSubmitValue('lng')){
				$Point = new Point($Form->getSubmitValue('lat'), $Form->getSubmitValue('lng'));
				$this->view->assign('javascript', $this->view->mapMarkerDraggable($Point));
			}
			if($Form->validate()){
				$Member = new Member;
				$Member->loadFromArray($Form->getSubmitValues());
				$Point = new Point($Form->getSubmitValue('lat'), $Form->getSubmitValue('lng'));
				$Member->setPoint($Point);
				if($Member->nameExists()){
					$Form->setElementError('name', 'Name already exists.');
				}
				else{
					try{
						if($this->session->get('temporary_member')) $Member->set('temporary', 1);
						$Form->process(array($Member, 'save'));
						// This comes from when somebody adds an event and wants a temporary location... go to event/add to look at where this comes from
						if($this->session->get('temporary_member')){
							if($event_id = $this->session->get('event_id')){
								$Event = new Event;
								$Event->loadId($event_id);
								$Event->set('member_id', $Member->getRaw('id'));
								try{
									$Event->save();
									$this->session->unregister('event_id');
									$this->session->unregister('temporary_member');
								} catch (MC2_Mysql_Model_Exception $e) {
									Zend_Log::log( $e );
									$this->noRouteAction();
									exit(0);
								}
							} else {
								Zend_Log::log( 'Could not retrieve event id for temporary location.' );
								$this->noRouteAction();
								exit(0);
							}
						}
						$this->localRedirect('member', 'view', '?id=' . $Member->getRaw('id'));
					} catch (MC2_Mysql_Model_Exception $e) {
						Zend_Log::log( $e );
						$this->noRouteAction();
						exit(0);
					}
				}
			}
		}
		
		// Must validate again to check for errors generated just above this...
		$Form->validate();
		
		$this->view->headerContent($this->view->render('javascript/google_maps.php'));
		$this->view->assign('form', $Form->toArray());
		$this->view->assign('content', $this->view->render('member/add.tpl.php'));
	
	}
UGLY can you believe this does essentially the same things as the first one I posted?? 8O
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Maugrim_The_Reaper wrote:lol, work away. It's just cool to see forwarding used properly for once!
I haven't seen it any other way, except for the example:

Code: Select all

public function noRouteAction()
{
    $this->_redirect('/');
}
is it like that, that you mean the "wrong" way? (either the use of explicit URI and/or just wrapping)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

0.8 baby... w00t!
Zend Developer Zone wrote:This preview release contains many improvements across virtually the entire set of components in Zend Framework. It's hard to categorize this release as focused on one component or another, because so much great new functionality has been added.
Components moved from incubator to core:

* Zend_Auth
* Zend_Console_Getopt
* Zend_Filter
* Zend_Mail_Read
* Zend_Rest_Client
* Zend_Rest_Server
* Zend_Validate

Improved features and design:

* MVC modular application support
* Zend_Date
* Zend_Db
* Zend_Db_Select
* Zend_Locale
* Zend_Session

Great performance improvement:

* Zend_Search_Lucene

New components:

* Zend_Environment for reporting PHP runtime environment (incubator)
* Zend_Log fully object-oriented redesign (incubator)
* Zend_Service_Akismet client for spam-filtering web service


A total of 132 issues (bugs, improvements, feature enhancements or new features) have been resolved in our issue tracker in this release -- that's the most activity recorded for any release of Zend Framework to date!

The next milestone is Zend Framework Beta 0.9.0, on approximately March 15. This will be our first Beta release. The objective of the Beta is to be feature complete with respect to the components we will include in Zend Framework 1.0. Any component that is still in the incubator in ZF 0.9.0 will probably not be released in ZF 1.0, but such components may appear in future releases after 1.0.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Akismet is plain cool - it's so cool I don't bother moderating my blog comments anymore. Zend_Validate however is getting some stick - it's not as shorthanded as Zend_Filter_Input, and there's been a lot of discussion surrounding making it easier to use with statics. Otherwise another thunder rollin' release :).

And yar maties, Devnetwork is making a few contributions to them swashbucklers! ;)
http://framework.zend.com/wiki/pages/vi ... geId=20369
http://blog.astrumfutura.com/archives/2 ... posal.html
User avatar
xinnex
Forum Commoner
Posts: 33
Joined: Sun Jan 07, 2007 7:38 pm
Location: Copenhagen, Denmark

Post by xinnex »

I'm looking forward to the magic 1.0..

Hopefully it will help standardize php-development. (Which I believe is needed if powerfull modules/components is to be reusable)

Maybe we'll see projects like Django (http://www.djangoproject.com) on top of ZF?
:roll:
Post Reply