Welcome Guest, Not a member yet? Register   Sign In
Any plans for CI and JS frameworks?
#11

[eluser]Nick Husher[/eluser]
++lifewithryan

My personal preference for JS frameworks is YUI, which puts me in a small minority of web developers. I'd rather CI be JS-agnostic so that I wouldn't have to go through the pain of plucking out or modifying any JS hooks that were specific to a particular frontend architecture. The Unix philosophy is to do something very simple and do it very well--look at tar or grep for example--and I'd prefer CI stay true to that philosophy as much as possible.
#12

[eluser]Crafter[/eluser]
If you are talking about using little JS utility functions, then sure it is might be possible to embed JS code within some CI library.

However, when you start talking about a JS framework, it starts become near impossible to join the two. Take the YUI framework and CI for example. Your entire YUI front end must be coded in JavaScript, and calls made to the server

This throws the entire MVS paradigm from the traditional form into disarray. Now, the front end must be designed to run totally on the browser, instead of being generated on the server to be displayed on the browser. So you are looking at a Client-Server type application architecture, or a services approach to designing your application. Your design process will therefore shift to code that will operate on two different execution platforms (your browser, and the server).

You might have to modify your CI application to serve JSON and XML instead of HTML code, but joining them you should not.
#13

[eluser]Edemilson Lima[/eluser]
Well, I am spreading CI... Smile

http://extjs.com/forum/showthread.php?t=24395
#14

[eluser]Phil Sturgeon[/eluser]
[quote author="xwero" date="1201279218"]you have to use the php header function, it should do his work
Code:
class Somecontroller extends controller
{
   // constructor
   function Mypage()
   {
     header('Content-type: text/xml');
     $this->load->view('xmlview');
   }
}
The standard type is text/html[/quote]

Actually you want to use:

Code:
class Somecontroller extends controller
{
   // constructor
   function Mypage()
   {
     $this->output->set_header('Content-type: text/xml');
     $this->load->view('xmlview');
   }
}

Now output will not be affected!




Theme © iAndrew 2016 - Forum software by © MyBB