开发者

Symfony2 MVC and ExtJS4 MVC

Could someone please explain to me the correct file s开发者_StackOverflowtructure of a Symfony2 MVC and ExtJS4 MVC project? (When used together!)


Your ExtJS files should be placed in the Resource/public folder of your Bundle

YourBundle/
  Resources/
    public/
      images/
      css/
      js/
        extjs/
        app/

You can use the assets:install command-line command to install it in the web-folder afterwards. You can use Assetic thats included to the Symfony Standard Edition to take care of your JS-Files too.


Refer to the heading "Root Tree Structure" of The Definitive Guide to Symfony for the structure of an Symfony application. Quoting from the documentation:

Only the files and scripts located under the web root (the web/ directory in a symfony project) are available from the outside. The front controller scripts, images, style sheets, and JavaScript files are public. All the other files must be outside the server web root--that means they can be anywhere else.

So, you should put you ExtJS code in the web/ directory. You can have a folder structure like this:

web/
  css/
  images/
  js/
    extjs/   --> ExtJs Library
    app/     --> ExtJs MVC application
  uploads/

The app folder will contain the ExtJS MVC structure. Refer to MVC Architecture guide for the folder structure of an ExtJS MVC application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