Re: [fw-general] MySQL Views

2007-08-05 Thread Ian Warner

Bill

Thanks for the input, I have been reading more and more about MySQL 
views over the last few days and came up with more or less the same 
interpretation as you did below, all be it in a less eloquent manner.


One thing that views does allow me to do is to use the zend_db_table 
interface, which if nothing else gives me and my team a consistent 
modelling scheme to work towards.


Thanks again

Ian

Bill Karwin wrote:

There are different implementations of views in different RDBMS brands.
Sometimes they store results and sometimes they work by rewriting the
query for you and executing it against the base table(s).  MySQL has
only the latter type.  


The performance of views is therefore comparable to the performance of a
prepared query.

There is no extra disk space used by views, unless you mean the storage
needed for the metadata definition of the view itself.

I don't know of any reason why caching would be better with views vs.
tables.  In MySQL 5.0, the Query Cache does cache results of queries
against views, but this is virtually identical to the way the Query
Cache works against base tables.

Views are certainly better than using derived tables in subqueries.
Derived tables in MySQL _do_ create a temporary materialized copy of
data, which is potentially expensive.  Joining against a derived table
is also likely to expensive, because the temp table has no indexes.

Anyway, if the performance of your app is so critical that a tiny
difference in performance between querying a view vs. querying a base
table is significant, you probably shouldn't be touching the database at
all.  Instead, cache query results at the application level, using
Zend_Cache with a back-end using a persistent in-memory cache such as
Memcached or Zend Platform.  That way high-demand data is available at
the speed of a memory access.

Regards,
Bill Karwin


-Original Message-
From: Ian Warner [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 03, 2007 7:12 PM

To: [EMAIL PROTECTED]
Cc: Zend Framework
Subject: Re: [fw-general] MySQL Views

Ok kinda figured this out, as Views act as independant tables 
then simply creating another model class for them works:


Ie for Countries table I created countryselect view, to get 
all the country rows i needed and ordered correctly.


 $table  = new models_fblovefootball_Countryselect();
 $result = $table-fetchAll();
 var_dump($result);

CAn anyone gives me any heads up on performance of using 
views, and creating multiple views?


I believe it should be very fast as it caches the queries 
better, but may mean extra disk space thats all, will do some 
more reading but any pointers appreciated


Ian

Ian Warner wrote:

Hi

Does or will Zend_Db_Table have any methods to handle table related 
Views, or should I just implement these through DB_Select?


Also wanted to know best practices on this has anyone coded in any 
methods to simplify abstraction?


Cheers

Ian





Re: [fw-general] registering plugins per module/controller

2007-08-05 Thread Ian Warner


Hi

I use the config file, place this config array in config.ini.php or 
whatever you use, call it DEFAULT


[default]
plugins.Auth= true
plugins.Translation = true

Then for each project, controller or whatever delimiter you use, ie for 
admin you can dedide to remove a plugin, ie below the authn plugin is 
removed from the list


[admin : default]
plugins.Auth  = false

Then you can iterate through the plugins:

// Loop through the required plugins needed from the config.
foreach ($config-plugins as $k = $v) {

if (!empty($v)) {
$plugins[$k] = $v;
}
}

if (!empty($plugins)) {
return $plugins;
} else {
return false;
}

Hope that helps

I do the same for Modules also.

Ian

Hoopes wrote:

Hey,
I'm looking for a way to register plugins for the front controller based 
on what module (or controller) i'm being routed to. Basically, i'd like 
a subset of controllers throughout my app to all have certain data 
before they get started, without having to put the logic in preDispatch 
of every controller that needs it. getRequest() on the front controller 
doesn't get me anything.


I guess what i'm asking is, is there any way to determine what 
module/controller/action was called in the bootstrap index.php file? or 
another way to selectively register frontController plugins?


thanks
- hoopes



Re: [fw-general] Zend Framework Project Creator

2007-08-05 Thread Raphael Stolt
Hello,

I already thought about implementing something similar via a Phing built
file with targets for:
+ creating the application directory structure
+ generating skeletons for 'start' model and controller
+ getting or svn checkout of the latest Zend Framework version/release
+ setting .htacess
+ generating a basic bootstrap(include ZF, setup logger)
+ automated database integration

Is this a route to go?

Best regards,

Raphael Stolt

- Original Message -
From: Franziskus Domig [EMAIL PROTECTED]
To: fw-general@lists.zend.com
Sent: Saturday, August 04, 2007 11:51 PM
Subject: [fw-general] Zend Framework Project Creator


 Hello,

 maybe there is someone interested in:

 Because I was to lazy to create the whole structure and files for a new
 Zend Framework project every time again, I started thinking about a
 simple script to create the basic structure and files automatically.

 I have been busy the last days to create an automated installer for a
 new Zend Framework project, which offers currently just some basic
 features but I am working on more features by now.

 Currently it is possible to create the application-structure, includes
 the Zend Framework library, adds a configuration file in your
 config-path, creates a individual bootstrap file (index.php) with allows
 you to access a specific database and also creates the basic .htaccess
 RewriteRule.

 I am adding currently the feature to add automatic a set of controllers
 with specific actions. Also I am working on creating automatic models
 and creating the specific database-table to it.

 If you are interested in:
 [1]Zend Framework Project Creator Website

 Regards,
 Franziskus Domig

 [1] http://domig.org/ZendFrameworkProjectCreator/Latest



Re: [fw-general] Pingback / Trackback with ZF

2007-08-05 Thread Ralf Eggert
Hi Ralph,

 http://pastebin.com/f64e59367   (linked forever)

thanks, that looks great to get into it.

 And if you are interested in helping me with
 the larger project this came out of (ZFPublish module), let me know ;)

Unfortunately, I don't have too much freetime these days to get into
another project. My family would kill me. ;-)

Best Regards,

Ralf



Re: [fw-general] Zend Framework Project Creator

2007-08-05 Thread Franziskus Domig
Yes, you are right, I am workin on that.

Regards,
Franziskus

Am Sonntag, den 05.08.2007, 13:52 +1000 schrieb Dan Rossi:
 Needs to have the ability to run via cli, and uses a ini config for the 
 settings. Needs to be able to generate an xml config too for those who 
 preference xml configs. Having the ability to store log settings, 
 session settings, db settings would be nice. And I guess an interface to 
 edit the configs would be even nicer :)
 
 Bill Karwin wrote:
  One of my tasks for this summer is to create a very similar solution, to
  help generate skeleton code for a new ZF project.  This is targeted to
  be included in ZF 1.1.0, but I'm still in the planning stage right now
  as I clean up some outstanding issues in Zend_Db.
 
  I encourage anyone to do similar solutions.  It's likely that no such
  code generator will solve everyone's needs, so there is certainly space
  for alternative solutions.
 
  Regards,
  Bill Karwin
 

  -Original Message-
  From: Franziskus Domig [mailto:[EMAIL PROTECTED] 
  Sent: Saturday, August 04, 2007 2:52 PM
  To: fw-general@lists.zend.com
  Subject: [fw-general] Zend Framework Project Creator
 
  Hello,
 
  maybe there is someone interested in:
 
  Because I was to lazy to create the whole structure and files 
  for a new Zend Framework project every time again, I started 
  thinking about a simple script to create the basic structure 
  and files automatically.
 
  I have been busy the last days to create an automated 
  installer for a new Zend Framework project, which offers 
  currently just some basic features but I am working on more 
  features by now.
 
  Currently it is possible to create the application-structure, 
  includes the Zend Framework library, adds a configuration 
  file in your config-path, creates a individual bootstrap file 
  (index.php) with allows you to access a specific database and 
  also creates the basic .htaccess RewriteRule.
 
  I am adding currently the feature to add automatic a set of 
  controllers with specific actions. Also I am working on 
  creating automatic models and creating the specific 
  database-table to it.
 
  If you are interested in:
  [1]Zend Framework Project Creator Website
 
  Regards,
  Franziskus Domig
 
  [1] http://domig.org/ZendFrameworkProjectCreator/Latest
 
 
  
 




Re: [fw-general] registering plugins per module/controller

2007-08-05 Thread Hoopes

ian,
that's a cool idea, but i guess my question is, how do i tell what 
module/controller/action i'm working with when i'm in the bootstrap 
index.php file?
what does the colon in the config section header do? I couldn't find 
anything about it in the parse_ini_file php.net page.

thanks for the response
- hoopes

Ian Warner wrote:


Hi

I use the config file, place this config array in config.ini.php or 
whatever you use, call it DEFAULT


[default]
plugins.Auth= true
plugins.Translation = true

Then for each project, controller or whatever delimiter you use, ie 
for admin you can dedide to remove a plugin, ie below the authn plugin 
is removed from the list


[admin : default]
plugins.Auth  = false

Then you can iterate through the plugins:

// Loop through the required plugins needed from the config.
foreach ($config-plugins as $k = $v) {

if (!empty($v)) {
$plugins[$k] = $v;
}
}

if (!empty($plugins)) {
return $plugins;
} else {
return false;
}

Hope that helps

I do the same for Modules also.

Ian

Hoopes wrote:

Hey,
I'm looking for a way to register plugins for the front controller 
based on what module (or controller) i'm being routed to. Basically, 
i'd like a subset of controllers throughout my app to all have 
certain data before they get started, without having to put the logic 
in preDispatch of every controller that needs it. getRequest() on the 
front controller doesn't get me anything.


I guess what i'm asking is, is there any way to determine what 
module/controller/action was called in the bootstrap index.php file? 
or another way to selectively register frontController plugins?


thanks
- hoopes



Re: [fw-general] ZF Book

2007-08-05 Thread Rob Allen
Hi Shekar,


Nick Lo and myself are currently in the process of writing a Zend
Framework specific book to be published by Manning. With any luck the
early preview stuff should be appearing soon.

Kevin is also writing a book for Apress which looks interesting too.

Regards,

Rob...




Shekar C Reddy wrote:
 Hi All,
  
 This has reference to:
  
 http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony
 http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony---Sample-Chapter#comments-1820
 http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony---Sample-Chapter#comments-1820
  
 ZF has matured into 1.0 but no books or discussions about bringing one
 out yet other than some *tidbits *found on the internet (no offense
 intended; most of those tidbits are indeed great pieces of code!) and
 the /alphabetical /API reference guide. Joining pieces together and
 cross-referring to the reference guide is no easy task - most times it
 results in half-baked knowledge, not to mention - code with
 bottle-necks! What we need is a complete tutorial book that does a
 project and utilizes all the components in *concert *and shows how they
 *integrate *with each other. I interacted with Cal earlier on this
 matter (email chain pasted below) about collaborating with an
 experienced author - Cristain Darie.
  
 I understand writing books takes a considerable amount of time. Any
 takers with some time to spare on producing a book on ZF? Cristain would
 be glad to help/guide you with getting started...
  



Re: [fw-general] registering plugins per module/controller

2007-08-05 Thread Stefan Pettersson
2007/8/5, Hoopes [EMAIL PROTECTED]:

 that's a cool idea, but i guess my question is, how do i tell what
 module/controller/action i'm working with when i'm in the bootstrap
 index.php file?

You could always use the request object:

Zend_Controller_Front::getInstance()-getRequest()-getParams()

There is also getModuleName() and more.

Best regards,
Stefan


Re: [fw-general] ZF Book

2007-08-05 Thread Shekar C Reddy
Rob/Padraic/Richard/Kevin et al,

Recap: Writing books takes a considerable amount of time.

Yes, that's precisely what I was trying to implore on interested folks. The
ZF has several *stabilized *components as of v1.0 that would not be revamped
anytime soon - at least would not undergo a meta-morphosis. The framework
itself is not likely to undergo a drastic shake-up. I understand, there are
some important components such as Layout missing in 1.0. Stabilizing the API
was one of the chief goals of 1.0. Symfony planned their book along with the
launch of their 1.0. A framework without a tutorial-like book is like an
equipment without a user manual. Given the high-quality code, ZF deserves a
*knockout * book, indeed. If Symfony could do it, Zend could do it, too -
hopefully better; and maybe on similar lines of the Symfony book's
copyrights (electronic/online/printed/etc). Maybe not a great-paying project
for the authors but would definitely earn recognition in the trade circles
and would be great to have it on the resume - like a feather in the cap. I
wonder if just one writer can ever cover the entire framework in a book but
could be well worth collaborating with other writers. We can avoid producing
too many books by collaboration, communication and cooperation. Everyone has
their own level of expertise and exposure to the individual components of
the framework and more often, a *limited *set of components. Quite often,
great programmers are not necessarily great authors (and some don't have any
writing skills at all) and this is when they need hand-holding/collaboration
which also saves a lot of time and efforts. Now should be the ideal time to
start writing books on ZF so they get published before 1.5 - 2.0 - while
also incorporating/retro-fitting/covering the newer components by then.
Offering an online version should resolve the stale/dated content situation.
I heard from a Zend's employee last week some work in progress and looking
for interested authors. Its worthwhile getting more folks involved and let
everyone know what's cook'in in their backyards so there come fewer books
than ridiculously too many - as good as the ZF itself.

Sorry for the long message...

Regards,

Shekar



On 8/5/07, Rob Allen [EMAIL PROTECTED] wrote:

 Hi Shekar,


 Nick Lo and myself are currently in the process of writing a Zend
 Framework specific book to be published by Manning. With any luck the
 early preview stuff should be appearing soon.

 Kevin is also writing a book for Apress which looks interesting too.

 Regards,

 Rob...




 Shekar C Reddy wrote:
  Hi All,
 
  This has reference to:
 
  http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony
 
 http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony---Sample-Chapter#comments-1820
  
 http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony---Sample-Chapter#comments-1820
 
 
  ZF has matured into 1.0 but no books or discussions about bringing one
  out yet other than some *tidbits *found on the internet (no offense
  intended; most of those tidbits are indeed great pieces of code!) and
  the /alphabetical /API reference guide. Joining pieces together and
  cross-referring to the reference guide is no easy task - most times it
  results in half-baked knowledge, not to mention - code with
  bottle-necks! What we need is a complete tutorial book that does a
  project and utilizes all the components in *concert *and shows how they
  *integrate *with each other. I interacted with Cal earlier on this
  matter (email chain pasted below) about collaborating with an
  experienced author - Cristain Darie.
 
  I understand writing books takes a considerable amount of time. Any
  takers with some time to spare on producing a book on ZF? Cristain would
  be glad to help/guide you with getting started...
 




Re: [fw-general] ZF Book

2007-08-05 Thread Kevin McArthur
Approving Zend_Layout and actually debating/developing Zend_Form (ive tried to 
introduce several threads that get no where) are the two biggest things 
impeding book development right now.

Solve these, then lets talk about the rest.

Kevin
  - Original Message - 
  From: Shekar C Reddy 
  To: Rob Allen 
  Cc: Zend Framework General 
  Sent: Sunday, August 05, 2007 8:55 PM
  Subject: Re: [fw-general] ZF Book


  Rob/Padraic/Richard/Kevin et al,

  Recap: Writing books takes a considerable amount of time.

  Yes, that's precisely what I was trying to implore on interested folks. The 
ZF has several stabilized components as of v1.0 that would not be revamped 
anytime soon - at least would not undergo a meta-morphosis. The framework 
itself is not likely to undergo a drastic shake-up. I understand, there are 
some important components such as Layout missing in 1.0. Stabilizing the API 
was one of the chief goals of 1.0. Symfony planned their book along with the 
launch of their 1.0. A framework without a tutorial-like book is like an 
equipment without a user manual. Given the high-quality code, ZF deserves a 
knockout  book, indeed. If Symfony could do it, Zend could do it, too - 
hopefully better; and maybe on similar lines of the Symfony book's copyrights 
(electronic/online/printed/etc). Maybe not a great-paying project for the 
authors but would definitely earn recognition in the trade circles and would be 
great to have it on the resume - like a feather in the cap. I wonder if just 
one writer can ever cover the entire framework in a book but could be well 
worth collaborating with other writers. We can avoid producing too many books 
by collaboration, communication and cooperation. Everyone has their own level 
of expertise and exposure to the individual components of the framework and 
more often, a limited set of components. Quite often, great programmers are not 
necessarily great authors (and some don't have any writing skills at all) and 
this is when they need hand-holding/collaboration which also saves a lot of 
time and efforts. Now should be the ideal time to start writing books on ZF so 
they get published before 1.5 - 2.0 - while also 
incorporating/retro-fitting/covering the newer components by then. Offering an 
online version should resolve the stale/dated content situation. I heard from a 
Zend's employee last week some work in progress and looking for interested 
authors. Its worthwhile getting more folks involved and let everyone know 
what's cook'in in their backyards so there come fewer books than ridiculously 
too many - as good as the ZF itself. 

  Sorry for the long message...

  Regards,

  Shekar




  On 8/5/07, Rob Allen [EMAIL PROTECTED] wrote: 
Hi Shekar,


Nick Lo and myself are currently in the process of writing a Zend
Framework specific book to be published by Manning. With any luck the 
early preview stuff should be appearing soon.

Kevin is also writing a book for Apress which looks interesting too.

Regards,

Rob...




Shekar C Reddy wrote:
 Hi All,

 This has reference to:

 http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony
 
http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony---Sample-Chapter#comments-1820
  
http://devzone.zend.com/article/1795-The-Definitive-Guide-to-symfony---Sample-Chapter#comments-1820

 ZF has matured into 1.0 but no books or discussions about bringing one
 out yet other than some *tidbits *found on the internet (no offense 
 intended; most of those tidbits are indeed great pieces of code!) and
 the /alphabetical /API reference guide. Joining pieces together and
 cross-referring to the reference guide is no easy task - most times it 
 results in half-baked knowledge, not to mention - code with
 bottle-necks! What we need is a complete tutorial book that does a
 project and utilizes all the components in *concert *and shows how they 
 *integrate *with each other. I interacted with Cal earlier on this
 matter (email chain pasted below) about collaborating with an
 experienced author - Cristain Darie.

 I understand writing books takes a considerable amount of time. Any 
 takers with some time to spare on producing a book on ZF? Cristain would
 be glad to help/guide you with getting started...






Re: [fw-general] ZF Book

2007-08-05 Thread Simon Mundy
They're the two tasks that Matthew's looking into now. Give it a  
couple days and I'm sure it will be open slather on the mailing lists  
(and on the Wiki too, crashes notwithstanding! :) I'm in the same boat  
- I've got a wee bit to contribute code-wise as well.


I personally think the online docs are going to be more valuable in  
the long run and running parallel to the books' creation it couldn't  
hurt for a smaller sub-group to be reviewing quality/quantity of code  
and instructions for each component.


Approving Zend_Layout and actually debating/developing Zend_Form  
(ive tried to introduce several threads that get no where) are the  
two biggest things impeding book development right now.


Solve these, then lets talk about the rest.

Kevin



Simon Mundy | Director | PEPTOLAB


202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654  
4124

http://www.peptolab.com