3

I am becoming addicted to Symfony's separation of concerns, and I'd like to extend this philosophy to my Javascript. I am finding the view layers in my projects to be very reasonable divisions for related Javascript functionality.

What's the best way to organize & separate my Javascript? Ideally, I'd like to be able to add view-specific Javascript. I'm almost certain embedding the JS directly into the template is bad practice. I also know that adding a new script tag in each view is costly to the client.

What's the correct approach here?

1 Answer 1

1

You can find some documentation about assetic and asset management. If you were able to quickly pick up the templating structure then this documentation is definitely for you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.