I made an application in EXTJS, but my technical architect and project manager say we don't want big file, so removed the EXTJS and made in object oriented PHP and JavaScript code, mixing HTML with PHP.But I don't want to mix HTML and PHP because of bad coding structure and bad coding practice.What should i do?
How to not mix HTML with PHP?
php;architecture;coding standards;coding style
You will always have to mix HTML and PHP. Otherwise, how will you fetch dynamic data?This is how I do it. Let's assume this is index.php file:<?php  include_once('some.file.php'); // Here you have general functions, classes etc.   $result = getSomeResult();?><html><head>  <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js?ver=1.4.3 type=text/javascript></script>  <script src=js/some_js_script.js  type=text/javascript></script></head><body>  Let's output some data gotten from PHP: <br />  <? echo $result;?></body></html>Now, let's assume the result data is a text box with a button. Clicking this button, you trigger a JSON or EXTJS call. This call will load some more data based on the parameters you pass in. We call this file java.js:jQuery('#button').click(function(){        jQuery.post(http://yoursite.com/include/jquery.php, { var1: 'some value', var2 : 'some more value'},        function(data)        {            jQuery('#text_box').html(new content:  + data);        },json);  });And as Evan says, load libraries from Google rather than from local server. This will speed up loading time.You should also have a look at Wordpress if you are in need of using a CMS / templates.