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.

 

 

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.