Live data from Hacker News

Ask HN: I program in pure PHP - Should I be doing something different?

news.ycombinator.com

11–18 of 18 posts

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#11
post #5

CODEIGNITER I use a variety of languages and frameworks, and CodeIgniter is the closest to what you described you're used to with some great boiler plate code. I've done everything from simple one off CMS apps to very robust multi site automated apps, all in Codeigniter. Check it out, it's easy to get started with, you don't need the command line, there's no magic. Just helpful code.

I really recommend Codeigniter also. It's awesome and will be right within your comfort zone. The documentation is also really good.

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#12
If you are new to MVC frameworks, you can get started very quickly with Codeigniter or Kohona. Otherwise, it's really worth investing some time learning Symfony or cakephp.

Another way to go would be to learn a ORM (doctrine) and a templating engine (tinybutstrong or smarty). I have never done any big php project without the help of frameworks, but some of my work friends find this approach (templating engine + ORM) more easier and better. I can't agree with them, though.

Frameworks are not all about rapid development. If used properly, they structure your application and make it easier for maintain.

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#13
Since you are already comfortable somewhat with PHP, I suggest you take it in and work on it for a while till you understand the life cycle of a web application. I highly recommend Codeigniter framework - it does a lot of heavy lifting for you.

Taking this route will also help you realise what you like and don't like about PHP. THEN, you will be in a better position to judge if something like django or ruby on rails would suite you better.

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#14
My first post here. I am not a full-time-webdeveloper.

Catalyst framework, Mason and TT templating works quiet well for me even with existing static site rewrites. The templating also helps me manage many other text files,like invoices. For a CRUD the external database can reuse the nicely generated Schema and Model classes.

catalyst is written in perl and parts of it in c.

I also used php4, django, pylons, and zope and find catalyst the lesser problem when moving from webservers to webservers, version to version, config to config etc.

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#15
Try web.py [1]. It's a lightweight python framework for developing web apps. I personally like the Jinja templating engine [2] in conjunction.

You will love it, and I bet you'll enjoy python! :)

[1] http://webpy.org/

[2] http://pypi.python.org/pypi/Jinja2

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#16
The problems I have with frameworks are bloat and that they force you to work in the way that the creator of the framework has visioned, if you find a framework that fits you than you should consider yourself lucky and in that case you'd better use it to your advantage. I advice you to stick with PHP for web development opposed to other languages, in itself it would not matter which language you use, but PHP has always been focused on web programming and has resolved most underlying problems dealing with that web programming, I personally also find it one of the most productive languages not much different from C in the compiled world. I think the best option is to slowly create your own framework (PHP Classes) so it fits your way of thinking and problem solving best.

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#17

Django. It'll change your life.

I think Django is extremely powerful, the way it lets you cleanly integrate entire pre-built features adding two or three lines is amazing, but understanding this is my own experience and doesn't reflect the general case, I found it daunting at first. My perception is that it is aimed at the large, full-featured, content-rich website, not the over-the-weekend one-trick-pony project you are more likely to start when you are still learning.

Re: Ask HN: I program in pure PHP - Should I be doing something different?

#18
Learn CodeIgniter or CakePHP, you'll be amazed at how quickly the sites come together after a couple months of learning, esp. when you're building from scratch. A site that took me two months in vanilla php can take 2 weeks in codeigniter. However, retrofitting a site that someone else made with those frameworks can be a frustrating experience, as everyone has their own quirks when learning frameworks. Retrofitting vanilla php couldn't be easier if it tried.
Post reply on HN