简体   繁体   中英

Do common PHP frameworks have compatibility issues with front end frameworks?

Are there any reasons that PHP frameworks such as Laravel or Zend can not or should not be used with front-end frameworks such as Foundation or Bootstrap? Or any particular pitfalls/gotchas to be aware of?

Our site doesn't use frameworks of any kind at the moment but I'm keen to adopt both for scalability and ease of maintenance. Is there any best practice advice anyone can provide on the order adoption should take place in (eg always do the back-end framework first, followed by the front-end) or should the separation between the two layers be clean enough that the order shouldn't matter?

Most of the tutorials you find with Laravel (and other frameworks) like to spice them up a bit and will use Boostrap or similar, so there is certainly a good body of work out there showing using a PHP and CSS/js framework in the same project.

PHP frameworks typically have some mechanism for asset management which makes dealing with multiple css or js libraries much easier. Also, Laravel, for instance, has template objects and methods for making forms ( Form::open for instance) but also recognize that adding CSS classes to these objects is vital for a good UX for your app. So they include extra parameters that allow you to put class="" to accommodate your front end framework.

As mentioned above, there are packages for some Frameworks that add helpers and custom classes that make this even easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM