Re: [PHP] Re: Separate PHP Code From HTML || Pros Cons
On 10/7/06, sit1way [EMAIL PROTECTED] wrote: Hey all. This presents problems in that any updates I make to the CMS only affect the site I'm working on. So, while working on one site I may make changes to the CMS, changes that improve the app., but other older sites do not get updated -- it's OK now, but things are getting sloppy ;--) I would dearly love to have a base CMS repository that all sites would draw on, extending the base CMS in the event that a particular client has need of customization. Some combo of Linux and Apache would do the trick; e.g. PHP requests for any of my sites would point to say, /home/cms/includes/ Are you using a version control system? Using one and, maybe, reviewing your architeture for code re-use might help in this matter, I think Now, the other issue I'd like to address is separating PHP code logic from site HTML. (...) I've often heard the mantra, separate code from HTML, but it seems ridiculous at times to include tiny HTML snippets that can easily be echoed out, or stored in a variable. Smarty goes to the extreme in separating code from HTML, but looking at their templating system, I wonder what's the point? Is it the end of the world if you've got a few choice if, then, else statements in your HTML templates? Is of my understading that this mantra is about intention in the code. We have a framework written in PHP that also uses PHP as template language. I mean, we have source files that define components, where we use PHP to process the data normally (declaring classes, using DB, etc), but there are also snippet files were we have HTML + PHP. The special case here is that the snippet files have a couple of arrays with data (created and offered by the components) available and their only occupation is to process output: no DB access, no class declaration, no file inclusion, no socket connectionall they have to do is render HTML (or whatever) with the data they received. The most complex things we have in snippet files are small functions where recursions help displaying some widgets. Everything else are loops, decision strucutres and lots of print/echo. Simple source files, in the end. Thiago Silva
Re: [PHP] PHP Debugger Recommendations
On Sunday 23 July 2006 00:07, you wrote: These are all ones I've looked at, except for PHPEclipse. Is it not the case that with PHPEclipse one needs to install the Eclipse framework and then PHPEclipse as a plug in? Yes. You have to install eclipse platform, and then, PHPEclipse plugin. Just out of curiosity, what specific problems have you encountered by using a multilanguage debugger? Problems is perhaps too harsh a word. Sorry, I couldn't think of any other english word ;) All I meant was that with options for dealing with multiple languages, that adds a lot of unneeded interface and feature options. I'm sure it's great if you actually debug more than one language, and it can save you from switching applications. But if you're dealing with strictly one language, then it's a little bloated. I see. I'll have a look at it latter. Never really used it. It's a little hard to describe, but lets say you want to debug a script that has a submit form in it. Instead of hitting submit and having Komodo pull in and use the $_POST variables, you have to start from the page that receives the $_POST data, and then manually type in all the input you expect a user to give you. There's a page that describes what I mean in their online documentation, but I can't find it at the moment. That's odd. I'll look into it when I try it out. Thiago Silva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Debugger Recommendations
On Saturday 22 July 2006 13:43, Dave M G wrote: Looking on the net, I can find many PHP *editors*, but they do not have debugging features. I need something with call stacks, break points, etc... I'm not familiar with Windows options (only PHPEdit comes to my mind), but as far as I can tell, Zend, NuSphere, Komodo and PHPEclipse are main options when it comes to feature rich IDEs, and I guess all of them are multi plataform. For GNU/Linux, there are some folks using Quanta+gubed (a pure php debugger) I belive. Me, myself, I use Protoeditor, wich is strictly editor+debugger. For fully qualified debuggers, I've found Komodo, which is okay, but it's made a little cumbersome by the fact that it can debug multiple languages. Just out of curiosity, what specific problems have you encountered by using a multilanguage debugger? The deal breaker is that when it comes to debugging forms, one has to manually simulate inputs. What do you mean by simulate? There is also NuSphere, and other Windows options, but I need something that will also work on Linux. NuSphere doesn't seem to have released for Linux yet, as I can't find anywhere to download it, despite having searched their site. All I can say about NushPhere is that I've used it in GNU/Linux for a while, but that was 3 years ago. Beyond that, I haven't found many, unless I'm mistook some editors for not being debuggers (Quanta, Bluefish...) What about Protoeditor or PHPEclipse? Thiago -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Protoeditor 1.0 (PHP editor)
Hello, I've just released version 1.0 of Protoeditor. Protoeditor is a small KDE text editor (so, for GNU/Linux desktops) developed for debugging scripts interactively. Currently you can use it to edit and debug PHP scripts interactively, with step into/over/out, breakpoints, inspecting variables, function call stack, etc. It supports the debuggers DBG, Xdebug and Gubed. More information can be found at: http://protoeditor.sourceforge.net or sending an email to me: thiago.silva AT kdemail.net Thanks, Thiago Silva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Code generators
Danny wrote: Hi there, There´s a lot of manufacturers, about PHP code generators. What do you think about that? I mean, it seems like PHP Nuke fashion or other portal systems. Everybody has its portal, but all web pages seems to be the same, because all are under the same design. I would like to gather opinions about it. Example: http://www.yessoftware.com/index2.php Thank you P.S. Please sorry my poor english, I´m trying to improve my skills -- dpc Funny. This is getting more and more popular, in many different levels. I've seen RAD pop up here and there on PHP(I'm planning/developing one since 2003). Now, i'm not sure, but maybe this is getting a lot of atention, these days, because ruby on rails way of doing things Or simply, people are tired of doing the same old things the same old way. (Ok, we are tired for a long time, but seems that only now, tools like that are having attention). I think that what ever can do the boring work for you the exacly same way (maybe, better) that you would, is welcome. I'm having a look right now in that app (from yessoftware). Seems interesting. Too bad is commercial/for-windows product :( Thiago -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include/include_once php_check_syntax() / E_PARSE errors
Hello all, Recently I had some problems with include/include_once. This is the scenario: My application uses only classes loaded through a centered __autoload() function (no require/include anywere in the scripts, but in __autoload() itself). Now, diverse libraries use diverse extensions. For instance, Smarty class is declared in Smarty.class.php. And many of my classes uses a simple .php extension. So, __autload has to *try* include_once's. Something like that: function __autoload($className) { include_once(${className}.php); if(class_exists($className, false)) return; include_once(${className}.class.php); if(class_exists($className, false)) return; die(class not found: $className); } Then, loading Smarty would generate a warning message because the first include_once tries to load Smarty.php (wich doesn't exists). Since those warning messages are common, naturaly I use @include_once statements. But, as soon as I'm writing scripts, and one of the classes included generates an E_PARSE error, I get a blank result in my browser, because @ supress the messages. Having explained the problem, I would like to know: 1: Is there an elegant way to resolve this? 2: What happened to php_check_syntax? 3: What was the final word about include() behavior regarding E_PARSE error? Reading and searching the bug database, I read some posts that seemed to indicate that include() should *not* halt on E_PARSE errors, but then, php5 does halt the execution. 4: Halting the execution on E_PARSE error generated through an include() is a coherent/expected behavior? (it doesn't seem to me). 5: Why? (depending on the answer to that question, I'll head to bugs.php.net). Thanks, Thiago -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Framework in PHP?
Hello. I'm also trying out frameworks. I'm not sure which would be best, since I didn't tried most of then, just read the specifications and functionalities. And, since I'm not very happy, I'm developing my own right now. But I know the existence of those frameworks/specifications/methodologies: http://phrame.sourceforge.net/ http://www.fusebox.org/ http://combine.tigris.org/ http://www.binarycloud.com/ http://amb.sourceforge.net/ http://www.mojavi.org/ http://www.phpmvc.net/ I guess the fusebox is widelly used, and binaryclouds seems to be very promising. I'd never heard about the seagulll. Thanks for including it in your email. I'wll check it out. If you find something interesting, could you send it to the list? I would like to hear some opnions. Thiago Silva Rodolfo Gonzalez Gonzalez wrote: Hello, which free (as in beer) framework writen in PHP (OO) would you consider the best for developing large web applications?. I was looking at Seagull (http://seagull.phpkitchen.com/)... I would appreciate your comments on this and other frameworks. Thank you, Rodolfo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Linux tools for PHP
Hello All. For all of you working with PHP on a GNU/Linux machine: What development tools (editors, debuggers, modeling tools, SGBDs) do you or your team use? Thanks, Thiago Silva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux tools for PHP
Interesting, this management tool. And debuggers? Do you use any? Jason Davidson wrote: Hey, tools i like using are. nedit - main editor i use vi - for quick or network edits apache - webserver ive tried some of the ide's and other editors like kate, quantra and such, and i constantly fall back to Nedit, for its simplicity. My only feature request for nedit, would be tabbed documents. At one office, we wrote a online Extreme Programmnig management tool for tracking User Stories, Milestones and things like that, was handy. Jason Thiago Silva [EMAIL PROTECTED] wrote: Hello All. For all of you working with PHP on a GNU/Linux machine: What development tools (editors, debuggers, modeling tools, SGBDs) do you or your team use? Thanks, Thiago Silva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux tools for PHP
What about Quanta? Anyone use it? And debuggers? APD? XDebug? DBG? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session performance
Hello all, I was wondering... Why session data are stored on files rather than in on memory? People have been telling that acessing session data can be slow, and I need some kind of (fast) caching mechanism to store application data. After some search I found some php code that handles the session with a mysql database. But still, I don't know how fast (or slow) this can be. In general, I will need to cache data (some objects...sometimes kindda big) on, basically, every request and the fact that session data are stored in files scares me a bit. And one more thing...php5 has the same php4 session mechanism?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session performance
Hello all, I was wondering... Why session data are stored on files rather than in on memory? People have been telling that acessing session data can be slow, and I need some kind of (fast) caching mechanism to store application data. After some search I found some php code that handles the session with a mysql database. But still, I don't know how fast (or slow) this can be. In general, I will need to cache data (some objects...sometimes kindda big) on, basically, every request and the fact that session data are stored in files scares me a bit. And one more thing...php5 has the same php4 session mechanism?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php