Jump to content

son0fhobs

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Everything posted by son0fhobs

  1. Another great article explaining frameworks: onextrapixel.com/2010/05/24/an-overview-of-php-framework-guides-for-developers/
  2. This won't be the most thorough answer because I have to run in a minute, but... Think of it as a bundle of pre-made functions and classes. That's kind of what they are actually. So rather than writing your own functions from scratch, you can work with those functions. If you never reference them, you really don't need them. Treat it as an external php file. Upload to the server and do and include(), require(), include_once() or require_once(). I forget which is best for libraries, but you can look that up easily enough. Libraries can be folders in a framework, or separate entities on their own. I'm using prototype, and scriptaculous at the moment which are to javascript libraries. If you want a more thorough and complete answer, I'm sure you can find it with a few google searches. But that's the gist of it. I haven't used enough frameworks to really give a good answer, but have you googled for it? It took a bit, but since I couldn't give a good answer, I thought I'd look it up. Here's a good article: noupe.com/php/discussing-php-frameworks.html Cheers!
  3. Search for javascript form validation and php sanitize forms. Easiest way is to just search for a sample script or plugin and edit for your needs.
  4. Did you really ask here before posing the question to the all knowing Google? Here's my quick search: http://tubepress.org/ - Their wordpress plugin is good, so I'm sure their straight php one is as well. http://www.webresourcesdepot.com/php-mysql-image-and-video-gallery-zenphoto/ Etc. You'd be better off searching for "php video [plugin] reviews"
  5. I remember hitting something along those lines a while back, but it wasn't the same context and I figured out an alternative. I'm not much of an expert, but as an alternative, what if you used a wordpress function to get the category, such as get_categories(). All the other category functions are here. Or a meta value function. As for the source of the problem, I really don't know enough. Sorry I can't be of more help. Best of luck!
  6. It would make your life a heck of a lot easier. The user interface, means a lot less coding, and you can always use Dreamweaver to edit the theme (template) or plugins you're using. You can grab a theme and a few plugins and have a great site up and running in a few minutes, then just edit until you've perfected it how you want it. But then again, I'm just a huge WP fan, so I'm sure others have their own opinions. Either way, it's worth checking out due to its prevalence.
  7. Cool, that gives me a pretty good answer, thank you! I was doing a css/html website for someone, and aside from simplicity, functionality, and practicality of php, I was considering if/what the speed difference was. Thanks again! Cheers!
  8. Greetings! I'm pretty sure I'm just showing off my ignorance here, but... This sounds ridiculous for a million reasons, but first my point is speed, then I'll mention the logistics: Long story short, what if rather than uploading the php, grab the HTML that it outputs, and upload that instead (or deliver that from the server to users instead)? In other words, the page would be predominantly if not completely HTML instead of Php. How much of this does server side caching do? Not sure how much client side does, but client side still has to load everything the first time. Do search engine spiders read cached websites? My point is, would there be any situation in which "building" the webpage with pure html as apposed to Php would help speed, whether minimal SEO, first user visit, or other? Obvious objections: There's a million little things that could create problems for usability, but if I were to create a function where Php reads a file, or most of it, (the outputted html from the original php webpage), writes a new one of predominantly HTML, and uploads/overwrites, or changes the appropriate permalink, with a lot of necessary details and customizations, I think it's a feasible feat. However, I feel like there's another service or feature that essentially does just that, is there? Aside from maintainability, usability, etc, would it help/hurt speed? Thanks for your help! Cheers!
  9. Oh awesome, I'll check it out. Specifically, I'm using wordpress, which can be incredibly slow at times. Hence my pursuit for speed. Aren't opcodes applied to the server? I'm not hosting my site, so that's why I never pursued it, but I may well be mistaken. Of course once I get all this online I'll get caching and other techniques to speed up the site, I just wanted to make sure I was coding effectively/efficiently from the beginning. But I guess that's where benchmarks come in. And I'll post it online later for some critique. Once again thank you so much! Cheers!
  10. Holy crap dude, that was the most amazing and thorough reply ever, thank you! So, so, so incredibly helpful! You're right, understanding parsing/interpretation makes all the sense in the world and explains a lot. I've been thinking about it, thanks for the motivation to get on xDebug. Once again, thank you so much for your thorough, understandable, and effective reply. (not to mention prompt!) Man, I love the "geek" programmer's community, open source, and such. Appreciate the help Cheers! David
  11. Greetings all! New to this forum, but want to say I've learned a lot already! My experiencing in php and programming in general is minimal, so I do appreciate you humoring me. I guess the question comes down to, how is Php parsed? Primarily the context for this question is optimized speed. I heard that it goes through all comments included, hence being verbose in your final copy may not be ideal (for speed, not practicality and maintenance). Do I program with more or less functions, separate files, more or less loops, etc. Now for my specifics: 1. The specific situation is that I'm building a plugin for Wordpress, but php in general. I want to make it flexible, but I don't want to bloat the code in the process. Lets say the user will choose the style, and it be set permanently. If put in the same CSS file, all the extra will always be read, so what if I made two different stylesheets. If I made an if/else include, would the php ignore the include of the file not chosen, hence not slowing things down? Or is the only way for the code not to be read by literally having the user change the filename of the css? (css is just the convenient example, but large php functions have a similar situation). a. Do all unused functions get read anyway? (my experience is yes). All loops get fully processed even if not used as well, right? b. I'm using someone else's code, and two functions are almost identical. I'm guessing it's bad to nest functions (is it? For speed or usability/maintainability?). Should I create an extra variable that helps tell the function which extra bit of code to process? This is more of a general concept, I just don't know how to search for it, and haven't found it. Not having that core foundation, I'm guessing a lot of it would have been answered along the way. So if you can point me to resources as well, that would be amazing! Once again, thank you all! The more I get involved, the more I aboslutely love the programming/open source community! My how things have changed from 10 years ago! Love it!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.