Yii Framework Forum: Possible To Seperate Html/css/js With The Php? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Possible To Seperate Html/css/js With The Php? Rate Topic: -----

#1 User is offline   babonzz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 02-December 13

Posted 03 December 2013 - 04:07 AM

Hi, sorry I'm a newbie here.

I would like to ask if it's possible to create HTML/CSS/JS code and put it in views and therefore not combining any PHP code with HTML which means that data transfer to backend PHP would be from GET/POST from JS?

But if it's possible, is it a bad idea? Is the disadvantage of this is the fact that I cannot use zii widgets or etc?
0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 03 December 2013 - 04:19 AM

It's not quite clear what are you talking about.
Html and css (views) is already separated from code (controllers).

If you talking about something like building all the interface on client (ExtJS and so on) - yes, it's also possible, and I'm pretty sure I've seen a couple of Yii connectors for that.

Personally I use knockout.js widely, so all the lists are rendered from observable arrays on client-side, and communication between client and server is done via json/ajax.
God is real unless declared as integer
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users