[PHP] Re: Design Patterns
Thank you Martin. I'm new to php and stuff like this and the great folks on this newsgroup really help the newbies like myself learn the language. That's why I like this list and regularly snoop through the threads here. This list is the most helpful resource on php that I've been able to find out here in the digital wilderness... along with the help files at php.net mark Martin Scotta martinsco...@gmail.com wrote in message news:6445d94e0908121323x721254c4ja389978d67bc0...@mail.gmail.com... Hi all! I've written a little Design Patterns Catalog in PHP. The patterns where taken from GoF: *Design Patterns: Elements of Reusable Object-Oriented Software* (ISBN 0-201-63361-2http://en.wikipedia.org/wiki/Special:BookSources/0201633612) This catalog includes (for each pattern): 1. general description 2. class responsibilities 3. UML 4. structural source 5. documentation 6. implementation example Also I've upload the documentation into my site for online purposes. http://martinscotta.com.ar/DesignPatterns/ I don't know if I can send files attached through this list... so, if you want a copy just reply to this message. Any bug, comment, or anything you like to say is welcome! -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: RFC/Survey for Our Newer Folks (Including Lurkers)
Howdy Daniel and Group, I'm new here, in fact, my first post was just a few days ago. I'm a computer hobbiest hoping to transition myself into the IT world at some point in the near future, having spent most of my life working in building construction. (Guess, I'm just getting too old and tired to cut the mustard there.. ;-) I've just started trying to learn web development with php, but I've done alot of reading and poking around in a few other languages, but nothing in a big way. I came upon this newsgroup after looking around on the main php documentation site and finding a notice there about it. My coming here was brought about by me posting on a couple of forums and waiting for days for an answer of any kind, if I were to get an answer at all. I am glad to have found this place since the members seem to be quite knowledgable and most of all, willing to share that knowledge. I'll try not to be a nuisance with frivolous questions and go to the docs and search engines first. Thanks you all for being here and for being so willing to help. Mark Daniel P. Brown daniel.br...@parasane.net wrote in message news:ab5568160907111706h5e4fe72ck8fe6155220464...@mail.gmail.com... Ladies and Gentlemen: First of all, if you're new to the list, welcome. At the risk of bragging about our collective talents, you are now a member of a community that is home to what may be some of the best talent in web development you'll find on the Internet. I'm not speaking of myself, but of your peers on this list. I could mention names, but that's beyond the scope of this particular request. What I would like to know is how you found out about this list. For example, did you go out of your way to find a support channel for PHP? Did you come to the source website, find out about the mailing list, and decide to subscribe? Did you submit a note to the php.net website requesting assistance and have your note rejected, and follow the instructions in the email that myself or another PHP Group member sent? Were you referred here by a friend, website, or publication? I would like to hear from all of you, and if you don't want your email address or words to be publicly archived, you're more than welcome to reply to me personally. I'd like to speak particularly with folks who joined this list because of submitting a note to the site and having it rejected, but I want all opinions. So if you've been here for less than 90 days or so, how did you wind up here, and did you have any problems in joining or complaints about the subscription process? If you've never posted and wanted a chance to introduce yourself, here's your chance. Breaking the ice and getting that first email out of the way may be all that's between you and immortality as the next great contributor to the project. Just remember the little people when you reach fame and fortune. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: SESSION variables: How much is too much?
Hi, OK, I did a count on the session.inc file and there appears to be 37 variables accessed through the $_SESSION object. By and large they all appear to be scalar variables that contain a counter or a path or a boolean. Nothing that looks like a big object. Mostly stuff like MaxDisplayRecords, DefaultDisplayRecords, Theme, DefaultTheme, CustomerId, RealName, CustomerBranch, Module, UserStockLocation, PageSize, AccessLevel, AttemptsCounter, Language, PageSecurityToken, DatabaseName...etc. Initially, when you hit the index page the session.inc file is included. From there, depending on what choices you make from the options displayed it assembles a page by calling the a php file that calls the database if needed, includes a header.inc file and a footer.inc file and builds the appropriate html for the body and of course, includes the session.inc file. My question is, assuming 37 variables of this type in the session.inc file, at what level of concurrent user access do you consider changing the way you do business here. Bare in mind that I don't comprehend a whole lot about server and database clustering and big enterprise big iron stuff like that. I'm just a guy trying to learn how to write decent php code that I don't have to be embarassed of when I shift gears in a new direction to add a marketable skill in my career development path. Thanks, Mark Paul M Foster pa...@quillandmouse.com wrote in message news:20090709010528.gx14...@quillandmouse.com... On Wed, Jul 08, 2009 at 06:55:24PM -0500, Shawn McKenzie wrote: D.M.Jackson wrote: Thanks guys. I was just wondering if it was common practice to pass all those variables in the SESSION object or if I was following a bad example because it was the first time that I had seen so many variables passed this way. If this is the typical way of handling this in php then I don't have a problem with it, I just wanted to make sure that I wasn't getting off to a bad start and picking up bad habits while learning php. Thanks, Mark Again, it depends upon whether you need those variables in the next page for example. Think of a wizard, where you fill some values in a form, click next, fill more values, click next, etc and then click finish. You may want to pass the values from each page to the next via the session and ultimately have them all available in the last page. There are others ways to do this, such as adding them as hidden inputs in the next pages, but I personally would use sessions. One other example might be user info, id, username, firstname, lastname, current access role etc. You may use these on every page, so once you retrieve them from the db, you can store them in the session. Any other info like email, age, register date whatever, you can retrieve only when needed. Just to provide a counterpoint to this, I would discourage using $_SESSION for more than absolutely necessary. If I have a situation such as Shawn mentions above, I pass values via hidden fields in the form. Most of the forms I create are backed by a database, so mostly I capture data from there. In addition, you can serialize data you wish to save and store it in a database or hidden field, and then unserialize it upon painting the next page. If I'm not mistaken, there's a limit to the data which can be stored in a session variable. I don't want to mistakenly hit that limit and wonder what happened. And besides, I just think $_SESSION should be reserved for *special* cases. And, as mentioned before, it's worthwhile asking yourself if you *really* need to remember a bunch of information from page to page. The need to do so may well be a result of lazy programming habits. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SESSION variables: How much is too much?
Hi, I'm trying to learn php mostly by reading the docs and pulling through other peoples projects for reference examples. One particular application I'm looking at has a ton of variables being handled through the SESSION global variable, probably about 25 or so variables. That just seems like alot. Since I'm pretty new to php I was wondering if this was typical and acceptable or if there was another best practice for maintaining large amounts of information throughout a session, like maybe persisting a temporary object in the database and passing a connection...or something. Or is just passing around a pile of variables directly in the SESSION object better? Thanks, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SESSION variables: How much is too much?
Thanks guys. I was just wondering if it was common practice to pass all those variables in the SESSION object or if I was following a bad example because it was the first time that I had seen so many variables passed this way. If this is the typical way of handling this in php then I don't have a problem with it, I just wanted to make sure that I wasn't getting off to a bad start and picking up bad habits while learning php. Thanks, Mark D.M.Jackson cnoe...@catt.com wrote in message news:90.23.10517.08e14...@pb1.pair.com... Hi, I'm trying to learn php mostly by reading the docs and pulling through other peoples projects for reference examples. One particular application I'm looking at has a ton of variables being handled through the SESSION global variable, probably about 25 or so variables. That just seems like alot. Since I'm pretty new to php I was wondering if this was typical and acceptable or if there was another best practice for maintaining large amounts of information throughout a session, like maybe persisting a temporary object in the database and passing a connection...or something. Or is just passing around a pile of variables directly in the SESSION object better? Thanks, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php