Laravel generates a system fast

Today I showed off a task management and time tracking system I’ve been working on this week. The system isn’t unique or marketable, but simply meets the organisations needs without incurring a monthly fee – as so many systems do nowadays.
Not only did my co-workers and managers think it was a great system, they also were astounded at how quickly I’d produced a fully functioning system. The answer is with Laravel, generators and Twitter Bootstrap.

Laravel

There are so many good frameworks out there today that nobody should ever code anything in straight PHP. When you use a framework, you have access to code libraries that take care of the basic functions of a web application – routing, security, authentication, database abstraction and more – for you, better than you would handle them yourself. I’ve found Laravel to be an exceptionally easy framework to use.

My application didn’t need to focus on authenticating users, writing SQL statements, dealing with URLs and fighting cross-site scripting and SQL injection. I just got on with the business logic of my application.

http://laravel.com/

Generators

Whilst Laravel itself does not come with particularly powerful code generation – perhaps that’s not in the scope of a framework – Jeffrey Way has developed an outstanding set of generators for the Artisan command line interface. These generators help you develop anything from a simple database migration to a model to a whole set of code to support an object. Say I have an application to manage pets. Generate a pet scaffold with the generators and you’ve got a database migration, a model, a controller and a set of views. Everything you need to get started developing and avoid time-wasting boilerplate writing.

Knowing the objects I needed to work with, I simply generated all the scaffolds and then got to work coding the specifics.

https://github.com/JeffreyWay/Laravel-4-Generators

Twitter Bootstrap

I am not a designer. I don’t want to spend my time designing. I used to create really ugly admin panels. Not any more. Twitter Bootstrap allows you to create a beautiful user interface without trying. Just include the CSS and JS files in your source, and use the CSS classes to style your application. It even comes with an awesome icon font to give you lovely buttons instead of ugly links for your actions.

http://getbootstrap.com/

With these three tools, I could develop an application extremely fast, yet develop code that won’t have the next developer hunting me down for revenge.

 

 

Adding a Boolean Toggle to a grid in Joomla admin

Joomla has a fantastic tutorial on MVC components on it’s website, but it seems to stop way short of explaining how to make a fully featured admin panel.

One of the features it doesn’t seem to explain well is how to add those little green ticks and red circles that you can click and it changes (toggles) from one to the other.

Joomla Demo - Administration - Google Chrome_2013-04-30_16-55-57

I like to use it for chosing if an item will appear on the front page or not – but I’m sure you could think of other uses for it. Joomla also has a built in ‘Published’ button which is a bit simpler, so I’ll start from that and move on up.

Hadrian’s wall

DSC03472

This is the second weekend in a row we’ve managed to get out and explore the beauty of the world around us, and I’m loving where God has placed us in the world. We walked along a picturesque section of Hadrian’s wall – like the Great wall of China, but not quite as great. It was built with much the same purpose: to keep out the northern barbarians – in this case the Scots.

Invisible roadworks

2013-02-09 16.35.08

In Australia roadworks were traditionally done by the local council, and though for many years it has been subcontracted out to private companies there is still a general image of ‘council workers’ who dress in reflective gear and sit by the roadside smoking cigarettes. I’ve discovered recently that it’s the same in England – except for the name.

All around the world I have seen this same phenomenon. I can’t imagine why the government needs to install traffic cones along a 3 mile stretch of the motorway where there is no appearance of any work being done or any damage to the road. Do they just do it for fun?

I decided that I needed to look this up on the web. The Highways Agency twitter account mentioned the closed lane:

#M6 northbound between J39 and J40 | Lane(s) blocked http://bit.ly/sutXS1

