Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MVC/CodeIgniter Example

Options
  • 17-09-2011 12:53pm
    #1
    Registered Users Posts: 898 ✭✭✭


    Hey guys,

    I'm starting to experiment with CodeIgniter and want to find a simple example including a navigational bar, connection to DB and displaying information.

    Finding difficult to get around some of the concepts, if anyone can recommend something better than CodeIgniter or some tutorials, that would be great.
    Tagged:


Comments

  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    I found CodeIgniter a great framework for getting to grips with MVC actually; no reason not to stick with it.

    Have you had a look through the official user guide? It's very well documented and includes pages on the general concepts, like Application Flow, Models, Controllers and Views

    If you have specific questions, give a shout here and I'm sure you'll get some help - its an (increasingly) popular framework. Or the official forums can be a big help too.



    .


  • Registered Users Posts: 898 ✭✭✭OREGATO


    Hi Goodshape,

    thanks for the help.

    Although I grasp the general concepts of MVC and code igniter, what I'm trying to achieve or gain is as follows.

    Just a simple MVC control example to which I can build upon.

    I would like it to have a navigation bar, a header footer and a main body content in place.

    Once I have these, I think I'll be able to build upon the rest, any tips or hints or books I could get to help me on my way?

    Thanks again for the help


  • Registered Users Posts: 19,019 ✭✭✭✭murphaph


    If your heart is not set on codeIgniter you could look at the Yii framework. I used this book which takes the form of a long tutorial to teach you the concepts of MVC through this framework.

    The framework rapidly delivers a header/footer and the nav bar as desired. Yii is a convention over configuration type framework (I thing CI is too) so you don't have to get your head around a load of XML config files (In Yii there is basically one main config file and it's a php file) before you get into the thing.


  • Registered Users Posts: 898 ✭✭✭OREGATO


    murphaph wrote: »
    If your heart is not set on codeIgniter you could look at the Yii framework. I used this book which takes the form of a long tutorial to teach you the concepts of MVC through this framework.

    The framework rapidly delivers a header/footer and the nav bar as desired. Yii is a convention over configuration type framework (I thing CI is too) so you don't have to get your head around a load of XML config files (In Yii there is basically one main config file and it's a php file) before you get into the thing.

    Awesome, exactly what I'm looking for in there, I've already downloaded the framework and I'm looking into the Blog tutorial for it now.. My main fear is investing the time I have on this into something that I'll pull out of later, I just want a good framework to begin with.

    With the hours I work and the time I have spare between GF, job, other hobbies, actually trying to find the time to code is difficult and few and far between.

    I've already been onto their IRC channel and gotten some great hints and tips.

    Thanks man :)


  • Registered Users Posts: 19,019 ✭✭✭✭murphaph


    OREGATO wrote: »
    Awesome, exactly what I'm looking for in there, I've already downloaded the framework and I'm looking into the Blog tutorial for it now.. My main fear is investing the time I have on this into something that I'll pull out of later, I just want a good framework to begin with.

    With the hours I work and the time I have spare between GF, job, other hobbies, actually trying to find the time to code is difficult and few and far between.

    I've already been onto their IRC channel and gotten some great hints and tips.

    Thanks man :)
    You're more than welcome. We (my work) have used Yii as the basis for a high performance e-commerce solution. I believe also that the stay.com website is based on Yii, so the framework appears to be gaining ground, but it's the thing with PHP frameworks-there are almost too many of them! If Yii (or CI or symfony etc.) fall out of favour you'll have to learn something else, but most of the concepts will still apply, even in other languages, so it shouldn't be a big problem once you understand the MVC concepts.

    There's also another new book out on Yii called the Yii cookbook or something, but at present these are the only 2 books available.

    If you decide to follow that book I mentioned (you may find it online already somewhere ;) ) then please be aware there are a few typos and it would be best to use the exact version of Yii that the book uses (1.1.2 I think) to avoid confusing behaviour while you're learning the thing. The worst typos (ones that will cause major head scratcing) however are all documented right here by the author himself.


  • Advertisement
Advertisement