Is Code Igniter simpler than CakePHP for someone new to MVC?

While MVC doesn't seem complicated to me, it's just a separation of models, controllers, and views. I installed both CakePHP and Code Igniter, and it seems that CI is much smaller, slightly less overwhelming, and the documentation is clearer.

Why do people mostly say Code Igniter is easier to learn? I plan to make the transition from non-MVC to CakePHP, and I expect it to take me a while to calm down.

Still...

  • CI: slightly better documentation
  • CI: less features, less to learn.
  • CI: installed on a shared hosting, CA "baked" through a bakery.
  • CI: simpler code to get content from databases, is the CA code bit more difficult to understand, is the bit less logical?

Are there other things that CakePHP might consider more complicated than CI for wireframe training? Why do people say CakePHP is a bit more complicated than CI for people new to MVC.

+6
source share
3 answers

Edit: The following answer was written regarding the latest stable versions, Cake was 1.2 / 1.3. I don’t even remember the CI version. It is applicable to use cases such as outdated support and historical contexts. The specific resources described have been replaced because they are no longer necessarily applicable, and the use of the latest stable system releases should ignore this as obsolete and look for more recent resources.

Depending on what you are trying to do.

The Codeigniter documentation 'front-of-the-book' is pretty smooth and fast, but the API created by the Cake code leaves absolutely no doubt.

Both have large communities and a lot of activity. Both adhere to and promote standards.

I found Cake a lot easier than CI because the structure, at least, had in mind when I didn’t know what I was looking for, I still had a pretty good idea of ​​where it would live.

The cake has a huge amount of lifting power out of the box. This means that newbies are not bothered by a lot of tedious redialing and are trying to debug spelling errors, etc. CI requires a mountain of plugins that are difficult to work with in different development / stability states to achieve most of what Cake is by default. This leads to the danger of a low threshold for pasta.

If your project is more than a bread box, think about Cohan: his documentation has been fixed, I spose a lot of community to use, and this is the lizard sink between Cake and CI.

Edit Oh, and heh - Cake ORM is anything but "less logical." If your data is extremely complex, run - don't go - to Cake. This is probably the hardest striker on the field. Actually, coming up with queries that are suitable for testing Cake is quite difficult. What you have is the alleged dynamic association of models that occur by selectively invoking and extending dynamic classes based on the user's intended intention through the namng convention. Abstract, extremely. OOP, deep. The cake handles data manipulation very much like a Rubix cube, where it knows that all the red bits go together, and he knows that all the ^ 6 sides go together.

Both of them are PHP. Simple, Cake makes more intensive use of advanced PHP methods. If they bite off a bit, relax. They are all hidden in the core. You will never have to approach them.

But one thing is certain: At the end of the Cake blog tutorial, you'll learn about inheritance and inheritance, as well as inheritance. NQA.

The console is strictly optional. Use it as much as you like on the command line.

Bakery is a fun term for plugin / tutorial collections for the Cake community. The code provided by Cake users is available to everyone if necessary. Each frame has it, but Cake has a triple naming convention.

The rigid structure of the cakes really facilitates the study, allowing you to predict where certain classes will be, what functions you will find in them, etc. It's easy to spot a spelling error when you know that all of your controllers will have multiple names.

Patty Cake, Cake Pie, Baker

- Quote, Cookbook, Page 1.

+7
source

Basically, I just started learning MVC about 3 months ago. When I decided to start using the framework, I looked at all the frameworks with large frames and, in the end, I nailed it to 2 options: CodeIgniter and CakePHP.

I decided to use Cake because during my research I found more books, documents and tutorials for guidance. It seemed easier to learn, and for some reason the code seemed familiar, although I had never looked at the framework before, but had encoded it a bit in PHP.

To get started, I ordered a printout of the manual, bought 3 books, and did more research as follows:

  • I googled the web for CakePHP tutorials and bookmarks (Firefox), everything I found interesting for later links
  • Then I read the entire CakePHP 1.3 manual and bookmarked all the pages and excerpts that I thought I would need at startup so that I could easily go back and re-read.
  • Then I started reading books and quickly found out that they confused me because they were written for Cake 1.2. I put these addresses.
  • Then I read the third book, which is 1.3. This made more sense and was not confusing; it corresponded to the version of Cake I installed.
  • Then I started coding my news / social website that I have. I want to replace the version I currently have on the network (PHPCow) with CakePHP completely for more flexibility.

In the beginning, everything started to tremble a little, and on several occasions I was close to leaving. I wanted a wallet of other directions, such as Joomla. However, in the end, I would not be satisfied, and there would be more training to make any CMS exactly what I want.

Now everything is becoming clearer, and my understanding of the cake is hot. It seems that I do not have enough time to work on my project, whereas before I wanted to seriously stop working on this project. However, I continued to move on.

For me, CakePHP is the best, and if you take the time to learn it, you will develop in a short period of time.

As for my website, I already have a news section made with comments, user authentication is also in progress, and I have a setting for the admin firewall. Now I'm heading to other sections of the site, such as Fotos, Store, Videos, etc ....

Last, although some plugins are great, I would not recommend using them at an early stage of your learning process. Use only plugins if you want to quickly add an added function, and not when you do not know how to create this function.

+2
source

It was definitely easier to learn codeigniter, and here is the perfect place to start. All you need is basic php knowledge.

Nettuts - Codeigniter from scratch

Happy codeigniting

0
source

Source: https://habr.com/ru/post/890864/


All Articles