Lateral Code
A Web Development Blog Focused on Code and Technology
Currently Browsing: Home » Posts tagged 'php' (Page 3)
Posts Tagged ‘php’
Removing .svn Directories With PHP
By Karthik Viswanathan on Saturday, January 2nd, 2010 | Tags: php | 4 Comments »
A few days ago, Lateral Code decided to switch over to using SVN (Subversion) for WordPress. This not only is an easy way to install WordPress for new users, but it also makes it a breeze to update your version.
For those of you who aren’t familiar with Subversion, it’s a version control system. You can read more about it here.

The Invasion of .svn
Upon reinstalling WordPress with a few simple SVN commands, we noticed many .svn directories. These were located in every single section of our site’s files. Not only that, but we had also read about the dangers of keeping .svn directories in our file system earlier through Smashing Magazine.
Easily Combine JavaScript Files With JMerge
By Karthik Viswanathan on Sunday, December 27th, 2009 | Tags: javascript, php | 15 Comments »
Looking back at the 2009 year, it is evident that JavaScript has played a big role in web design. Using libraries such as jQuery and MooTools, one can easily apply advanced effects with ease. Indeed, JavaScript is now present on almost every website.

With the rise of this new beast comes a few issues. The biggest libraries out there aren’t too small in terms of code size. Each one can add significantly to load time even when minified. Another problem resides with extra HTTP requests; each new file is accompanied by an extra request. Ultimately, this once again leads directly to a larger wait for users.
Need more organization? Make a template-focused site! – Part 2
By Karthik Viswanathan on Wednesday, December 23rd, 2009 | Tags: php | No Comments »
When we last left off, our site was equipped with a simple templating system. Of course, the benefits mentioned in part 1 are not yet achieved. That’s why our venture must continue to build the ideal template-focused site.

Issue: DRY Coding
In our main processing file, index.php, you may have noticed that we don’t yet follow the DRY (don’t repeat yourself) coding paradigm. That is, when we make multiple files, parts of the page such as our navigation, sidebar, header, and footer remain constant, but our pages reuse code. For example, consider the following unordered list navigation:
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/portfolio">Portfolio</a></li>
<li><a href="/gallery">Gallery</a></li>
</ul>
Need more organization? Make a template-focused site! – Part 1
By Karthik Viswanathan on Thursday, November 26th, 2009 | Tags: htaccess, php | 2 Comments »
Have you ever had to deal with a sloppy site? Maybe it was when you were working with a client. Or could it be your own site, which you formatted poorly because of inexperience? Regardless, there is a simple yet efficient way to make your site based completely off a template. All it requires is a bit of htaccess and some PHP.

Time for some incentive
This will be a multi-part tutorial in which we explain how to completely transform your site into an organized beast. Today’s section will focus on a few lines of .htaccess that you will soon come to love. But, before we begin, let’s go over a few advantages and some incentive for creating a template-focused site.
Lateral Cache: Now you too can have a well organized cache without the work!
By Karthik Viswanathan on Saturday, October 17th, 2009 | Tags: php | 2 Comments »
In the past few weeks, I have seen many posts addressing the concept of caching. Although it may seem trivial to implement and easy to maintain for some web designers, it is certainly not something everyone is familiar with.
Problem and Solution
The large amount of tutorials have also aroused many different ways to cache. Knowing which ones work effectively can indeed lead to problems. To solve these issues, I spent some time creating a small PHP library, called Lateral Cache, that enables you to have a well organized and sturdy cache with almost no work.