Bman900 Posted April 16, 2010 Share Posted April 16, 2010 So I tried searching this on google and it only got me more confused. Can some one explain what a PHP framework is and how it effects a PHP developer? Basicly is it a way you write code or is it a giant script where you built off of from? Sorry for the extremly stupid questions but am just curious. Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/ Share on other sites More sharing options...
andrewgauger Posted April 17, 2010 Share Posted April 17, 2010 http://framework.zend.com/about/overview It is essentially a collection of features not included in the native distribution. People write open source contributions to the framework and everyone is welcome to use it. Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1043493 Share on other sites More sharing options...
Bman900 Posted April 17, 2010 Author Share Posted April 17, 2010 Ok, so I found a nice sideshows that helps you set up the framework but from what I see you need to mess with php.ini some root server stuff and mod_rewrite. Is this framework able to be run on a shared host or must have a dedicated server? Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1043528 Share on other sites More sharing options...
andrewgauger Posted April 17, 2010 Share Posted April 17, 2010 http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html Depends on your host. I'd say not likely. Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1043530 Share on other sites More sharing options...
trq Posted April 17, 2010 Share Posted April 17, 2010 Is this framework able to be run on a shared host or must have a dedicated server? You should have no problem using Zend framework on shared hosting. You will need the ability to write .htaccess files though (which all Apache hosting should provide). Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1043567 Share on other sites More sharing options...
Zyx Posted April 17, 2010 Share Posted April 17, 2010 When you make a web application, you usually don't do (or at least - you shouldn't do) everything from scratch. Some parts of the code are very similar across the application, and you can see that you write many things in a very similar way. If you take this "shared" code and design concepts you are using and make a reusable library from it, you get a framework. Then you can put it into your new project and speed up it, because many parts are already done and ready to use. Of course, most of such home-made frameworks will simply suck, especially if you have no experience, but technically speaking they are still frameworks. The idea of "professional" frameworks is similar, but of course they are well-designed, well-tested, flexible and provide lots of features for different purposes. They give you pieces of a complete code, tools, automatic code generators and some techniques and you build a web application using them, just like building a house from ready bricks. PS. I would not recommend Zend Framework if you are a beginner. It's quite complex and requires much more from the programmer to set up the basic application structure. Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1043910 Share on other sites More sharing options...
Bman900 Posted April 18, 2010 Author Share Posted April 18, 2010 PS. I would not recommend Zend Framework if you are a beginner. It's quite complex and requires much more from the programmer to set up the basic application structure. Man I wish you were here 2 days ago cause I tried Zend and I only got more confused and mad cause I had no idea what I was doing. I was always writing everything from scratch before so I have no experience in any framework. What framework would you recommend? Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1044103 Share on other sites More sharing options...
Zyx Posted April 18, 2010 Share Posted April 18, 2010 What is your experience with object-oriented programming and design patterns? Actually, it's quite hard to say which framework is easy and which is not. People have different preferences and it simply depends. Note that many people would recommend you the framework they use, but they may be professionals and write from their point of view. However, I'll try to describe you something... Kohana is relatively simple, but it has very poor documentation and tutorials which may be a problem. Yii Framework has quite a lot features, but I think it is also quite easy for the beginners. It comes with the ready-to-use application skeleton and code generators that generate the basic, primitive web application which you simply have to fill with your content. Unless you try to make sophisticated hacks, it should be OK. Anyway, before you start, read something about design patterns and MVC (Model-View-Controller), becuase these techniques are very popular in frameworks and will help you understand, what's going on. Just a small note here that most of the frameworks does not actually implement MVC (even if they write they do), but something called MVP (Model-View-Presenter), so don't be confused if you will find differences between practice and theory, like I was for two years . Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1044241 Share on other sites More sharing options...
TeddyKiller Posted April 18, 2010 Share Posted April 18, 2010 PS. I would not recommend Zend Framework if you are a beginner. It's quite complex and requires much more from the programmer to set up the basic application structure. Man I wish you were here 2 days ago cause I tried Zend and I only got more confused and mad cause I had no idea what I was doing. I was always writing everything from scratch before so I have no experience in any framework. What framework would you recommend? I'm not touching any frameworks at all for atleast another year. Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1044324 Share on other sites More sharing options...
dotMoe Posted April 19, 2010 Share Posted April 19, 2010 I learned to design websites without the use of Frameworks back in the day; but as I learned more, and did more sites; I ended up having a respository of classes that I would need; and essential classes, that made my life as a coder easier. I then tried cakePHP and other frameworks, figuring out that; throught out my years of programing, i ended up creating my own personal framework that hasn't failed me yet Frameworks make coding somewhat a little faster for the traditional coder, and can prove to be quite efficient. For example I am currently working on a site that is built of a Moodle Build. Within their framework they have the function get_records($table, $searchfield, $serachvalue, [$limit]); which takes care of querying the database, returning the value, and then run a foreach on all the rows, and returns them into an object. Its saves me ton of time and I dont have to repeat the same code over and over again. Quote Link to comment https://forums.phpfreaks.com/topic/198804-what-is-a-php-framework-and-how-do-they-work/#findComment-1044440 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.