Everyone says ‘sweet’! As I basically am bringing up a topic that has been discussed a lot on this forum based upon my searches into the past.
I am currently looking to take my PHP programming to the next level. I have built a lot of tools for the company I work for. The software I have written has allowed me to tie together many aspects of the company into one interface. This interface keeps expanding by leaps and bounds. I’m thinking it is about time to start looking for a more long term design pattern for the next version.
I have run into several problems when reading about the different MVC based design patterns. For one, most are mostly focused on PHP and outputting to HTML. This is practical for a basic design.
The practical design would work for me if my application stayed within the realms of PHP and HTML. I say that, because I make heavy use of JavaScript, often writing a rather large amount of my application in it, and just using PHP to work with the many different databases.
So, having explained my dilemma, I am going to propose my idea of a folder structure for my design pattern. Here it is:
- application
>controller
>model
>view
>javascript - config
- libraries
>php
>javascript - public
>images
>css - tmp
>cache
>files
There are two things which most people would notice different about it and one would be the javascript folder inside the application folder. My reasoning behind this is just as I would usually have multiple views for one page, so I would also have different javascript for each view.
Also, in the libraries folder, I made a php and javascript folder. My reasoning behind this is because I will have base classes for both php and javascript (i.e. jQuery in some cases).
I am hoping for some advice from those who have much experience in application design patterns. What are foreseeable problems here? What would you do or wouldn’t do and why?
Any and all advice would be appreciated.