Triller

Www Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Triller Web Development & Graphic Design | Monkey Tooth Productions Www Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Triller

Www Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Triller

This is a question I often see and get. “Which e sould I use, avaScript or php?” Well in theend it all boils down to what your doing and how your are expecting it to handle. The biggest key differences between JavaScript and PHP is one runs or renders rather while the page is loading. While the other can do stuff to a page while its loading or after it has loaded.

Both languages are very similar in construct or at least they are in my opinion, and you write code almost the same way. Obviously they have different built in functions, and names for the functions, and they differ here and there. Generally you can almost do anything with JavaScript that you can with PHP and vice versa.

Now comes again the question “Which should I use?”. Well I personally like PHP for a wide array of things and will generally use it over JavaScript when possible however with todays technology always trying to push the bar up and tempting to break the barriers of just how far you can push someones browsers abilities I do favor AJAX which is the use of PHP and JavaScript together. I say “when possible” because there are times where it definitely is not wise to use AJAX. But thats only due to security concerns. But worry not, most applications you will build with AJAX if you use it wisely and properly you wont have much to worry about. Which one day I am sure I will write an article or many about that.

If you want your elements to be flashy and less bandwidth consuming I would suggest using JavaScript where and when possible to handle your pages content and how its loaded, then handled there after. If bandwidth isn’t much of an issue for you which with most hosting providers it isn’t (unless your pushing several thousands of gigs of there bandwidth a month, then you should check the fine print in there contracts). Then handle everything via PHP its a bit more static, pages have to load but if used properly its as secure as it gets, and can run pretty fast as well.

If your interested in going the AJAX route which I highly recommend I would suggest using jQuery. As its the most stable and mature of frameworks out there and has a much larger community of developers to help get answers from if you ever get stuck.

Are you recently starting out with php, javascript, ajax, mysql, or really any web related scripting language? If you are might I suggest to you a site that helped even me learn the basics years upon years ago. pedia):

Prototype
Script.aculo.us (used with prototype)
Ext (now known as Sencha)
MooTools
Yahoo! UI Library
Dojo Toolkit

Quick Question I see with these framworks mostly due to people searching for ready made scripts is can you use more than one framework. Well ultimately it depends which you use. I know jQuery (even combined with UI) you can set it up to allow other frameworks as mentioned on the jQuery site in there article/post about the subject Using jQuery with Other Libraries however outside of that I cant really vouch for the other libraries and there support on the subject as I prefer jQuery and use that over the rest when ever possible (unless I am working on a clients site and they have something different from jQuery)

no comments   |  tags: , , , | posted in Coding


Jun 23 2010

PHP create a random string of Alpha/Numeric Characters

Have a need for a quick random string of any given length but want to limit it to a-z 0-9. Then this would be ideal for you, I really can’t think of any real world use for this. Well no thats wrong, you can use it as a random password generator. Or something to the effect of that.

<?php
function genRandomString($howbig) {}

return $string;
}
echo "<strong>5 char string:</strong> ". genRandomString('5') ."<br />";
echo "<strong>10 char string:</strong> ".genRandomString('10')."<br />";
echo "<strong>15 char string:
xWww Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Triller 
		Web Development & Graphic Design | Monkey Tooth Productions											 Www Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Trillerm b Triller Triller
zWww Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Triller 
		Web Development & Graphic Design | Monkey Tooth Productions											 Www Michaeltriller Acai Cheap En Template:1970s Album Stub Michael Trillerl d Michael