ueon Posted July 7, 2011 Share Posted July 7, 2011 Hey guys, I have two questions that's been bugging me for a while now: 1) What is "->" in php and how does it work? 2) How exactly does php frameworks like PHP Cake assist in building applications? Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/ Share on other sites More sharing options...
KevinM1 Posted July 7, 2011 Share Posted July 7, 2011 The '->' is an OOP operator, specifically the 'to object member' operator. It's used when trying to access an object's public member (either field or method (function)). Frameworks assist in building applications by providing a lot of the basic, underlying structures most/all apps need. For MVC frameworks, they provide the front controller, routing mechanism (including the route table itself), the base class for the controllers, and, a lot of time, a ORM to help with the model as well. It allows the developer to focus on developing an actual site/app rather than the low level (yet still important) structural code. Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/#findComment-1239664 Share on other sites More sharing options...
gristoi Posted July 7, 2011 Share Posted July 7, 2011 1. The '->' symbol is one of the two object operators. It is used for accessing methods and variables from within the object. 2. Frameworks allow you to code within a structured manner. Allowing best practices to be shared between developers. basically If i came into your office and picked up a piece of your work i would have to pick it apart to figure out what you were trying to acomplice. But if you were using a framework ( cake, zend etc) then i would know how the code was structured etc. Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/#findComment-1239665 Share on other sites More sharing options...
TeNDoLLA Posted July 7, 2011 Share Posted July 7, 2011 I think there is a reason for that in this forum that it will warn you if someone has replied while you are writing your reply... Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/#findComment-1239668 Share on other sites More sharing options...
gristoi Posted July 8, 2011 Share Posted July 8, 2011 There is a warning tendolla, but the whole point of posting is to give your view and opinion on the subject at hand. regardless if someone has posted 1 min before you. Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/#findComment-1240032 Share on other sites More sharing options...
TeNDoLLA Posted July 8, 2011 Share Posted July 8, 2011 Well you said 99% the same as Nightslyr. But hey, just saying... no offense. Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/#findComment-1240042 Share on other sites More sharing options...
gristoi Posted July 8, 2011 Share Posted July 8, 2011 none taken mate, end of the day had already typed it and couldnt be arsed clicking cancel lol Quote Link to comment https://forums.phpfreaks.com/topic/241333-php-and-framework/#findComment-1240044 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.