MVC and CodeIgnitor

Talk about game designs and what goes behind designing games.
Post Reply
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

MVC and CodeIgnitor

Post by hallsofvallhalla »

I am currently learning MVC and CodeIgnitor and needed a place to scream.


aaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Okay feel better now. Thanks.
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: MVC and CodeIgnitor

Post by OldRod »

LOL, I spent a lot of time with CodeIgniter last year. I can feel your pain :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: MVC and CodeIgnitor

Post by hallsofvallhalla »

I cannot get SQL server to work with it. May have to go to Cake
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: MVC and CodeIgnitor

Post by Jackolantern »

Really? Screaming? I was pulling my hair out using vanilla PHP, and CodeIgniter was a breath of fresh air lol. Finally having some real form, patterns, and separation to keep your code from becoming an unworkable stew was one of the most exciting moments I ever had with PHP.

I will say CakePHP has about a 30x larger learning curve than CodeIgniter. Essentially every PHP framework has a higher learning curve. However, if you don't like CI, I suggest to try out Yii. It is my second-place framework :)
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: MVC and CodeIgnitor

Post by hallsofvallhalla »

I just rewrote some Models to accept MSSQL. Got it working. I think MVC is soo much more work. Creating 3 pages instead of 1, linking and more linking and more linking.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: MVC and CodeIgnitor

Post by Jackolantern »

It is all worth it. Believe me. MVC has completely taken over the web development industry, and is basically considered a requirement for all professional web development now, so there must be some wisdom in it, and I definitely see it. What is maybe 40% more effort at the front translates into potentially huge savings during maintenance, particularly if you work in an environment where multiple devs have to maintain the same codebase. It makes adding new features and website redesigns beyond easy. It prevents one change from causing sweeping breaks all over the application. It creates a loosely-coupled system that allows unit testing, something that is impossible with all-in-one PHP websites.

Essentially, MVC supports the entire modern model of web development. If you take it out, you begin losing almost the entire modern workflow. :cool:
The indelible lord of tl;dr
User avatar
Elvar
Posts: 86
Joined: Sun Oct 07, 2012 7:04 pm

Re: MVC and CodeIgnitor

Post by Elvar »

I agree with Jack, raw PHP is a real pain, and so much more work!

I used Codeigniter in the past, and i found it to be a delight, it was my first MVC and i loved it. Since i've been using GRASP in Java, and Symfony, BackboneJS, i really encourage to take a look at either Zend, Symfony2, cakePHP, however the learning curve is like walking into a door (Might be even worse than learning Drupal). But once you get over the top, it's like bathing with angels :D!
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: MVC and CodeIgnitor

Post by hallsofvallhalla »

I know you guys are right...i just do not want to accept it :)

Though I have too. .. :) I did the same thing with jquery. Hated it till I actually needed it then love it now.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: MVC and CodeIgnitor

Post by Jackolantern »

Elvar, did you ever try Yii? It is my #2 framework suggestion behind CI.

And yeah, Halls, it really does simplify a lot. It just takes a bit of work to get used to it and really learn it, just like jQuery. However, your average PHP framework such as Yii, Zend or Symfony will take a lot more work to learn than jQuery. CI is a bit more like learning jQuery, though.
The indelible lord of tl;dr
User avatar
Elvar
Posts: 86
Joined: Sun Oct 07, 2012 7:04 pm

Re: MVC and CodeIgnitor

Post by Elvar »

Jackolantern, no i did't but i can tell from your post that i is great? :) I am currently using Symfony2 for a RESTful API, which is taking part in our game :), and the routing system in symfony is amazing. Still i can't call myself a symfony master, there is so much to it, and i still sometimes get one of those "what, how? the hell" moments :D.

I will definitely do a blog post @ IR about our structure, when we have something more playable :).

Is Yii anything like Zend or Symfony besides being a MVC FW? :)
Post Reply

Return to “Game Design”