Re: PHP/Python (was: RE: Vexim Digest, Vol 68, Issue 4)
Avleen Vig <[email protected]> Fri, 31 Dec 2010 16:11:43 -0800
| Newsgroups | gmane.mail.exim.vexim.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Dec 31, 2010 at 10:37:50AM +0000, Phillip Baker wrote: > Right. My assumption from what you wrote is that large scale changes > take place which means that code written for 2.4 would not function if > you have 2.6 installed. It is very seldom in my opinion that > subversions of PHP introduce anything so revolutionary that there is a > good case to actually use it straight away (causing the backward > incompatibility). Fortunately it's only broken the other way around (if I use new 2.6 magic in 2.4). But as long as the code tries to stay good to 2.4 (or, at least 2.5), then it'll mostly work in 2.6, 2.7, etc. > > I spent a considerable amount of time testing Smarty, a PHP framework, > > to see if that would be suitable and assist in the PHP development line. > > I hate all frameworks. I've tried to play nice with them, but they all > seem to be written by people who have their heads screwed on > differently to me. My code isn't messy, but I hate MVC with a passion > and nearly all the frameworks insist on using it. I prefer useful > libraries and functions to entire frameworks. :-) Most frameworks (maybe all? at least all the ones I've used..) are created to bring MVC into the system. I'm not a huge fan of MVC, and I pretty much hate all ORM's, but to me Django, RoR, Smarty, etc provide a couple of very useful things: 1. Templating. This can be done without frameworks, but they make it easier. 2. Separation of code / presentation. 3. Modularisation. I love modularisation :-) It helps a lot with code maintainability. All of these can be achieved without frameworks, sure. But the frameworks have all of this pretty much built in. MVC took me a *lot* of getting used to. Mostly the Model part. I'm used to talking directly to the DB myself, from where I want, when I want. I still don't really like the Model part :-) That said, I look at the bright side: At least with MVC I can think less about the database. I'm a systems administrator by trade, not a programmer, and I advocate doing things the fastest, simplest, laziest way possible so you can move on to the next thing :-) > > You're right about the vulnerabilities issue. What I can tell you > > though is that between them, Python and Django have had far fewer > > security vulnerabilities (to the best of my knowledge) than PHP. Python > > has been around since the early 90's and is quite stable at this point. > > No doubt; PHP does not have a good track record, my point was more > that dealing with PHP is well documented and we have a stable and > secure setup we use that works for us which I would be hard pressed to > move away from. Absolutely! > > For what it's worth, I spent 3 years at Google writing applications in > > Python + Django. May large organizations run this configuration, just as > > many places use Ruby. Both of these are becoming more "normal", > > alongside PHP. > > There are a great many large sites that use whatever is trendy at the > time because the only developer they have at that point likes it and > it either shapes the people they employ and they stick with it or they > end up switching later (sometimes at great pain). Ruby (on Rails) just > makes me ignore a project altogether - it's a nonstarter for me, and I > know choosing RoR has killed at least one web startup who subsequently > couldn't find any people to come on board to finish the project after > their developer got bogged down in other projects. Ultimately > organisations have to pick whatever suits their use case and their > development team best. Right now IMO nothing is as portable and easy > to get going as PHP code. If you're building a single app/site on a > dedicated platform however, the rules are entirely different. True! I suppose we could say that it's best to use the right tool for the job. Then we can argue about the job and what the right tool might be ;) I'll admit I have a little bit of hammer syndrome - python is my hammer, and everything looks like a nail. PHP would be a good tool for Vexim 3 if I was *good* at it. But the feature list for v3 is long, and far out of my ability to implement in PHP. > Thank you! I hope you have a nice new years, if you're doing anything. > Personally, I'm staying in and coding. I think I must be getting old. I'll probably be here coding too ;-) HAPPY NEW YEAR EVERYONE!