Frameworks, sometimes known as prototyping systems, are perhaps best described as “shortcuts” installed as an upper-level library over a base language. They allow you to achieve popular, complex operations in brief snippets of code that would otherwise take a great deal of work to specify in the original language.
There are many different frameworks, for many different languages. Some examples of web development frameworks include:
| JavaScript | CSS | PHP |
|---|---|---|
| jQuery | bluetrip | zend |
| Prototype | Tripoli | Yii |
| mooTools | 960.gs | CodeIgniter |
| YUI | Elements | CakePHP |
| dojo | Blueprint | |
| SASS | ||
| Compass | ||
| Turbine | ||
| LESS |
CMS’s could also be considered a form of framework.
There are several important points to note:
Frameworks are typically installed as a library, which can increase page size, although there are techniques to get around this issue.
Frameworks do not completely excuse you from learning the base language, as you are still using the original language in the framework… you’re just using less of it, meaning you don’t have to learn to the same depth.
Frameworks are not a “magic pill”: they are not a solution for every possible goal on a web page. Frameworks also tend to be overused: loading a 60k library in order to accomplish a single effect that could be written in 480 bytes in the base-level language is not unusual nor efficient, but it is a giant waste of resources.
Frameworks do not allow you to accomplish anything that is not possible in the original language: they just allow you to reach your goal quicker and easier, in most cases. A good example would be fading out an image over time.
In jQuery:
- $('#object').fadeOut('slow', function() { });
In JavaScript:
- varTimeToFade=1000.0;
- functionfade(eid)
- { varelement=document.getElementById(eid);
- if(element==null)
- return;
- if(element.FadeState==null)
- { if(element.style.opacity==null||element.style.opacity==''
- ||element.style.opacity=='1')
- { element.FadeState=2; }
- else
- { element.FadeState=-2;}}
- if(element.FadeState==1||element.FadeState==-1)
- { element.FadeState=element.FadeState==1?-1:1;
- element.FadeTimeLeft=TimeToFade-element.FadeTimeLeft;
- } else {
- element.FadeState=element.FadeState==2?-1:1;
- element.FadeTimeLeft=TimeToFade;
- setTimeout("animateFade("+newDate().getTime()+",'"+eid+"')",33);
- }}
- functionanimateFade(lastTick,eid)
- {varcurTick=newDate().getTime();
- varelapsedTicks=curTick-lastTick;
- varelement=document.getElementById(eid);
- if(element.FadeTimeLeft<=elapsedTicks)
- {
- element.style.opacity=element.FadeState==1?'1':'0';
- element.style.filter='alpha(opacity = '
- +(element.FadeState==1?'100':'0')+')';
- element.FadeState=element.FadeState==1?2:-2;
- return; }
- element.FadeTimeLeft-=elapsedTicks;
- varnewOpVal=element.FadeTimeLeft/TimeToFade;
- if(element.FadeState==1)
- newOpVal=1-newOpVal;
- element.style.opacity=newOpVal;
- element.style.filter='alpha(opacity = '+(newOpVal*100)+')';
- setTimeout("animateFade("+curTick+",'"+eid+"')",33); }
Haha, that is actually incredibly clever.
![Prometheus: Collector's Edition (Bilingual) [Blu-ray 3D + Blu-ray + DVD + Digital Copy] Prometheus: Collector's Edition (Bilingual) [Blu-ray 3D + Blu-ray + DVD + Digital Copy]](http://ecx.images-amazon.com/images/I/5192I1rtYnL._SL160_.jpg)

