What are best practices for combining PHP and Jquery?
<p>I am building a MySQL/PHP ticketing system application for a fairly big company which will possibly have between 1000-2000 users. This is my first real enterprise application and so I really want to make sure I do things properly based on best practices. I am not what you would call a seasoned developer. I know how to write code and make it work but i've never had a mentor or anyone to correct my work so I have no idea if the way I do things is good or bad... or even ass backwards. </p>

<p>We have 4 levels of access for the system and so the application needs to read these from the users session. My partner did the back end DB programming and i'm in charge of front-end interface. I've spent the last 6 months writing small tools using pure Jquery and so I have become a big fan of it, and find that I can do things really quickly with it. For interface work I love it.  However, session management can only be done in PHP afaik. </p>

<p>That's not necesarily a problem since I can include bits of JS and PHP on the same page though I prefer not to if I don't have to. For instance, my login page is just JS/HTML which makes an ajax request to a PHP login web service. Any time I can delegate processing tasks to PHP I prefer to write a service which I can use in an AJAX call. </p>

<p>If I have to deal with sessions however, I don't think i'm going to be able to do that. Or can I? I'm interested in hearing from you professionals out there on what you feel are the best practices related to this. </p>

<p>Many thanks in advance.   </p>
