Hello everyone,

I just started to use phalconphp 1.3.1 for an app for my studies' master thesis. Isnt totally developed but I'm working on the CRUD for the moment, so after have some functionality and the UI working I dediced to start to introduce this amazing framework. I'm was new on web development, MVC and ORM patterns till I started this thesis. It's first time I use template engines as well. For now I'm succesfull porting all, but I'm affraid that I'm not doing it in the right way. I started adding my code to the phalcon bootstrap created with the dev tools. Now I start with the questions:

1º- As is a web app that In the future I'll wrap with phonegapp, I'm using ajax load function, to don't load all the menu and libraries every time that the id = "content"change. For this I use $('#content').load(); for the content and historyjs functions to change the url. I didnt do any change to the original code appart of configure on Nginx the clean urls as

try_files $uri $uri/ /index.php?_url=$uri&$args;

In the documentation shows different way of using ajax, so I'm affraid that I shouldnt be using this way, breaking somehow the MVC pattern.

2º-Related with this I add to the ajax dinamically load url a variable ?header=yes that indicates me to just load the content. So for this in every controller, in the indexActions I do:

$header = filter_input(INPUT_GET, 'header');

$this->view->setVar("header",$header);

And after I just check with volt the variable. Is it the right way? I thought to do all with volt but I haven't found how to .

3º-Also, because the menu is common to everypage, in the main index.volt(in the folder view) I include the menu depending on the variable. Is it ok as well? Or should I move it to the different views?

4º-Because of 1º, I made my own click functions where I push a new url and load the content, once again I'm affraid I'm breaking good practices of phalcon.

5º-The js/html part is in plain code for now, I just replace the php part with volt syntax. Should I replace as well code like

<link href="../css/cambios.css" rel="stylesheet"/>

For its volt syntax?

I would like you to clarify me and give suggestions in case of need of how to change it. Thankyou.