Still, I found it very difficult to find out WHY the lanes were blocked – as the highways agency doesn’t allow you to search in the past (though it’s helpful for the future – http://www.trafficengland.com/disruptions.aspx)

Eventually I found this on a cached version of the advanced driving website:

http://www.advanced-driving.co.uk/traffic-reports/north-west-england/

M6 northbound between J39 and J40 | Northbound | Resurfacing

On the M6 northbound between junctions J39 and J40, minor delays can be expected at peak times due to carriageway resurfacing , between 8 pm and 6 am, from 5 February 2013 to 8 February 2013.

I passed through on the 9th of February, so I guess they finished the job and decided to leave the cones in place one more day (or more!). Oh well.

Yesterday I saw some guys doing works on the road while there was snow coming down and wind blowing it everywhere, so I guess that kind of makes up for it.

Transformed

Untitled 2On Monday I launched the newest revision of the Transform website http://www.transform.om.org/. This is the first website I’ve created by using wordpress – and it’s not half bad looking. I was really surprised at how swish a website can look with the right themes and customisation – and a few plugins.

Here is a look at the website itself. The fairly wide image in the middle is a slideshow with 5 images that take you to some of the site’s pages for more information – and the last slide is a link to a youtube video that opens up in a pretty lightbox and plays right away. That’s pretty cool. This is all part of the theme I used called ‘Duotive’.

Untitled

The website can be viewed in several different languages such as French, Italian and even Korean – thanks to a fantastic plugin called qtranslate. All the links have a 2-letter language code somewhere in the URL to keep the language. Personally I would have prefered a cookie or a session variable, but this seems to work fine.

Untitled 6

It also pulls all of the short term missions opportunities for Transform participants into the website. The best part of this is that the options change depending on which country you are from – so with geoip country detection, the options are correct for your country and your currency. I used a simple rss feed reader and customised the code pretty heavily for this.

Untitled 3

The gallery is also pretty swish. The videos are hosted by OMNItube – something I’ve helped work on at OMNIvision for a while now – the advantage being no ads. The picture gallery is a part of the theme again, with nice lightboxes. The second video has subtitles based on the language you are viewing the site in, but this is just done with seperate videos at the moment.

Untitled 4

 

Lastly the prayer map is pretty cool. You click on one of the Mediterranean countries and it gives you a short bio with links to full information and how to pray for the country.

I’ve had some ups and downs with the website. The contact form that comes with the theme has no anti-spam protection so the owners got spammed as soon as it went online. Of course there’s always a better plugin available so I just dropped one in and the problem is solved. All in all, wordpress is a great CMS for simple and complex websites – there’s no reason to waste time with Joomla.

Photographing a walk in the woods

I was delighted yesterday to go for a walk in one of the most beautiful places I’ve ever been. Aira Force is a waterfall in the Lake District in the North of England. I must say it was breathtaking. A great way to spend a Saturday afternoon.

VLUU P1200  / Samsung P1200

I would have taken my Sony DHC-HX1 semi pro camera on such an excursion but – as so often happens – I pulled it out of the case to find it had no charge left. I guess you just need to leave the battery on trickle-charge and take it out when you want to use it.

Anyway I ended up taking a lot of photos with my Galaxy S3. I’ve never been a fan of smartphone cameras for hobby photography, but to be honest taking photos with this phone was really fun. The colour reproduction and lighting were fantastic, and the camera is so clever that you barely have to touch the controls. Yes, I missed having 20x optical zoom (the S3 has nothing) but there was plenty to take in without zoom.

 

20130209_150522

20130209_152552

One design flaw I’ve found about Android phones is that whilst there is now a shortcut to the camera on the lock screen, launching it still requires you to unlock the phone to use it – I believe the iPhone 5 allows you to use the camera without unlocking the phone – this means my wife is already taking photos of that amazing thing while I’m still fiddling with my phone.

But, why complain? The S3 did a fantastic job and meant I didn’t have to haul around my big camera on such a lovely expedition.

20130209_151153

Start here

I’ve decided to re-start my own personal blog page so that I can write about cool things that I discover, hacks that I figure out and problems that I solve. Also I’ll probably complain about lots of little amusing things. This blog will be less ministry-update-dinner and more random-thoughts-and-ideas. My wife and I will still maintain our ministry blog at http://www.youngfam.net/ weekly and we encourage you to read it to stay up do date with what God is doing in our lives here in Carlisle.

Setting up

So we’ve been here in Carlisle for just over two weeks now and we’re almost all settled in. We are so very thankful for the gifts that people have given us towards setting up a new home together. Every time I cut up vegetables I am thankful for sharp knives and nice (colour coded!) chopping boards. We love the concept of being able to store things in places other than our bedroom for once! One important part of setting up a home happened just last night – we finally got our new book-cases. Ruth had lots of fun putting out all her books on display, and I must say they look great. And don’t worry, I’ve set up the TV and Wii so we’re all set there!

But we’ve had little time to sit at home and play with our toys because we are already hard at work at OM. With the TeenStreet conference in Germany happening this month, Ruth has been planning a whole kid’s program and I have been training in the use of some pretty crazy sophisticated equipment. It is going to be a hectic two weeks so please pray for us as we go on this adventure together.

We’re married!

Yes, Ruth and I finally tied the knot on the 9th of June 2012 at Northchurch Baptist Church, Berkhamsted, England. We had a magnificent day that (save for a slight delay) turned out just the way we planned. The sun even made an appearance in the afternoon and there was an especially beautiful sunset to end the day. You can see lots of photos of the big day on our facebook pages.

We had a lovely relaxing honeymoon in tropical north Queensland, Australia before heading to Australia for a whole second wedding and reception! It was lovely to celebrate again with the people who are special to me, and who had already met Ruth and encouraged us on our journey together. It was also a time for last goodbyes as we flew back to the UK two days later!

We’ve been very busy setting up our new home in Carlisle, UK and we will have some photos for you to see soon. We’ve also started work already as volunteers for Operation Mobilisation – Ruth is working with families in the mission field and I am working with a multimedia ministry called OMNIvision. Between our day jobs, setting up a home, getting over jetlag and getting used to each other – we’re quite drained – so please pray for energy and grace for one another.

Counting the days

June 9th 1:30pm BST / 10:30pm EST

It’s only 9 days now until Ruth and I tie the knot here in Berkhamsted, England. We’re both super excited and thankful we can count the days on our fingers now. Everything seems to be coming together quite well for us as far as wedding planning and preparing for the future.

We will be broadcasting the wedding live over the internet from our church streaming channel:
http://www.ustream.tv/channel/northchurch-baptist-broadcast
Note that this is not going to be a television worthy production, but you will be able to see and hear all the essentials if you want to stay up till 10:30pm EST. You can see another wedding has been recorded as ours will be to get an idea of the quality of coverage – though our ceremony will be quite different!

Ruth and I have been going through The Marriage Preparation Course by the makers of Alpha with our pastor and would happily recommend the course to new couples. http://relationshipcentral.org/marriage-preparation-course

Our first couple of months in Carlisle seem to be shaping up as well. We have both been selected to be involved in TeenStreet - a huge Christian event challenging teenagers to live for Christ – in July and we have both been recruited for the Go conference – where new missionaries come to be equipped before going out into the world. I will be doing audio visual and Ruth will be looking after kids and consulting with families entering the mission field.

We can hardly wait for our new life to begin. We are seeing God’s provision for us every day in having enough money to buy food and bus tickets, to the big things like wedding rings and houses. Ruth’s monthly support income is almost at 100% – we are just seeking God for another £100 – £200. She is also looking for part time teaching work to give us enough to live on. If she is unable to find enough work, my monthly support will need to increase by up to $600 per month to give us spending money for things like groceries and public transport. Please continue to pray that the rest of the figures add up and we can begin serving God without being a burden to the organisation we go with.