Jump to content

General framework question.


naike

Recommended Posts

Hey, this is my 3rd topic, only withing a few minutes but since I didn't find a forum that would cover my 2 questions I have in one section, I went ahead and posted them separate to get a fast answer and keep it clean.

 

So, I'm a bit uncertain what a framework does.

I watched some CakePhp setup videos to find out what it actually does, but I couldn't find any video that would actually show the framework itself.

After reading a couple of definitions for a php framework (CakePhp in particular) I still don't understand what the use is.

 

Someone said it's a tool for programmers to make programming easier.

How, that still remains unclear to me.

 

Anyway, my question is, what does a framework do in practice, what are the up/down -sides  of using these, and more importantly, should I consider using frameworks as a beginner, could I play around with them?

 

I hope I will get an answer and that I don't appear too spammy :P

Link to comment
Share on other sites

Your question is right. Many beginners (including me in the past) don't understand what is the advantage of a framework until he has to made his own framework and finds out that there is other framework which is much better than the created.

Just think that you have a Content Management System to make. Now you create a program/system which handles the data within MVC pattern. You have to make the controller, model and view to work. Also you want that this system does extra like loging, handling sessions, do something with arrays and so. Now instead of making these functions on your own, you can just take a super duper framework which provides you the necessary functions and instead of experimenting with your own code, you have a ready made system which is acknowledged by a big community and you can be sure that the solution applied within the framework is appreciated by other, more advanced programmers. Sooner or later, you will end at an framework.

If you want to make something good for your programmer life and want to stick with PHP, I would advice you to look into Zend framework because everyone is so crazy about it or if you want a soft start, check Code Igniter and read, no really read the help about it. It's one of the best and quickest helps that I've ever seen.

I hope that I've succeed to bring you closer to frameworks. If not, a short explanation for frameworks would be that they provide ready made functions which you can use.

Ah, disadvantages of the framework are bugs which can be a big threat for each web site that is running on that framework. Therefor I've prefer to make my own functions but use the basic functions of the framework.

Link to comment
Share on other sites

Framework is a website building toolset. You can look at it as a collection of ready-to-use code, design practices and project structure, which you build your website on. Here is a classic example: website is usually divided into separate subpages. The framework gives you a structure to organize your subpages and the code that manages it. If you want to add a navigation to it, you get a navigation component and configure it, and so on. You do not have to write or invent it on your own.

 

It's not a CMS, which is actually a complete web application, where you simply point and click to make a website. Frameworks can be used to write CMS.

 

The question whether to learn it or not depends on your current skills. Frameworks use object-oriented programming techniques, so if you do not know it, you have to learn at least the basics, and some general programming knowledge is also recommended. In PHP it is a small problem, because it's often the first programming language for many people, and to be honest - a complete programming newbie usually has problems with understanding the whole concept.

 

What to use: many people recommend here CodeIgniter, which is something I don't understand; in my country this framework is almost completely forgotten because it uses outdated technologies (PHP4). Instead they often choose its clone, Kohana, rewritten to PHP5. There is also Symfony, ZF, and more rarely - CakePHP.

Link to comment
Share on other sites

Framework is a website building toolset. You can look at it as a collection of ready-to-use code, design practices and project structure, which you build your website on. Here is a classic example: website is usually divided into separate subpages. The framework gives you a structure to organize your subpages and the code that manages it. If you want to add a navigation to it, you get a navigation component and configure it, and so on. You do not have to write or invent it on your own.

 

It's not a CMS, which is actually a complete web application, where you simply point and click to make a website. Frameworks can be used to write CMS.

 

The question whether to learn it or not depends on your current skills. Frameworks use object-oriented programming techniques, so if you do not know it, you have to learn at least the basics, and some general programming knowledge is also recommended. In PHP it is a small problem, because it's often the first programming language for many people, and to be honest - a complete programming newbie usually has problems with understanding the whole concept.

 

What to use: many people recommend here CodeIgniter, which is something I don't understand; in my country this framework is almost completely forgotten because it uses outdated technologies (PHP4). Instead they often choose its clone, Kohana, rewritten to PHP5. There is also Symfony, ZF, and more rarely - CakePHP.

Well, I know basic Php, and I've started learning oop now, I'm still learning oop but I get the idea.

I want to start building a web project, that I can work on all the time over a long period of time, so I don't want to limit myself in any way.

Should I begin working with frameworks?

Link to comment
Share on other sites

If you have some knowledge about OOP and understand such terms, as "design patterns" and what they are used for, you can give them a try. In fact, it is possible they could learn you some good OOP design techniques.

Link to comment
Share on other sites

I'm currently working on a project and I thought about using a framework. There are 4 static pages and a simple e-shop.

 

I started thinking about it after a friend told me he used cakePHP and he really liked it.

Which FW would you recommend ? Which one has the best perspective (I don't want to waste time on some PHP4-based crap) ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.