Live data from Hacker News

Just open sourced my 10k LOC PHP & MySQL invoicing app

github.com

11–20 of 101 posts

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#11
post #8

I can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.

I built it using CodeIgniter, and wasn't as proficient in PHP as I am now. CI is a beginner framework and doesn't teach a lot of good practices (e.g. it loads external classes as singletons and uses a class loading script developed during the PHP4 days).

Here is the suggested CI method for executing database queries: http://codeigniter.com/user_guide/database/examples.html

Nowadays, I prefer (PHP) frameworks with real autoloaders and better OOP usage (like Zend or Kohana).

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#12
post #8

I can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.

No I'm serious here, renownedmedia. Don't disregard my rant with a silly downvote, but do instead indulge yourself in the PDO methods instead of painting yourself and your projects into corners: http://php.net/manual/en/book.pdo.php

It wasn't me who downvoted you, I promise! I love PDO; please read my other comment.

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#13
post #8

I can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.

No I'm serious here, renownedmedia. Don't disregard my rant with a silly downvote, but do instead indulge yourself in the PDO methods instead of painting yourself and your projects into corners: http://php.net/manual/en/book.pdo.php

You can't downvote comments that are a reply to your own item, the person that downvoted you is not the OP -- unless he used an alternative account. I would suspect someone else did, the tone of your comment isn't one that really fits with the HN environment even if your point is valid.

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#14
post #8

I can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.

No I'm serious here, renownedmedia. Don't disregard my rant with a silly downvote, but do instead indulge yourself in the PDO methods instead of painting yourself and your projects into corners: http://php.net/manual/en/book.pdo.php

Having just converted an app to use Postgres from MySQL, I can tell you that the PDO drivers only get you so far. You're still ultimately going to be writing SQL, and then you have to get into the differences between MySQL's `key`="val" and Postgres' "key"='val' quoting differences.

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#17
post #8

I can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.

No I'm serious here, renownedmedia. Don't disregard my rant with a silly downvote, but do instead indulge yourself in the PDO methods instead of painting yourself and your projects into corners: http://php.net/manual/en/book.pdo.php

You probably got down voted because you seem like a dick, rather than a helpful, nice, encouraging person.

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#18
post #8

I can't believe you hardcoded this for MySQL instead of using PHP's excellent and versatile PDOs, and I can't believe the 10k line count. Gosh. Is "de-engineering" a suitable term here? Thumbs up for open sourcing your work, though.

No I'm serious here, renownedmedia. Don't disregard my rant with a silly downvote, but do instead indulge yourself in the PDO methods instead of painting yourself and your projects into corners: http://php.net/manual/en/book.pdo.php

What makes you think he was the one who downvoted you? You could easily have asked him about his technical decisions without being a jerk.

Besides, this was a personal project, probably created without the intention of eventually open sourcing it. If he only ever intended to use MySQL, and portability across RDBMS systems wasn't a goal, then it's fine as it is.

Re: Just open sourced my 10k LOC PHP & MySQL invoicing app

#20

What would you do different based on what you know now?

While I was at a startup recently, I did all of my frontend development in Backbone.js, this app would do a lot better in that framework.

Also, the CI framework isn't all that great, I would have certainly used a different framework. Perhaps even Node.js (which is what I'm doing a lot of my development in nowadays).

I also would have looked for a marketer and devoted more time to the project. The market for this kind of product is very crowded, but there is a lot of room for innovation.

Post reply on HN