Re: [fw-general] linked in?
Sorry about the double post ... i've been going thru some re-subscribing to another e-mail account, and i thought this post was lost in the allmighty bit-bucket.. please ignore it :-) -- Chris On Sun, 2006-10-01 at 14:06 +0200, Chris Chabot wrote: Would it be an idea to setup an Zend 'linked in': http://www.linkedin.com/ account and join everyone who's interested up on this? The company i work for is often interested in finding people with the right skillset for various projects, and were always open to buisness opportunities too, and linked-in seems a good tool for this job. Just floating an idea (shamelessly inspired by ajaxian.com's same style setup), see: http://ajaxian.com/archives/introducing-the-ajaxiancom-linkedin-community-program -- Chris Chabot
Re: [fw-general] Component documentation APIs
Hello Simon, Thank you for your nice words! I'm not sure if it's possible to add a tab to the wiki space. I'll have to check with Gavin or Darby for this. Gavin, Darby? I have a few more notes/questions: - Leave the sidebar on the left of the page or put it on the right side of the page? - Is it possible to hide the navigation bar when printing/exporting to pdf? - Some of our component names are so long that they don't fit in the sidebar, what should we do with that? (less padding would be one) - I couldn't keep the links from the docbook alive, as the page structure is a lot different (more content on one page, less clicking, more scrolling) do you guys mind? - The {toc} macro seems to have problems with heading with the same name (wrong anchor links) For those of you that don't know yet, the wiki import test can be found here: http://framework.zend.com/wiki/display/ZFDOCDEV/Home If you have comments, please send them to the mailing list instead of posting them in the wiki space (pages get deleted now and then) Best regards, Andries Seutens Belgium http://andries.systray.be Simon Mundy schreef: Hi Andries Just wanted to say nice work on the new wiki-style docs - it's a lot more accessible with the collapsible folders. I have a request, but wasn't sure of how much work it would be to have tabs associated with the documentation. The default tab is what you have now, the middle could be the docbook APIs and the final one could be developer notes. That way it'd be easier to cross reference the documentation for beginners and the ones with poor memory recall (i.e. me :) ) If it's a big ask then I don't expect you to put any time into it (you've already put a lot in for the wiki conversion itself) but just wanted to put the question out there to see if it's possible. Cheers -- 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
Re: [fw-general] [RewriteRouter] subdomain matching et cetera
Hi,Is there an update on subdomain matching, as yet?Thanks,On 7/18/06, Martel Valgoerad [EMAIL PROTECTED] wrote:Mislav Marohnić wrote: I needed subdomain matching for my application routes so I thought I need to hack into RewriteRouter or Route classes, but it turned out it can be easily achieved with simple subclassing! Here is how I did it.Well done, Mislav. Thanks. list($subdomain,) = explode('.', $_SERVER['HTTP_HOST']); Check which one will be faster:$pos = strpos($_SERVER['HTTP_HOST'], '.');$subdomain = substr($_SERVER['HTTP_HOST'], 0, $pos); Also I didn't want default routes RewriteRouter creates on initialization so I subclassed it too: Well, I guess there should be some way to disable this for power users likeyou. As well as with rewriteBase detection. I'll think about it. Are we going to see these features (subdomain, domain, HTTP method, etc. matching) in RewriteRouter? This could serve as an inspiration ;)I'm a bit afraid of possible use of :subdomain variable and errors it cangenerate as they may be very hard to debug. But it is definitely worth thinking over. Mislav--Michael Minicki aka Martel Valgoerad | [EMAIL PROTECTED] | http://aie.pl/martel.asc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Make sure you have finished speaking before your audience has finishedlistening. -- Dorothy Sarnoff
[fw-general] Zend_Filter_Input
I use Zend_Filter_Input to process my $_POST data. If I want to find out if a certain button was clicked, what is the best way to check?if ($post-getRaw('btnSave') !== false) { ... }Is this the correct way to check for button clicks? -- Craig Slusher[EMAIL PROTECTED]
[fw-general] Zend_Db_Table
I use the Zend_Db_Table with a test table, it works fine.. but when i use table of my old app that fields are in upper case it's don't work, but i rewrite my fields to lower case it works.I had to rewrite all my fields to lower case or have a fix (or work around) to this? -- Fui para os bosques viver de livre vontade. Para sugar todo o tutano da vida, para aniquilar tudo o que não era vida e para, quando morrer, não descobrir que não vivi.
Re: [fw-general] Best place to authenticate a user?
Michael Sheakoski wrote: Of course this is only one way to do it. I could do the checking in index.php, or in a FrontController plugin too, etc... My main thing is to try and minimize the amount of code repeated. In my current method I would have to duplicate the same code in the preRun() method of every ActionController. My application has only a very few ( 5, I think ) actions that someone who is not logged in can access so I did it as a FrontController plugin. In the preDispatch method I have a list of the 5 places anonymous people can go. 1) Is this action object ( controller/action pair ) trying to get to one of the 5? If so, return it and on they go. 2) Ok, didn't return there so lets check if they are logged in. 3) If so, return the action object so they can go on their way. 4) If not, return new Zend_Controller_Dispatcher_Token to send them to the must be logged in error page and beyond for login. Michael
Re: [fw-general] Zend_Filter_Input
Craig Slusher wrote: I use Zend_Filter_Input to process my $_POST data. If I want to find out if a certain button was clicked, what is the best way to check? if ($post-getRaw('btnSave') !== false) { ... } Is this the correct way to check for button clicks? I think you're asking how to tell if a key exists. If so, there is a method called keyExists() that will perform this check for you. On a related note, I wish this method were named something like isKey() to better conform to the existing naming convention. I've been hesitant to enter this as a bug, but perhaps others agree. (I think the strict naming convention is one of the benefits of using ZF for this stuff.) Chris
Re: [fw-general] Community chat
Hi, Am Dienstag, den 26.09.2006, 08:53 -0500 schrieb Richard Thomas: [...] 1. Jabber based so any client that can do jabber can connect, it also has its own client as well. Did I mentioned that there is really a gap to fill in PHP: there is no sensible Jabber-class out there. What do you think about Zend_Xmpp oder Zend_Jabber? Greets, Lars Strojny signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: [fw-general] Zend_Filter_Input
If there are inconsistencies in ZF APIs, whether order of parameters for similar functions, or naming inconsistencies between similar functions, I consider these issues as bugs. the same as violations of the ZF Coding Standard. If a JIRA issue lists the snippets of ZF classes and code that are inconsistent, then the issue will probably be resolved sooner. Cheers, Gavin Chris Shiflett wrote: Craig Slusher wrote: I use Zend_Filter_Input to process my $_POST data. If I want to find out if a certain button was clicked, what is the best way to check? if ($post-getRaw('btnSave') !== false) { ... } Is this the correct way to check for button clicks? I think you're asking how to tell if a key exists. If so, there is a method called keyExists() that will perform this check for you. On a related note, I wish this method were named something like isKey() to better conform to the existing naming convention. I've been hesitant to enter this as a bug, but perhaps others agree. (I think the strict naming convention is one of the benefits of using ZF for this stuff.) Chris
Re: [fw-general] Zend_Filter_Input
Oh, of course. I completely missed that function. I think all functions should begin with a verb, but isSet seems more natural than isKey in this situation, since the array is a product of how PHP handles POST data, not inherent in the HTML itself. For example, if you were coming off of only knowing PHP with register_globals, you wouldn't think of variables as being keys in an array. The function name would describe the implementation, not the data itself. If I can continue to be pedantic for a moment, noTags and noPath aren't good function names either. They should be removeTags and removePath or something similar. -Matt - Original Message - From: Chris Shiflett [EMAIL PROTECTED] To: Craig Slusher [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Monday, October 02, 2006 9:21 AM Subject: Re: [fw-general] Zend_Filter_Input I think you're asking how to tell if a key exists. If so, there is a method called keyExists() that will perform this check for you. On a related note, I wish this method were named something like isKey() to better conform to the existing naming convention. I've been hesitant to enter this as a bug, but perhaps others agree. (I think the strict naming convention is one of the benefits of using ZF for this stuff.)
Re: [fw-general] Community chat
For SMS / message transmission to individual Jabber users, I can imagine a potential fit. In fact, some web-based contact forms, account registration, and other transactional-email messages sometimes could be sent via IM. How about Zend_Im_Jabber? Cheers, Gavin Lars Strojny wrote: Hi, Am Dienstag, den 26.09.2006, 08:53 -0500 schrieb Richard Thomas: [...] 1. Jabber based so any client that can do jabber can connect, it also has its own client as well. Did I mentioned that there is really a gap to fill in PHP: there is no sensible Jabber-class out there. What do you think about Zend_Xmpp oder Zend_Jabber? Greets, Lars Strojny
Re: [fw-general] Community chat
In doing research for the chatroom I checked out a couple jabber libraries and I agree php wise there really is no good library out there that works nicely on php5 Gavin Vess wrote: For SMS / message transmission to individual Jabber users, I can imagine a potential fit. In fact, some web-based contact forms, account registration, and other transactional-email messages sometimes could be sent via IM. How about Zend_Im_Jabber? Cheers, Gavin Lars Strojny wrote: Hi, Am Dienstag, den 26.09.2006, 08:53 -0500 schrieb Richard Thomas: [...] 1. Jabber based so any client that can do jabber can connect, it also has its own client as well. Did I mentioned that there is really a gap to fill in PHP: there is no sensible Jabber-class out there. What do you think about Zend_Xmpp oder Zend_Jabber? Greets, Lars Strojny
[fw-general] ZF Coding Standard: Factories - code completion, direct instantiation
Still looking ... for a solution to the ZF factory puzzle. Previously, we all discussed the use of factory patterns in the ZF, and some of the complications that arise. Ideally, we should be able to directly instantiate adapter/plugin instances or use a factory method with IDEs helping complete code and catch our spelling errors for both of these use cases. http://www.nabble.com/forum/ViewPost.jtp?post=5824988framed=yskin=16154 In conclusion, no one has yet proposed a solution that fits the ideal above. I've summarized various syntactical ways of working with factories in PHP: http://framework.zend.com/wiki/display/ZFDEV/Factories Cheers, Gavin Andi Gutmans wrote: We are looking for a generic solution that would apply to all the classes. I think it's better to be consistent across the framework e.g Zend_Db, Zend_Services_Google, Zend_Config (when possible), instead of reinventing the wheel each time. As to how to support code completion, the only way is to have people instantiate concrete classes, e.g.: $config = new Zend_Config_Ini(config.ini...) $db = new Zend_Db_MySQL(...) $service = new Zend_Service_Google_Search(...) There is a big advantage of this method as code completion in IDEs would significantly assist developers both in code-completing the long names but most important, code completing methods, properties and constants. I see a lot of value in that... This doesn't mean that we couldn't have a factory if/when needed. For Google Services and Ini a factory probably would not be needed to often in real life. For Db when many apps might allow the user to configure the data source via GUI, it would make sense to make a factory available to the user. My recommendation would be to expose concrete classes, e.g. go with KISS and tooling friendly, but have a factory when that makes sense such as for DB. As to the factory, I'm not a big fan of strings because tools can assist that case, e.g. new Zend_Db(PDO_MYSQL,..). The problem though is that class constants tend to be a bit too ugly in this case although they are much friendlier. Another option would be to use global constants, e.g. ZEND_DB_PDO_MYSQL to achieve $db = new Zend_Db(ZEND_DB_PDO_MYSQL, ...) Andi -Original Message- From: Matthew Ratzloff [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 10:25 AM To: Zend Framework General Subject: Re: [fw-general] Decision: loadData('xml:/something/bar.xml'); vs. new Foo('/something/bar.xml'); More use cases and variants to consider: const GOOGLE_TRANSLATE = TRANSLATE; const GOOGLE_SEARCH = SEARCH; $someService = new Zend_Service(GOOGLE_TRANSLATE, ''en','fr'); # code completion works or $someService = new Zend_Service('Google_Translate', ''en','fr'); or $someService = new Zend_Service_Google('Translate', ''en','fr'); or $someService = new Zend_Service_Google(TRANSLATE, ''en','fr'); # code completion works or $someService = new Zend_Service_Google_Translate('en','fr'); # code completion works By process of elimination: You've got to consider that not all service classes will be included in the core (some will be user created, etc.), so Zend_Service as a factory class is out. So that means the first two options aren't viable. Zend_Service_Google_Translate is simply too long for a class name. Actually, I'd prefer it to look something like this: $google = new Zend_Service_Google($license); $french = $google-translate($english, en, fr); $results = $google-search($string); foreach($results as $result) { ... } Have Zend_Service_Google handle the interface between itself and Zend_Service_Google_Translate (caching objects as necessary). -Matt
Re: [fw-general] Decision: loadData('xml:/something/bar.xml'); vs. new Foo('/something/bar.xml');
The ZF team wants to push for a conclusion with factories: http://framework.zend.com/wiki/display/ZFDEV/Factories Personally, I completely agree with you Chris, and even suggested removing Zend_Db. For me, whatever effort is required to map input choice selections onto selected plugin strings (first parameter of the factory method) is not better than the effort to require_once the adapter and then instantiate it. Cheers, Gavin Christopher Thompson wrote: I continue to wonder at the usage of statics. The use case where a factory might be needed was give as configure the data source via GUI. But what is the real difference between: $dbconfig = Zend_Db_Adapter_Pdo_Mysql $db = new $dbconfig(...) and $dbconfig = Zend_Db::PDO_MYSQL; $db = new Zend_Db($dbconfig, ...) From my point of view, all the factory provides is more code to support and more overhead to create an object. I never liked this about PEAR::DB either. Matthew Ratzloff wrote: By class constants being a bit ugly, you mean like this? $db = new Zend_Db(Zend_Db::PDO_MYSQL, ...) Would this allow people to use their own adapters without having to extend Zend_Db purely to add another constant? The only way I can see that it wouldn't is if it simply contained the string Zend_Db_Adapter_Pdo_Mysql. It might not be particularly important for Zend_Db since most people will be fine with the bundled adapters, but since we're going for a consistant approach across all classes we need to consider how something like this would work in all cases. -Matt
Re: [fw-general] Decision: loadData('xml:/something/bar.xml'); vs. new Foo('/something/bar.xml');
Hi Gavin Another vote for that as well. I've grown to really appreciate the simplicity of Zend_Config's approach and wonder whether Zend_Db could use the adapter approach also:- $db = new Zend_Db(new Zend_Db_Pdo_Mysql($config)); Cheerio The ZF team wants to push for a conclusion with factories: http://framework.zend.com/wiki/display/ZFDEV/Factories Personally, I completely agree with you Chris, and even suggested removing Zend_Db. For me, whatever effort is required to map input choice selections onto selected plugin strings (first parameter of the factory method) is not better than the effort to require_once the adapter and then instantiate it. Cheers, Gavin -- 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