DNS and Nameservers

DNS is obviously a very important component of the Internet. Many people understand DNS works much like a phone book, where finding a phone number for a person requires looking for their name in an alphabetical list and then using the number adjacent.

Read the rest of the post…

Easy 'Under Construction' pages for SilverStripe sites

For if you've ever been in the situation where you've developed a SilverStripe site for a client and now they want to review it before making it live - but you don't have a staging server set up. What you usually want to do is give the client full access to their website, but prevent the public from viewing the unfinished product. [ad#Half Banner] This simple technique is perfect for those situations. It lets you deliver a static HTML 'Under Construction' page to the general public, but if an admin user is logged in, the 'Under Construction' page disappears and the admin user can browse the site as normal. Additionally the 'Under Construction' page is served up with a 503 - Service Unavailable HTTP response status code.

Read the rest of the post…

Posting invalid form data in SilverStripe unit tests

By default posting form data from a SilverStripe unit test seems to restrict your POST data to only valid values. Meaning, if you want to post a value for a select field on the form, the value must be in the options for that select field in order for it to be POST'd. [ad#Half Banner] Usually when submitting form data from a unit test its easiest to use the FunctionalTest->submitForm() function with something like:

Read the rest of the post…

Speed up SilverStripe Unit Testing with SQLite

Unit testing can be a useful process to kill those pesky bugs, luckily with SilverStripe its relatively easy to get started unit testing. Running a test can take some time though, a great way of speeding up unit testing (as pointed out to me by Will Rossiter on the IRC channel) is to use the SQLite3 module by Andreas Piening. [ad#Half Banner] Installation is pretty straight forward, so that only your unit tests use the SQLite database you can hack up the config file a bit:

Read the rest of the post…

1 2 3 4 5 6 7 8 9