Manila Bulletin Online
Nav Bar   Fri Jul 14, 2006 Navigation Nav Bar
spacer
 
spacer
spacer
spacer
spacer
spacer
spacer



 
spacer
PHP native templating
spacer




I received this comment before that if a website is run by a custom CMS (Content Management System), chances are it will load too slow. I immediately countered that with how come there are blog software that load fast enough? In my opinion, the loading of the page will depend on your code and the queries you choose.

 

For example, if the path you choose to separate the design and programming is by using a flat file containing HTML (Hyper-text Mark-up Language) and you assign a certain string for a certain variable, then that will load fast only if it will involve a single flat file; but if you will need to use a loop and display data and still use the flat file to give the user some control on the way the data is displayed, then that will hurt because that will take a lot of time to load. .

 

On the other hand, you can use another PHP file as a template giving the user more than just displaying data, such as formatting the data, using the native functions of PHP.  If you try both methods then you’ll see the big difference between the loading time of using a flat file and using another PHP file as a template.

 

I use the first one that I mentioned and that’s the reason why the main page of my blog loads too slow; but once you are able to view the main page and try to view internal pages then you’ll notice that the page loads faster and you don’t have to wait. I never noticed that until I subscribed to DSL. 

 

And due to that problem I encountered with the first method, I discover the second method which is by far better than the first method.  Lesson learned: using a flat file in combination with a database is not a good idea because it will take some time to load. So, if you want to give the user more freedom to design their layout then you can create methods that will include a specific template.

 

For example, to load the header to another template you can create function that includes the header template. The same applies with the footer and the rest. The next thing that you should do is assign which file should be used in displaying the header, the footer and the main content.

 

Try the two methods I mentioned above yourself and let me know the result of your experiment. Your comments and suggestions are welcome; please send them to albert.tagaban@gmail.com or you can also post a comment on my blog at http://www.alberttagaban.com or at http://www.pinoyprogrammer.com

  

Printer Friendly Version spacer Email to a friend
 

spacer
OTHER TECHNEWS NEWS
spacer
spacer
spacer
spacer
 

spacer




HOME | SUBSCRIBE | ADVERTISE | CONTACT US | SEARCH | ARCHIVE | FEEDBACK

FEATURES: MB WAP | MB Mobile Edition | Desktop Headlines

SECTIONS: MAIN NEWS | BUSINESS | OPINION & EDITORIAL | SPORTS | YOUTH & CAMPUS | ENTERTAINMENT | AGRICULTURE | INFOTECH | HEALTH | TOURISM | SOCIETY | METRO & NATIONAL NEWS | PROVINCIAL NEWS | D R I V E | SCHOOLS, COLLEGES AND UNIVERSITIES | WELL-BEING | TECHNEWS | TASTE | WEDDINGS | I | BOARD PASSERS | MOMS AND BABIES | 

LINKS: PHILIPPINE PANORAMA | TEMPO | CLASSIFIED ADS ONLINE | USER PRIVACY POLICY

Copyright © 2001-2005, Manila Bulletin. All Rights Reserved.

designed and developed by
Alchemy Solutions