|
|
|
|
Thread title: Your Favourite Framework? |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
09-20-2008, 09:43 PM
|
#21
|
Status: Junior Member
Join date: Sep 2008
Location: California
Expertise:
Software:
Posts: 26
|
My new thing is avoiding prototype on new projects if at all possible - it changes the behavior of the native objects like Array.
|
|
09-23-2008, 01:14 PM
|
#22
|
Status: Member
Join date: Apr 2006
Location:
Expertise:
Software:
Posts: 249
|
jQuery is my favorite and I won't use anything else unless requested by a clients for one of their sites.
|
|
09-24-2008, 11:20 AM
|
#23
|
Status: Member
Join date: Mar 2007
Location: kirkcaldy, Fife
Expertise:
Software:
Posts: 229
|
Moooootools
|
|
09-27-2008, 06:07 AM
|
#24
|
Status: Member
Join date: Oct 2006
Location: Australia
Expertise:
Software:
Posts: 297
|
Lightweight? Put down the pipe and step away from the keyboard. For example, I've seen so many jQuery tabs on WP sites (those ones where you click the tab up the top and the content below changes) which require 50kb of Jquery JS - I found a not-even 1kb script off google that does the same thing. So 5000% smaller and does the same thing... hmm, I'd like to see this "its so lightweight" thing justified with an example. To me frameworks mean "I'd rather choose to be lazy and save myself time than do a proper job which loads as fast as possible". You can argue all day about how its quicker, easier or whatever - but you CAN'T argue that its "lightweight" in comparison to coding your own.
|
|
10-04-2008, 09:29 PM
|
#25
|
Status: Junior Member
Join date: Jul 2008
Location: Abilene TX
Expertise: Design, PHP, JS, HTML5, CSS3
Software:
Posts: 37
|
Originally Posted by rochow
...You can argue all day about how its quicker, easier or whatever - but you CAN'T argue that its "lightweight" in comparison to coding your own.
|
Oh for sure. Especially if you just need a couple effects here and there.
However, there is a trade-off between a few kb per page-load and the cost of the time it takes to write that code yourself. If you just need a couple functions, sure, just go grab or write scripts to do those specific things. But if you have a larger project that's going to use a good portion of a framework's functionality, I think it's worth it. The time saved writing AJAX calls alone can be substantial, and if you add animation into the mix, things really begin to add up.
|
|
10-05-2008, 05:52 PM
|
#26
|
Status: Member
Join date: Jun 2008
Location: Buenos Aires, Argentina
Expertise: programming, wizardy
Software:
Posts: 165
|
|
|
10-24-2008, 07:08 PM
|
#27
|
Status: Junior Member
Join date: Jul 2008
Location: NC
Expertise:
Software:
Posts: 70
|
Definitely jQuery. It's use of CSS selectors makes it really intuitive to use, plus it's fast and small.
|
|
10-25-2008, 12:45 AM
|
#28
|
Status: I'm new around here
Join date: Oct 2008
Location:
Expertise:
Software:
Posts: 2
|
My Fave Javascript :
Create a welcome cookie
<html>
<head>
<script type="text/javascript">
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1 ;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end)) ;
}
}
return ""
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}
function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
{
alert('Welcome again '+username+'!');
}
else
{
username=prompt('Please enter your name:',"");
if (username!=null && username!="")
{
setCookie('username',username,365);
}
}
}
</script>
</head>
<body onLoad="checkCookie()">
</body>
</html>
A clock created with a timing event
<html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+" :"+s;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>
<body onload="startTime()">
<div id="txt"></div>
</body>
</html>
Style strings
<html>
<body>
<script type="text/javascript">
var txt="Hello World!";
document.write("<p>Big: " + txt.big() + "</p>");
document.write("<p>Small: " + txt.small() + "</p>");
document.write("<p>Bold: " + txt.bold() + "</p>");
document.write("<p>Italic: " + txt.italics() + "</p>");
document.write("<p>Blink: " + txt.blink() + " (does not work in IE)</p>");
document.write("<p>Fixed: " + txt.fixed() + "</p>");
document.write("<p>Strike: " + txt.strike() + "</p>");
document.write("<p>Fontcolor: " + txt.fontcolor("Red") + "</p>");
document.write("<p>Fontsize: " + txt.fontsize(16) + "</p>");
document.write("<p>Lowercase: " + txt.toLowerCase() + "</p>");
document.write("<p>Uppercase: " + txt.toUpperCase() + "</p>");
document.write("<p>Subscript: " + txt.sub() + "</p>");
document.write("<p>Superscript: " + txt.sup() + "</p>");
document.write("<p>Link: " + txt.link("http://www.w3schools.com") + "</p>");
</script>
</body>
</html>
_____
air purifiers palm beach cosmetic dentistry
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|