0

I am working on a distributed project where I saw various "appendStylesheet" and "appendScripts" on headLink which were added in Bootstrap.php.

Honestly, I am not much experienced with ZF (consider few months ~ 2 projects) and personally I think, it is not "semantic". You can always append scripts via layouts or if you want flexibility as per different views, they could be called to appendStyles as every view would want (if not coded in layouts).

My question is about working "collaboratively".

Should "views" related scripts be added on bootstrap or let it do the function of routing and implementing modules, etc?

Siguza
  • 21,155
  • 6
  • 52
  • 89
Keval Domadia
  • 4,768
  • 1
  • 37
  • 64
  • Depends on your application design. You can (mis) use zend framework for whatever it pleases you. But you must stick to what the framework offers while doing so. – hakre Jul 21 '12 at 11:06
  • Well, I can access my database through controllers too but, that would not be a systematic approach when various devs are working on one project. So, my point was, even though I saw people practicing it, should it be practiced as in, have I understood the architecture as it is, (YET)? – Keval Domadia Jul 21 '12 at 11:10
  • Sure you can claim that systematically you access the database in the controllers. I do not see nothing wrong with that. And if you see people practicing something you wonder about, take the opportunity and talk to them and give them your feedback. You might get feedback, too. – hakre Jul 21 '12 at 11:12
  • I had a word with my manager regarding this. He said, different developers like placing scripts at different locations. I did speak to other other developers and they claimed with confidence that Bootstrap is 'the' file where scripts and styles should be loaded. When I asked, what about layouts? they said, 'anywhere!'. Kept me wondering :( – Keval Domadia Jul 21 '12 at 11:23
  • Normally layouts are setup in the bootstrap. Just go conform with how it's done in the project so all developers are in one boat. That's must more useful then asking around what would be better. You can find always something that is better. But just not right now. – hakre Jul 21 '12 at 11:26

1 Answers1

0

styles and scripts should be added from the layout or viewscripts. this way you can easily switch the application's "design" from one to another by simply replacing the view and public folders.

Andreas Linden
  • 12,489
  • 7
  • 51
  • 67
  • If you then mention which layout you use in the bootstrap, you are effectively configuring styles and scripts in the bootstrap. – hakre Jul 21 '12 at 13:04