Re: [fw-general] Zend Framework Project Creator
making it abstract too would make it easier to extend and override some things. Dan Rossi wrote: 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] Zend Framework Project Creator
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] Zend Framework Project Creator
Franziskus, That's great! your project do a great work, will it create the dir structure form config? Be course I have a different dir structure to yours. I've write a simple php script for creating modules, controller and action. I realy want to promote it into gtk-php version. That would be funny and interesting. Will you? Regards Xing 2007/8/5, Franziskus Domig <[EMAIL PROTECTED]>: > > 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 > > -- 广州市一方信息咨询有限公司 地址:广州市 江南大道中 穗花村 三巷12号204 邮编:510245 电话:020-39738561 020-39738571 传真:020-84476279 网站:www.i-fang.com [EMAIL PROTECTED]
RE: [fw-general] Zend Framework Project Creator
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] MySQL Views
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 > > >
[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
[fw-general] registering plugins per module/controller
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] Pingback / Trackback with ZF
Ralf Eggert wrote: Hi, I wonder if anyone has implemented a pingback / trackback functionality yet. What would be the best approach, which components should be used? Any hints, tutorials or links? Thanks and Best Regards, Ralf I can offer code.. ;) http://pastebin.com/f64e59367 (linked forever) There's alot going on there, but it should give you the right ideas. If you want to chat email me. And if you are interested in helping me with the larger project this came out of (ZFPublish module), let me know ;) -ralph
Re: [fw-general] Pingback / Trackback with ZF
Hi Matthew, > Pingback/trackback typically uses XML-RPC to make the calls, so you'd > use either Zend_XmlRpc_Client or _Server, depending on whether you're > making the calls or receiving them. I have used the XmlRpc server from > within a controller several times, and it works nicely. Thanks for your answer. That points me into the right direction. Hopefully I get some time to look into this next week. Thanks and Best Regards, Ralf
Re: [fw-general] Pingback / Trackback with ZF
-- Ralf Eggert <[EMAIL PROTECTED]> wrote (on Saturday, 04 August 2007, 11:13 AM +0200): > I wonder if anyone has implemented a pingback / trackback functionality > yet. What would be the best approach, which components should be used? > Any hints, tutorials or links? I haven't, but I've had conversations with some who have. Pingback/trackback typically uses XML-RPC to make the calls, so you'd use either Zend_XmlRpc_Client or _Server, depending on whether you're making the calls or receiving them. I have used the XmlRpc server from within a controller several times, and it works nicely. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] What is the best approach for using Zend_Translate?
If you should use complete sentence translations or splitted translations depends on your useage, page load and view. If you have something like this for example: WARNING: Input false and WARNING: Date false it is better to split the translation like this: $warning = $t->_("Input false"); if (is_datefalse()) { $warning = $t->_("Date false"); } echo sprintf("".$t->_("WARNING:")."".$t->_($warning)); But it doesn't make sense to split all what is possible. The code must be readable... even after several months you should know what it does... So the following is no good approach: $value = $t->_("input"); if (is_datefalse()) { $value = $t->_("date"); $what = $t->_("wrong"); } else { $what = $t->_("ok"); } echo sprintf("".$t->_("WARNING:")."".$t->_("Your %1/$s is %2/$s"),$value, $what); Anyhow... IF you have computed values like a date or any other content you MUST use splitting. echo sprintf($t->_("Today is %1/$s"),$date->toString("d")); But this is written within the manual... Just read through all chapters you will get a hint on how it works. Just to mention: Zend_Translate DOES NOT CREATE YOUR SOURCE FILES. Anyone who uses Zend_Translate has to do this his own. Zend_Translate just simplifies the useage. But there is no "best approach" on how to create or use translations sources. This depends always on your equipment, the site load, the content and so on... If you are not common in how to create a source file it's a good advice to look into other forums for how to do this. Greetings Thomas I18N Team Leader - Original Message - From: "ashish.sharma" <[EMAIL PROTECTED]> To: Sent: Saturday, August 04, 2007 9:08 AM Subject: Re: [fw-general] What is the best approach for using Zend_Translate? I am sorry for the last 2 points (3 & 4) that was due to my mistake .. Point 3 (Problem in Encoding format) : This was due to my header file which i was using. The file was having charset iso-8859-1 in the meta tag. I have replaced that with UTF-8 and now it is working fine :) Point 4 (paragraph translation) : I think that was due to some line feed characters, I have removed the "ENTER" from the paragraph and now it is working fine :) But in addition to my 1st two point (1 & 2) I am having one small doubt regarding the translation i.e. What is the best approach of creating a translation file? Should I create complete line wise converstion (even if it is using some common words)? E.g. If I am having a string say .. "Welcome to my site TEST.com ... a testing site." Now here the phrase "TEST.com ... a testing site" is a common text which will always be used. So in this case should I convert the whole line or just break the line to translate the common (re-usable) text? Or should i translate each word? Please suggest .. ashish.sharma wrote: Thanks for your reply .. I have some more issues in Zend_Translate .. 1. How could I find that this is the best time to split the translation file into 2 or 3 files? I mean, how could i find the size of translations? What is the max. size for 1 translation file? 2. In your suggestion "Initiate Zend_Translate in the bootstrap with the general (and small) translation source." what did you mean by "general (and small) translation source"? Is that I should I have all the common translation code (used in all the VIEWS) into one gerneral file and some view specific code into another files? If YES, then where should I initiate the rest of the (other then general) translation files? 3. One more MAJOR issue which i am facing is I have convereted .mo file in FRENCH in utf-8 encoding but when i open my site for french, that is changing my browser's character encoding setting to "Western (ISO-8859-1)" which is not displaying me the correct conversion. If I manually change my browser's encoding setting to UTF-8 then it displays the correct translation for french but on page refrech it again reset to Western (ISO-8859-1). Could anyone please suggest something for this? 4. I have a small paragraph (of 2-3 lines) in english which needs to be converted to french. I have added the translation too and successfully converetd the .mo file but it is not converting the paragraph text. It is converting the ONE LINER text but NOT a complete paragraph. What should i do for this? Is there is anything else which i have to do for paragraph conversion? I know my problems are quite strainge but this is what I am facing :( Could anyone help in this ... Ashish Sharma Thomas Weidner-2 wrote: Hy Ashish, One of the approaches you can use if you have large sources is: Initiate Zend_Translate in the bootstrap with the general (and small) translation source. Use Zend_Registry to persist the Object. Within your view extend the existing object with addTranslation and the used translation source. Simply said: Best is to split the source files into several ones related to what you need in which view. But don't split it into one file
[fw-general] Pingback / Trackback with ZF
Hi, I wonder if anyone has implemented a pingback / trackback functionality yet. What would be the best approach, which components should be used? Any hints, tutorials or links? Thanks and Best Regards, Ralf
Re: [fw-general] What is the best approach for using Zend_Translate?
I am sorry for the last 2 points (3 & 4) that was due to my mistake .. Point 3 (Problem in Encoding format) : This was due to my header file which i was using. The file was having charset iso-8859-1 in the meta tag. I have replaced that with UTF-8 and now it is working fine :) Point 4 (paragraph translation) : I think that was due to some line feed characters, I have removed the "ENTER" from the paragraph and now it is working fine :) But in addition to my 1st two point (1 & 2) I am having one small doubt regarding the translation i.e. What is the best approach of creating a translation file? Should I create complete line wise converstion (even if it is using some common words)? E.g. If I am having a string say .. "Welcome to my site TEST.com ... a testing site." Now here the phrase "TEST.com ... a testing site" is a common text which will always be used. So in this case should I convert the whole line or just break the line to translate the common (re-usable) text? Or should i translate each word? Please suggest .. ashish.sharma wrote: > > Thanks for your reply .. > > I have some more issues in Zend_Translate .. > > 1. How could I find that this is the best time to split the translation > file into 2 or 3 files? I mean, how could i find the size of translations? > What is the max. size for 1 translation file? > > 2. In your suggestion "Initiate Zend_Translate in the bootstrap with the > general (and small) > translation source." what did you mean by "general (and small) translation > source"? Is that I should I have all the common translation code (used in > all the VIEWS) into one gerneral file and some view specific code into > another files? If YES, then where should I initiate the rest of the (other > then general) translation files? > > 3. One more MAJOR issue which i am facing is I have convereted .mo file in > FRENCH in utf-8 encoding but when i open my site for french, that is > changing my browser's character encoding setting to > "Western (ISO-8859-1)" which is not displaying me the correct conversion. > If I manually change my browser's encoding setting to UTF-8 then it > displays the correct translation for french but on page refrech it again > reset to Western (ISO-8859-1). Could anyone please suggest something for > this? > > 4. I have a small paragraph (of 2-3 lines) in english which needs to be > converted to french. I have added the translation too and successfully > converetd the .mo file but it is not converting the paragraph text. It is > converting the ONE LINER text but NOT a complete paragraph. What should i > do for this? Is there is anything else which i have to do for paragraph > conversion? > > I know my problems are quite strainge but this is what I am facing :( > > Could anyone help in this ... > > Ashish Sharma > > > > > Thomas Weidner-2 wrote: >> >> Hy Ashish, >> >> One of the approaches you can use if you have large sources is: >> >> Initiate Zend_Translate in the bootstrap with the general (and small) >> translation source. >> Use Zend_Registry to persist the Object. >> Within your view extend the existing object with addTranslation and the >> used >> translation source. >> >> Simply said: >> Best is to split the source files into several ones related to what you >> need >> in which view. >> But don't split it into one file per view. This would increase your >> loading >> time. >> How much translations/views you should to integrate into your source file >> depends on the size of your translations. >> >> Long translations -> smaller files and visa versa... >> >> Greetings >> Thomas >> I18N Team Leader >> >> >> - Original Message - >> From: "ashish.sharma" >> To: >> Sent: Monday, July 30, 2007 11:49 AM >> Subject: [fw-general] What is the best approach for using Zend_Translate? >> >> >>> >>> Hi ALL, >>> >>> I am new to zend and still in learning process. Currently I am working >>> on >>> Zend_Translate and would like to know the best approach to use the >>> Zend_Translate. >>> >>> >>> I am able to create .mo files and getting the translated content. Now, I >>> would like to know the best way of getting the translated text so that i >>> can >>> use the same easily into my views. >>> >>> >>> >>> Earlier I have created the Translate object into the controller and then >>> assign the translated value to a view variable to get it displayed. >>> >>> Code : >>> >>> $this->view->lang = $this_request->getParam('lang'); >>> >>> Zend_Loader::loadClass('Zend_Translate'); >>> $translationFilePath = '../languages/' . $this->view->lang . >>> '/LC_MESSAGES/source-' . $this->view->lang . '.mo'; >>> $translate = new Zend_Translate('gettext', $translationFilePath); >>> >>> $this->view->welcomeText = $translate->_('Welcome User'); >>> >>> But if I use the above code then I have to use the same code in each >>> controller for almost each view and this is what I don't want. >>> >>> Then I have created a View helper having a function "transla