• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is CI Considered Bad Practice for Big Projects?

[eluser]Pascal Kriete[/eluser]
Chris, we're talking really popular web apps. Killing the ?kb of memory that makes up active record is a very quick way to use that much less memory. And memory matters a lot when your site is getting viewed millions of times. Twitter did the same thing to RoR [source], but they have various other problems as well.

So far the project I'm finally starting to wrap up (Domain problems set me back some time while we got my system working right again.) is doing quite well using the CI framework. Now, I chose to use the MVC parts of CI for getting an admin backend going quicker, but the front end is less MVC oriented, actually it's just CV and get's the job done. Depending on the application I could see where it would get sticky, and I have found some unexpected quirks, but I've tried Zend and others and there are tradeoffs across the board. I went to CI because it was the closest to a MVC type setup that was fine with PHP5, didn't package scripts out the wazu with it, and the modules are loosely coupled as far as I can tell. They also tend to organize everything how I would if I had built something like this from the ground up (which is originally what I was starting with when I found CI, and was like wahoo!)

As for resources and such, if your app is getting hit so hard that it becomes an issue, then you should probably outsource the hosting anyway, or update the systems. Besides, at the level I'm estimating would be required for there to be really serious problems, I'd be less concerned about the framework and more concerned as to why I didn't hire a team of developers to build a more customized inhouse solution/framework months before it was even an issue.

Just my take... but that was just off the top of my head. Hope it makes sense. Sidenote though, it would be nice for CI to come with a model building script for database access. I like making a model for every table to help with CRUD functionality. It's nice, but does take a little effort. I found a great tutorial on making the models, and modified them slightly, maybe I'll post them eventually when I settle on some stuff.

I would like to put forward my experience with CI.

CI is fast, blindingly fast, when used properly. When you are just starting out or when "asked to review" CI VS "other" code you just dont code with CI properly. Once you have had about 6 months practice coding with CI you know how to extract every last drop of performance. There are some cavets i have but you can code arround them if you want. The biggest downfall is the xss functions, they use over 20 perl REGEX functions, making it very slow for large text inputs. You can easily code around them or recode them to greatly increase performance.


[quote author="Gavin Blair" date="1213208533"]Some companies will run the other way when you use the words "open source" too. You'd be surprised how many businesspeople actually believe it is a communist plot.[/quote]


No doubt. Never mention open source as the business-sheeple have been indoctrinated to think that the term open source means you are supporting terrorism (seriously). I think its great that Microsoft created Windows Vista so we would have a flag to spot this type of person. It does make it a little awkward when I ask potential clients to power on their laptops so I can check for the mark of Vista before we do business.

vista is something else indeed, i think we should leave this thread as is, give some good explaination about the topic.

@ mcrittenden : hope that helped Smile

see ya around.

[quote author="sikkle" date="1213493733"]@ mcrittenden : hope that helped Smile[/quote]
Of course Smile. Thanks for the responses guys.

[eluser]Myles Wakeham[/eluser]
Interesting points on the interest in open source in the corporate world, but I have to chime in with something that happened in a conversation with a BIG New York corporate client that I'm going out to see next week. I haven't worked with them before, but they are one of the world's largest firms in the industry they are in (I can't, due to NDA, disclose who they are).

But in a conference call getting prepared to go and see them, I asked if their IT group had a particular 'culture' of technologies (ie. are they are Windows shop, etc.). They flat out said to me, "We are an open source shop - we prefer Linux, open source DBs, PHP, etc.". That came from their CIO directly.

So anyone who thinks that corporations have a big problem with open source should talk to these guys. Pity I can't disclose who they are, but you'd probably all know them if I did.

Anyway open source is alive and well in New York City.


[eluser]Myles Wakeham[/eluser]
Now back on topic with CI and Big Projects, I would like to offer that I feel there are distinct ADVANTAGES of CI on big projects. The issue is really what you define as BIG. In my case it isn't so much about the number of users, hits, etc. Its more about the sheer size of an application to be developed.

I have a number of uber-large PHP projects, some in production, some in development, that have been built with CI. Most involve databases with more than 250 tables, and probably about 50 different controllers, etc. I know that is hard to use as a benchmark for big projects, they are projects that have 1-2 yr development cycle on them, so they are pretty huge.

We use SVN for source code management, Trac for testing, milestones, etc. We have about 5 developers on these projects, so the teams aren't huge but it works well. Once we built our own libraries for certain functions, producing 'standard' capabilities in the apps is easy. We build all of our forms dynamically from metadata and we use Firebird SQL as our back-end database. All DB interaction is done through stored procedures which has taken a lot of the burden from CI. We also use Smarty for our form UI handling.

So far, no complaints. Some apps have been in production for about 2 years and never had an issue with CI, Firebird, etc. Its all good. The uber-big one we're working on right now is in late stage development and so far, its damn fast. I'm not concerned about size, scalability, etc. for this because the way that its developed it can be run on a server farm of hardware. I can't say that I've seen any major issues with performance or engineering issues with CI on these larger projects at all. If anything it brings a formal level of framework compliance to the table for all the developers and most importantly it allows us to add to that standard with our own libraries. Now I don't have renegade developers bringing their own 'style' to a big project and creating more issues than solving them.

Anyway my $0.02 worth. Your mileage may vary.


Things evolve eventually, years ago I was often asked "Why aren't you proposing a Microsoft solution?" by the board members. It was no surprise, they were comfortable with MS, MS used to send them Beta software to install, some board members seemed to treat Open Source as a threat to the established order.

Over time as the media has become more informed and we're getting a more balanced view and in some cases Open Source is now the "Trendy" option to ask for. I know of someone who recently went looking for a few Million USD to build a social networking site, he was going to build it in C# on .Net, but none of the venture capitalists he spoke to would touch it unless it was written in Open Source.

Back to the subject, always use the appropriate tool for the job, if you're ironing a shirt an iron is sufficient, a steam roller is overkill, but conversely if you're trying to flatten out a road, you may be some time with the iron.

CI has one of the smallest footprints out there, I see no reason why you wouldn't use it in a big project, if your site is going to end up with a massive amount of traffic, you need to plan for it. When Larry and Sergey first built Google they planned for it to scale .. read "The Google Story by David A Vise". Also "Building Scalable Web Sites .. The Flickr Way by Cal Henderson"

CI just makes it easier to implement your well thought out system. It gives you enough structure and tools without getting in the way.

I con't think why anyone would think that CI was bad practice for a big project, is the next step to say that PHP is bad practice .. better dust off my machine code and assembly language skills Wink

Can anyone comment on CI for scalability vs something like Rails or Django...
dealing with hundreds of thousands of pages per hour is it better to have one of those frameworks or can CI handle it?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.