TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   what is a framework?? (http://www.talkphp.com/absolute-beginners/4712-what-framework.html)

dodgeqwe 07-10-2009 10:25 AM

what is a framework??
 
please explain me what is a frame work in simple words.

captainmerton 07-10-2009 11:29 AM

Broadly speaking its a model for doing something if you find yourself developing websites that always do the same things like manage user access, display data, facilitate upload of photos, manage access to a back end database eventually you are going to start designing these websites in a similar way to make it quicker to do and easier to change going forward. What you are creating is a framework. I think at a more detailed level a php framework might be a way to create and manage objects, classes, database interaction. Thats just some thoughts from a fellow beginner.

adamdecaf 07-10-2009 03:51 PM

I swear there was a thread like this, but I can't find it.

anyway...

A framework (one word) is a collection of code designed to made coding easier. Frameworks can simplify multi-step processes. They can also make sense of mundane or difficult tasks. The downside is you may have to "learn" a new "language" to use them.

For example jQuery has a very different syntax then regular JavaScript.

javascript Code:
$(document).ready(function() {
     $("a").onclick(function() {
         $(this).css({ color: "red", background: "black"});
     });
});

The same can be done with regular JavaScript.
javascript Code:
function color() {
    var n = document.getElementsById("a");
    var size = n.length - 1, x;
   
    for (x = 0; x < size; x++) {
        n[x].style.color = "#990000";
        n[x].style.backGroundColor = "#000000";
    }

return;
}

    n.addEventListener("click", "color", false);

It's just your preference, companies will often use a framework because it can be more reliable and easier to use.


All times are GMT. The time now is 05:36 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0