I am going to start a new job soon. I will need to write a custom CRM / Intranet system. I need to decide on using an existing framework such as symfony or write my own system. Advantage of using an existing one are: - code already exists and has been tested by a lot of people - safe working hours and reduce development cycle Disadvantage: - if framework updates, might be tricky to update the CRM depending on integration - more difficult to customize What do you guys think about this??
IMO it depends on time and the web application, if you have enough time and the app is more likely to be very busy from the start, coding a framework from scratch will be beneficial in the long run, but if you don't have time or you don't know how much traffic your web application will get it is better to code it using a framework or even a pre-built CRM like sugercrm.
I guess the time factor is not of real importance. the importance is to develop a secure system that is extendible and easily manageable. The system has to deal with financial data so I rather spend some more time and get it right the first time around.
If you read my reply I said: "if you have enough time and the app is more likely to be very busy from the start, coding a framework from scratch will be beneficial in the long run", so I do prefer to code a secure and extensible system and get it done right the first time, but if you don't have time (like you need to deliver the app in a short time) then I don't think you can code from scratch and choosing a pre-existing system is the only way to go.
I read your reply. I was just telling you the place where I stand and provided a little more information.
Sorry I think I got you wrong . Yes if you have time then coding a system from scratch is good as it is a financial app, another approach you can take is to make the application architecture from scratch and then use Zend Framework libraries for common tasks like authentication, acl, etc.
question there will be how much work will it be to change my code if Zend decides to change the way a library works? I know the system has to be maintained and upgraded on an ongoing basis but if you reply on 3rd party products, will the upgrade / maintenance process just be complicated?
Well I don't think a framework changes its implementation drastically, usually upgrade is easy (I am talking about Yii and CakePHP because I code using these two) and isn't very complicated. Secondly there are HUGE sites like dailymotion.com using a pre-built PHP framework (symfony) and they are running very smoothly.
So you are saying if I would develop the system using current CakePHP 2.2.3 and somewhere down the line they release version 3 there will be an easy way to upgrade the whole system?
Yes hopefully, and don't forget that no framework drops support for previous version immediately after releasing a new version, for example, Yii will support version 1 till 31 Dec 2015 so you have enough time to migrate to a new version.
My opinion will contradict itsself.. First.. it doesn't make sense to re-invent the wheel. By using an already made framework all the kinks have been worked out for you. However, you have to spend time learning how to use a framework written by someone else. You will also spend tons of time trying to work AROUND the code to do things your way instead of theirs. I always advise against writing your own framework. However, there is absolutely NOTHING wrong with writing a series of classes that may act like a framework for you to deploy your own application. The benefits would be total control over your code. It NEVER makes sense to use a HUGE framework to accomplish something that can be done by writing a few simple classes and sticking to an organized coding structure. I have found that most people will use bloated frameworks for little projects. Keep it simple. If you can accomplish something with 10 lines of code, do so. Don't use a framework that will allow you to do the same with 5 lines (+ 20,000 lines of framework code)! I believe you should only use a framework if you plan to have multiple developers and need a base coding structure so anyone can take over or add to. It also is beneficial if you're in need to create a large scalable site. Personally..I've used frameworks and have also "rolled my own". I prefer to use my own method only because it's VERY lightweight, provides an EASY coding structure, and performs well. My own "framework" (if you even want to call it that) uses MVC, has templates, allows for database objects (using direct SQL), has a few classes to make things easier. It's only 12KB and I alter it depending on the project. Framework Pros: - Provides a coding structure for your projects. - Allows multiple programmers to work on the same project with very little "guessing". - Uses Model-View-Control for cleaner code. - Scalable and usually allows for RAPID development. Framework Cons: - Can take what seems like FOREVER to learn. - New developers STILL have to learn the framework. - MANY MANY MANY includes and can be resource intensive. - A lot of things seem like it takes even more coding with a framework...which defeats the purpose.
If they release a version that's compatible with the older version, yes. Is that likely? You'll have to make a decision and live with it. Way back when, around the early 1980s, Apple said that if you followed ALL the demands of their manuals when writing code for the Mac (there were about 8-10 LARGE books), they'd NEVER break your code. Big company, so you can take them at their word, right? Guess what? Not one single program written for the Mac back then can run on any current Apple product. Code that I write is always upward compatible with code I write later. Third party code may be, but the next version, in 6 months, may break what I wrote. So, while I might take a piece of code from somewhere, I never just call a library or plug in a class I don't understand, unless I'm never going to "update" that code. It may take longer writing it myself, but I know what's in it, and it's the best I can write.
Is it possible to choose both? lol I've used alot of existing frameworks but didn't always understand how they do things so i started to create my own framework for a couple of reasons. 1. I know what every line of code does 2. It hasn't got milion un used lines of code 3. I can alter it so easily that adding/removing things will go very fast. 4. It's much and yes much faster then existing frameworks. 5. I've learned alot about OOP, ACL, PDO and ofcource PHP My framework is like less then 150KB excluding template files and such, but include database classes (wrappers) for mysql, pdo, templates, curl, acl (acl was the hardest!) and some extra function script that contain very handy functions that i use often!.
reading the above answers I have decided that I will write my own Framework. Reasons 1. Full control of code as everything is written by me. 2. Greater Flexibility 3. No need to learn a new framework
If you're going to write your own. Don't write your own "does it all" framework but rather "does what I need".