Angularjs on a symfony2 application

前端 未结 15 1740
面向向阳花
面向向阳花 2020-12-12 09:55

I\'m working on a SF2 application that uses a lot of javascript on the front end.

SF2 provides me a good way of building a nice REST app, manage my database with doc

15条回答
  •  忘掉有多难
    2020-12-12 10:45

    I face the same situation, in my case, I've decided to split the client and server projects, I used symfony2 as server-side because it's simplicity and usability besides other advantages that brings to me. By other hand I created a simple HTML project with AngularJS, that is useful for me because I want to create a HTML5 Mobile App with the same client files.

    In that case, I think that the core of the problem here is in the authentication and authorization process. You must implement a secure firewall for working in REST (for example WSSE: Symfony2: How to create a custom Authentication Provider) in the server side.

    And then the corresponding implementation in the client side (AngularJS), the most useful resource that i found: Github:witoldsz/angular-http-auth.

    If you want deeper implementation with your sf2 project, you can compile AngularJS using Assetic's filters, and gain performance in page loading.

提交回复
热议问题