A comment on Reddit (by raygundan) points out an interesting technique Apple uses on their iOS platform: when you switch apps, the device saves a screenshot of what the last screen looks like for that app so that when you switch back again, that saved screenshot is the first thing you see. This is done to buy time for the app to fully load. Instead of showing you a blank screen or a loading screen, the device shows you a screenshot of the app. This technique works because the time it takes to load the rest of the app isn’t very long anyway, so a second of showing a screenshot that the user cannot interact with doesn’t cause confusion. What it does do is make it looks as if the app has loaded instantly, which results in a very good experience for the user.
I think this is a brilliant idea. It seems we live in a world full of loading gifs and I appreciate fine details like this. The fine details that you don’t see is the difference between mediocre and extraordinary.
A simple Laravel bundle to display your log files via the browser.
php artisan bundle:install logviewer
php artisan bundle:publish logviewer
Then edit your application/bundles.php file and add:
return array( 'logviewer' => array( 'location' => 'logviewer', 'handles' => 'logviewer' ) );
You can clone the repo by running the code below:
$ git clone git://github.com/ericbarnes/Laravel-Log-Viewer
Or visit the GitHub Repo.
Since starting at UserScape I have been tasked with building a new bundle application for the Laravel framework. So far all the work has been done “behind the scenes” but I wanted to share a few screenshots of what I have completed so far.
This is a temporary home page which showcases the latest and the most popular. Currently the most popular will be determined by number of installs but I have some ideas for better stats and filtering that will come later.
This is the grid list. I tried keeping it simple so you can quickly scan the titles and also show each users gravatar for branding.
I am really happy with what I have completed so far and it should be a simple and effective way for users of the framework to find pre-built code to put in their applications.
If you are interested in seeing how to create a bundle check out Taylor’s Videos
A nice and simple flat file markdown based blog application built by Ian Landsman for use on his site. The description says:
I built this to run ianlandsman.com over a weekend :) It may not work for you. I’m posting it up in case anyone else may find it useful. It might also be useful to those interested in working with the PHP Laravel framework.
Although he states it isn’t complete yet from my tests it works like it supposed to but still missing a few small features. I like the setup and the use of the command line to publish the posts and clear the cache.
This week I had the privilege of doing load testing on an aws setup. The goal of the test was to support 25k concurrent users and was designed to ramp up over a period of a few minutes. The first round of testing failed pretty quick and I only had a select number of large queries cached. So the db spiked and was the bottle neck. During that test we was only able to reach 10k concurrents.
For the second round of testing I decided to just setup output caching before I even loaded the db in a MY_Controller. I set the number of minutes to something relatively high and was ready to commence the load test. Unfortunately this test maxed out the db again and I was honestly scratching my head on just why that would be the case.
Since this didn’t make any sense to me I decided I better figure just what is going on. I got my local system setup the exact same way, enabled mysql query log, and then proceded to test and see what was going on. Queries was being ran even after the cache file was written. At this point it was way late so I decided I better sleep on it and try and think about what I was missing.
The next morning I got to work ran the same tests and got the same results. Starting researching and then realized it was just my ajax calls that was generating the queries. This had me puzzled because the ajax controller extended the MY_Controller so it should be cached as well. Turns out I was wrong and missed the most important note in the user guide:
Warning: Because of the way CodeIgniter stores content for output, caching will only work if you are generating display for your controller with a view.
The more I thought about it the more sense that makes since the Loader ties into the output library but I wasn’t thinking clearly at 3am. Looked at my ajax controller and sure enough I was just returning a json string.
The quick fix was to change the return to the following:
My hope is this will help others if they ever run into the same situation. Unfortunately the load testing was only scheduled for two rounds but I feel confident by fixing that it would have passed with flying colors.
So the moral of the story. READ THE MANUAL :-)