ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

What's so cool about codeigniter/frameworks at all?

January 29, 2008 8:06am

Subscribe [7]
  • #1 / Jan 29, 2008 8:06am

    lay-z-cow

    13 posts

    Hi there,
    my name is Chris and I’m a student in Germany.

    At the end of every semester break, we have something like students-teach-students workshops. This year I’m gonna do one about PHP application frameworks.
    There will be a theoretical and a practical part. For the practical I will introduce codeigniter 😊 - But I still want to gather thoughts and experiences for the theoretical part.

    So I wanted to ask you guys to do a little brainstorming with me.
    Why do you use Frameworks?
    Why not push it into CMS like drupal?
    What experiences do you have working in groups on a project, is a framework an advantage (because less stress with documentation, codewriting rules, etc.)?

    Just tell my, whats on your mind. 😊

    Greets
    Chris


    EDIT: Of course, you can also tell, why you did choose codeIgniter :D

  • #2 / Jan 29, 2008 8:15am

    Craig A Rodway

    189 posts

    Main reasons for using framework: Rapid development, tons of already made re-usable libraries, code organisation; and with CI - the documentation the ties them all together. Mainly all the ‘little’ things you’d have to do yourself if you weren’t using a framework such as validation and database abstraction etc.

    Why not a CMS? Depends on the requirements. If an application doesn’t need everything a CMS does and/or a CMS isn’t extensible or as easy to develop for, then use CI. If the requirement is a basic website then I will use Website Baker.

    Working in a group Yes, I find this does help, but only to a certain extent. For example, I recently worked on a site that was developed by someone else and a few fixes applied by another developer; the view files included a lot of WTF-worthy code. But having the controllers and models etc being in a set structure was definitely a positive.

  • #3 / Jan 29, 2008 9:02am

    ejangi

    220 posts

    Hi Chris welcome to the forums.

    This question is a biggy, so I’ll try and break my response down a little.

    Why use frameworks?

    At the end of the day it pretty much comes down to deadlines. The company I work for usually allots a certain amount of time to a project which the client has signed off on, so the more time I save developing an application, the more money the company makes; and the better I look. :D

    There are a couple of ancillary reasons also:
    - It allows me to break certain parts of an application up so that: I don’t repeat myself as much.
    - More than one developer can be working on a project at one time.
    - I can quickly implement functionality through the use of “libraries” (provided by the framework).

    Frameworks, like CI, also help tremendously with maintainability. Because the code is broken up into pieces (objects). Making changes generally means I only have to touch one part of the code, whereas otherwise I could have to edit multiple files.

    The last thing, which is super important, is that most frameworks try to take away the headaches that you often get from different versions of the language/platform. For instance, CI does a pretty good job of working on BOTH PHP 4 and 5. Likewise most JavaScript frameworks will work around many cross-browser issues.

    Why not push into a CMS like drupal?

    Well, something like CodeIgniter is probably not the best fit as a Publishing platform (CMS). CodeIgniter (as I understand it) is more targeted at online applications (think Gmail, Twitter, Flickr, etc… An application framework generally has a lot of the necessary code in place to make the building of these applications as quick and simple as possible, whereas a CMS is geared towards Content. In short, it would be harder for me to “bend” drupal to make it do what I need it to if I am building an application.

    <subtitle>I have never used drupal - so I am just speculating, but I have extended other CMS’s before and it’s not nearly as easy as using an application framework.</subtitle>

    What experiences do you have working in groups on a project, is a framework an advantage?

    Yes, I work for a company with multiple developers and we recently launched our first production application built on CodeIgniter. Because CI uses the MVC paradigm different people could work on different parts of the application without too much overlap/conflict. For instance, we had one developer building Models and DB Schema’s while another worked on application logic and validation, while a designer put the styling touches on top. Of course, we had version control so if we did overlap it didn’t really matter, but the point is that we all lose less hair (now) thanks to the framework. 😛

    Frameworks don’t necessarily solve issues with documentation, codewriting rules etc… That’s still something that you have to agree on as a team. Most PHP developers (should) use the phpDocumentor format as the CI core does, but the framework doesn’t enforce that per se.

    Something like Ruby on Rails is probably a better example for that sort of thing, because there are more solid conventions built into the framework and most of the code ends up reading back like plain-english; so (actual) documentation is rarely needed.

    Why did we choose CI?

    We looked at a lot of different frameworks, but what we really wanted was something that we didn’t have to learn. Frameworks like CakePHP and Symfony have a lot of very strict conventions and take a bit to learn and we weren’t so keen on that. They are also quite resource heavy and in the benchmarks we did CI kicked everything off the map. So, it’s light, it’s simple, it’s very extensible (extendable) and it wasn’t still in beta.

    There are two other things that are very important to me personally (because of my role here at work): Wherever possible CI doesn’t reinvent the wheel; it just tries to use regular PHP (such as in the templates) and also it is licensed right. We had previously been using a framework that is licensed under GNU/GPL which prevents us from being able to commercialise our hard work, whereas CI has a very developer/business friendly license giving us a lot more freedom to make up our own minds about what we do with our code.

  • #4 / Jan 29, 2008 10:36am

    Nick Husher

    364 posts

    Why do you use Frameworks?
    Frameworks, as I see it, do two things. First, they get you started with all the boilerplate code that tends to kill momentum on agile projects. Agile is very much about maintaining a certain level of continuous activity, and writing YADAL (yet another database abstraction layer) really kills the excitement that agile depends on. If all the database, input, form validation pain-in-the-ass code is written, then you’re free to start working on the meaty bits of the project, which tends to foster more excitement, rather than less.

    Second, they smooth over all the bad bits of a language. CodeIgniter smooths out one of PHPs biggest faults, which is library inclusion. Large PHP projects that continue to use PHP’s include/require/requireonce functions are often headed into unmaintainability land. Another example of a framework smoothing out bad language decisions is in the various Javascript frameworks. At least half of their stated purpose is to develop a consistent interface with interacting with web sites that ignores problems with the language or browser inconsistencies.

    Why not push it into CMS like drupal?
    Because not all projects manage content in a way that Drupal or other CMSes can handle gracefully. Some projects barely handle content at all. The company I work for has used Drupal for a lot of things that it wasn’t well-suited to. I wouldn’t use Drupal for a music aggregation site (like Last.fm), but such a thing would be well-suited to CodeIgniter.

    What experiences do you have working in groups on a project, is a framework an advantage?
    A framework is definitely an advantage. My company is primarily a Java shop that specializes in Hibernate and the Spring framework. I know a fair amount about Hibernate and enough Spring to get by, but I specialize in HTML frontends for the sophisticated Java apps we produce. I can work in the view part of the MVC while our programmers—who aren’t so hot at HTML—can focus on the model, and we can collaborate about what we want in the controllers.

    Why you did choose CodeIgniter?
    I’m a huge fan of Veerle Pieters, who will pimp EllisLab and ExpresionEngine with some regularity. I took a look at EE, and quickly found CodeIgniter. I was impressed with its simplicity, and that it seemed to embody a lot of what I admired from Ruby On Rails but left out all the bad parts. I started using CodeIgniter for all my PHP development and never looked back.

  • #5 / Jan 30, 2008 5:40am

    lay-z-cow

    13 posts

    Hi,

    thanks for your detailed descriptions! Now I’m feeling reinforced in my opinion and I can tell it to the others with a better feeling.

    Especially your experiences about your workflow are very interesting for me.
    So if anyone wants to add his opinion, I would be happy. 😊

    Greetings

    Chris

  • #6 / Jan 30, 2008 7:01am

    tonanbarbarian

    650 posts

    just to add to ucantblamem comments (because we work together)

    The other interesting thing is that the project I am currently working on is using CI integrated with a CMS.
    The frameworks or coding structures in some CMSes is not great, so since CI is so light weight we have tested and found that it is fairly easy to integrate CI into another CMS
    The only issues have to do with memory usage. If you are running on a server that has memory limiting enabled in PHP you have to be careful so as to not go over the limit. So far we have not had a problem with that however.

    So if your question is why not use a CMS, well you still can and you can slot CI into it fairly easily

  • #7 / Jan 31, 2008 2:59pm

    kevinprince

    122 posts

    Why do you use Frameworks?
    I use frameworks as they provide a base to build my applications off. Its much easier to use an existing framework which has lots of basics, like validation, db logic etc then writing your own which undoubtedly will have more bugs and security issues.
    Why not push it into CMS like drupal?
    Drupal and its kind kill kittens, Not literally but if you have ever worked with something like drupal you will know how rigid and set in its ways it is. Ever tried to style a table in Drupal? Its worse than pulling teeth.
    What experiences do you have working in groups on a project, is a framework an advantage (because less stress with documentation, codewriting rules, etc.)?
    No real excuse sorry!

  • #8 / Jun 21, 2009 6:49pm

    gausarts

    2 posts

    I just wanna thank you all for the enlightenment. I know I am looking for something but hard to express it myself as I am new to this CMF concept. I am familiar already with CSS frameworks, though, you know the designer guys 😊

  • #9 / Jul 15, 2009 5:23pm

    Johan André

    412 posts

    Why do you use Frameworks?
    I mainly use frameworks because it cleans up my developing process. I find it alot easier to plan and build a site with it. Codeigniter is great because it has a lot of functionality built-in it’s core classes. It feature-rich yet not limited.

    When I think of it, I use frameworks for CSS (960 Gridsystem & my own framework for creating nicelooking forms) and javascript (jQuery).

    Using a framework has cut down the development process for me.

    Why not push it into CMS like drupal?
    I created websites built in Joomla, Drupal, Concrete5 and a couple of other CMS:s. While it’s usually great for most sites, alot of times I ran into problems when my client ask for something not so ordinary. I also like to deliver a backend that is easy to use and builds on concepts that are easy to grasp for the client, even if they are complete morons and don’t have a lot of understanding with using the web. Often the CMS:s require that you understand the flow of the content to update a section. In Joomla there are “Articles” and “Menus” and different pagetypes and I have had some problem to educate the clients about what goes where.

    When I create my backends based on CI, I can easily customize the layout and create a backend that the user understands and find logical.

    What experiences do you have working in groups on a project, is a framework an advantage (because less stress with documentation, codewriting rules, etc.)?

    I usually worked solo on my projects, but one good thing is that if you need to pass over a project to someone else you just give them the link to the documentation and they are probably all set to go. If someone else is gonna dig into your non-framework-based code it will take them much longer (if they even want to).

    When I get projects thrown at me that requires me to read into someone elses code, I usually end up rewriting the whole thing to get the job done in a proper way.

  • #10 / Jul 15, 2009 5:30pm

    Yorick Peterse

    537 posts

    Johan…The thread has been posted more than a year ago 😛

  • #11 / Jul 15, 2009 6:24pm

    Johan André

    412 posts

    Johan…The thread has been posted more than a year ago 😛

    haha! now it’s bumped… actually saw the time after I posted… 😊

  • #12 / Jul 25, 2009 6:28pm

    marinaccio

    25 posts

    Why do you use Frameworks?
    ———————————————————-
    Similar to .Net (I’ll probably get flamed for that one!), it gives you, the developer, a nice, clean,  structured base for your projects. If you need to work with DB’s, it’s there for you. Need to work with sessions/cookies, forms, the list goes on, it is there for you. You just call on it.

    Another nice thing is, the base you are working with is built on a tried and tested architecture. You could write all those things yourself, or even just the ones you needed. But, with a framework, those things are wrote for you, in a very structured and standardized way, giving you a clean framework to build your applications with, and like Johan was saying, it promotes your coding to be more standardized and structured, making it pretty easy to revisit you code, or CI code of someone else.

    Why not push it into CMS like drupal?
    ———————————————————-
    It is similar to “why not just use Windows”, you can customize CMS’s like Drupal and Joomla (just like you can Windows), although when you have just a lightweight framework to build upon, it offers you full control of you application and it’s development (same reason people choose *nix, for complete control).

    One thing I have against using CMS’s like Drupal and Joomla, and all the 3rd party plugins that allow you to customize it, is the constant security vulnerabilities. I now prefer to just write my own reusable modules, the way I think they should be wrote.


    What experiences do you have working in groups on a project, is a framework an advantage (because less stress with documentation, codewriting rules, etc.)?
    ———————————————————-
    I do .Net development in a team environment, and will speak for frameworks in general. When you work in a team, with everyone being familiar with that framework, they are usually familiar with the standards and structure that goes with that framework. Even more so with CI, as you are working with MVC, which guides you in writing a clean separation of responsibilities in your code.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases