Reputation: 327
I have been coding in python/django and c/c++ from last three years for various web-based and desktop applications in my previous companies. While following the general learning curve, I started working on functional programming languges like Haskell/Erlang. But recently I switched to a company where the programming languages used are php and Java.
Having switched to python did change the way I used to code, mostly in good sense, and then learning haskell added another dimension to the thought process.
I would like to know if:
Learning php and java (I have done a project in groovy/grails too) would be like stepping back on the learning curve?
The present company basically uses smarty as a template engine, also there is no ORM which is kind of frustrating after having worked in django, Is there any way ORM and other such features can be included?
Does it make sense to continue learning python/haskell assuming that I will be staying in the present company for pretty long ?
Also, what can be the right way to move from python to php? I know its wierd because usually people ask the other way around (php to python)
Upvotes: 2
Views: 1000
Reputation: 30472
If you must do step down to php, at least use one of the good available MVC frameworks with an ORM:
Adopt the good parts of using the framework: Don't forget to write tests as you move to php!
Keep database/serialized objects simple and clear - so they can be accessed from other programming languages in parallel or when you move out of php world. I.e., don't use php's serialize()
, but json, protobufs, thrift.
Try to keep the php portions of your code as small as possible and limited to web frontend - fight any attempt to create new backend services using php, which is not so good in memory management, threading etc. If you already use Java, you can use it for this purpose (or intrduce python...)
http://www.phpsh.org/ is your new ipython, although not as useful
If possible, try sticking to php 5.3 with namespaces and better memory management
Upvotes: 3