can any one help me. actually I create yii framework project.how i convert into php in easiest way.Actually i know little concept of mvc using in php but the problem is render,redirect,lot of pages create through MVC . how i control admin panel .
actually i create differt admin panel for media person and agent.i dont understand if i extends from ccontroller in yii but how i use in php also..
lot of confusion for me about this project. can any one help me as easiest way as possible.if you describe that will better for me.
Please help. Thank you in advance.
Let me be clear.
PHP is a server-side scripting language.
The Yii Framework is an instrument, which supports the development process and relieve the "Programmer" with common activities. The Framework itself is build on PHP, because of this, there is no "converting".
My advice to you: Check the requirements given by your client carefully. After that, you have probablary two Options.
coding all Functionality by yourself in PHP
checkout a cool Framework and spent some time learning
Related
I've tried to understand the structure of joomla. I've read many kinds of documents and tutorial regarding about how to make extensions in joomla. I can't able to understand it fully. I still had some doubts on it. I've made a simple component in joomla by using MVC concept and using some joomla core files. I won't say that it is like same as what professional are making it. I've used 30% of joomla like using MVC concept, extending the core files of joomla and connected with the database using joomla syntax and some other ways also. Rest of the percent, i've used my own codes by using oops concept. So do you think that is it good enough to make an extension like this or i have to make an extension like that or i really have to learn and understand the official joomla way of making it's extension. I want to know it please.
First of all the joomla is given a brief details for developing its extensions.
You can check the following url for understanding the components structure of joomla.
http://docs.joomla.org/Developing_a_Model-View-Controller_Component/1.5/Introduction
In this doc at the end you can find a download link download the component and go through the code you will get full idea about joomla MVC concept.Its pretty simple.
I think no one can explain your requirement with what you are expecting.
Just keep this in mind while developing joomla's extensions.
1)Do not edit core file for your component task achievement.
2)Try to use jRequest class for getting submitted values.
3)For new task use your controller overrided functions.
4)Make all your sql queries inside model only.
5)And make an extension that compact able for later version too.
These are the tips i can give you.
Just walk through the code of some good extensions and try to follow that .
Hope this may help you..
For ease of maintenance and for future development I would definitely recommend that you develop your component the right way. If you are going to release the component I would say that it is a requirement.
The who MVC structure can be confusing at first but once you get your head around it is really nice.
I would suggest making the MVC skeleton by using the Joomla Component Creator
http://www.notwebdesign.com/joomla-component-creator/ and then add the custom code yourself.
I'm new to codeigniter but I wanted to create an application like that of http://redbeacon.com or http://thumbtack.com.
What is the best approach to go about creating a site like one of the above and is there any open source application I can use as a skeleton? Even a tutorial on creating a site like that would be great!
Thank you so much!
I doubt there are any specific open source solutions to your particular problem so I would say that you're going to have to create most of the site from scratch. That is, provided you have a good knowledge of PHP already.
If not, then I would suggest starting with some good php development books that will teach you the fundamentals of PHP.
For learning CodeIgniter you're quite lucky. One of the best parts about CodeIgniter is that it is very well documented.
For the quickest ramp up time I would take a hard look at Expression Engine. It is a commercial web publish tool that is based on CodeIgniter - so you get all the power of CI but with much greater ease of use. You can make pretty much any kind of site/web app with EE: showcase.
I'd like to learn PHP with a view to using CodeIgniter to make a few apps. Does this alter what or how I should approach PHP to start with?
I'm a designer with good front-end skills. I used Coldfusion in University but want to build stuff in a language more widely supported (and respected?). CodeIgniter seems great but I'd like to know how good a grounding in PHP I'll need. Any tutorial/book suggestions much appreciated.
Here' s a post from Derek Allard about learning php with codeigniter (it's short, only a couple paragraphs):
http://www.derekallard.com/blog/post/learning-php-with-codeigniter/
yes there is one major thing you need to learn or understand first. It's the MVC model that codeigniter uses, it stands for Model, view & controller. Basicly you need to split your code into 3 layers, the model is to query the database, the controller is also called the business logic layer, you will need to check if a query can be executed or not and finally the view which is the presentation layer, what the user will see. For the rest general php knwoledge is required for codeigniter.
Here are some articles about MVC structure:
http://net.tutsplus.com/tutorials/other/mvc-for-noobs/
http://net.tutsplus.com/tutorials/php/hvmc-an-introduction-and-application/
and here is a list of 15 video tutorials about codeigniter written by authors of nettuts:
http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-profiling-benchmarking-hooks/ (this is the last tutorial of the list but it's the only one that links to all other tutorials)
EDIT: OOP (object oriƫnted programming) is also something you might want to have a look at.
http://net.tutsplus.com/tutorials/php/oop-in-php/
My take: first learn PHP, then learn a framework like CI. Trust me, that is the correct order.
I just started using CakePHP and it's very different from just normal procedural or basic OOP PHP.
I am still learning PHP and still read "beginning PHP/mysql" books that teaches you basic PHP. Also lots of sites online provide code that isn't for a framework.
Is the only way to make non-framework code to say a framework, say cakePHP, by learning cakePHP thoroughly than rewriting the code yourself to fit the MVC model?
I think it would be beneficial to learn basic OOP PHP thoroughly before learning CakePHP. I admit Cake is a little restricting about naming conventions but you can customize this to your liking. I would try to rewrite a small PHP application in Cake to get familiar with it. Choosing a MVC framework does save a lot of development time if you take the time to learn on well. For Cakephp the book and API are two very valuable tools. I also suggest using Cakephp 1.3.
API
Book
CodeIgniter allows you to write things the way you want but really works best when you use it as a MVC platform. You would write all of the PHP code in the controller if you wanted and the application would still work, you could then decide to split out the code for the database into the model and then later decide to put all of the HTML into the view. That's if you would like to do it like that.
I would recommend doing tutorials and trying to use the MVC model as it has saved me a lot of time and is so much better than flat file coding.
CakePHP can be a little restricting as it requires you to follow particular naming conventions.
Hopefully this gives you a good start on a road to learning the ease and speed of MVC.
As far as I know, many PHP frameworks use syntactic sugar to provide illusion of real functions. Some provide scaffolding/skeleton generation, which is limited. Syntactic sugar is slow and IDE/editors do not provide intellisense for Syntactic sugar functions/methods and member data. I'm wondering if there any tool/framework to generate PHP code based on some popular frameworks and built around a relational schema? Thanks in advance.
I think Symfony has something that you might find interesting.
Try Zend Framework.
Zend Framework (ZF) is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.
I found QCodo http://www.qcodo.com/wiki/article/background/metaprogramming which satisfies requirements. Thank you very much for participating. You all earned my vote.
Zend_Framework has code generator called Zend_Tool, tough it's still unstable.
Zend_CodeGenerator
For posterity, I thought I would mention the rather impressive solution I just found to this problem.
Zend_CodeGenerator was added to Zend Framework as of, I believe, version 1.8, and I'm very impressed with it so far. Like most ZF components, it works just fine as a standalone tool; you needn't implement the rest of the framework in your project.
So far it seems easy to use and quite powerful.
Have a look at Cygnite Framework's Crud generator. It is very simple and easy to use. The New Cool Kid build on Symfony2 console component, I found interesting, made my job simple and fast.
Cygnite CLI generates controller, model, views, layout, form component, required field validation, pagination etc. with a simple command.
php cygnite generate:crud controller_name table_name database_name
You may alter the code based on your need.
Have a look, may help someone.
Generate CRUD application within 2 minute
Cygnite Framework Code Generator