开发者

what comes next for me?

开发者 https://www.devze.com 2022-12-22 06:40 出处:网络
hey, i\'ve been running my own gaming website for about 5 ye开发者_StackOverflowars now. It\'s written in PHP/MySQL. I use some AJAX and have recently started using jQuery. I\'m wondering how best to

hey, i've been running my own gaming website for about 5 ye开发者_StackOverflowars now. It's written in PHP/MySQL. I use some AJAX and have recently started using jQuery. I'm wondering how best to move forward to make my code "better". I've never used a PHP framework, and I once used OOP but didn't really feel the advantages.

What could I learn to move forward?


First of all, a question : is changing anything really necessary ?

What I mean is :

  • It currently works OK, it seems
  • Changing means :
    • spending time changing the code
    • spending time testing
    • introduction of new bugs

So, unless you really have to... Is changing anything necessary ?


If your answer is "yes", and/or you really want to change something... Well ; first question you'll have to ask is :

  • Am I going to develop a totally new version ?
  • Or do I want to only update some parts, one at a time ?


In the first case, you will re-do the application from scratch -- which means you can do anything you want :

  • MVC
  • Framework, ORM
  • re-think your DB schema
  • re-think your front-end (JS Framework, Ajax, ... )


In the second case, you will enhance existing parts...

In this situation, what I generally do is use components to update the old parts of my application -- for instance, using Zend_Mail instead of some hand-mande code (just an example).


Then, note that your question is opened to a wide range of ideas. A recommandation I could give would be to look to good/best-pratices, for both :

  • development : MVC, Frameworks, ...
  • testing : automated testings
  • setting up some continuous-integration platform, like PHPUnderControl, for instance (to run the tests automatically, analyse the code with PHP_CodeSniffer, generate the phpDoc, ...)

All this can also be useful later, for a new project ;-)
And it's nice and useful things to know !


What you could do is profile your application to see where it has performance bottlenecks and then improve those. You could also look over your code base to see where it is hard to maintain and refactor these portions into smaller functions. In case you are still on PHP4, migrate to 5 as there have been a ton of improvements performance wise as well.

Not using a framework or OOP is fine. Personally, I like both, but if you got a running app, then why force it into a paradigm or framework you're not comfortable with.

Feature-wise, you could ask your site's visitors what they would like to see. Thus you know you don't add anything no one will use anyway. And your users will like you more, because you asked them what they want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号