2015年3月6日星期五

Programming Are Hard: Structuring my applications


On the Programming Are Hard site there's a recent post looking at PHP application structure and how they handled the structure of one of their applications.



One of the biggest struggles for me, as an app developer, is coming up with an architecture that I'm happy with. It's something I wish other developers talked about more often. I thoroughly enjoyed Kris Wallsmith's SymfonyCon talk. It's very raw and real and doesn't come across as him talking down to anyone at all. Do I agree with everything he says? No, but that's not a bad thing. It's very insightful and I really enjoy taking a peak behind the curtains and seeing how other people do things. This is my attempt at doing just that.


He's broken down the structure into the overall parts and provided examples and summaries of each:



  • The use of packages
  • Entities
  • Events and Event Listeners
  • Commands and Handlers
  • Exceptions
  • Providers
  • Repositories
  • Security functionality
  • Services
  • Testing
  • Validation
  • Value Objects


Each section includes sample code and a description of where in the overall directory structure it fits. The setup is largely based on a Symfony application but it can be extracted (since it's mostly concepts) to most frameworks out there, even custom ones.


Link: http://programmingarehard.com/2015/03/04/structing-my-application.html

没有评论:

发表评论