Posted on 29-11-2007
Filed Under (RTech, Code efficiency, Web Development) by dotWdot

I never really understood Ruby on Rails. I had it on my list of things to do for a very long time - learn c++, ruby on rails, take bin out, but based on some Ruby on Rails developers it is a more worthy time investment than the two other options. The best thing I can see about it in conjunction with Amazon’s Web Services is the saleability. It’s like having a whole load of power there - when you need it and not when you don’t!

It claims on the website I was looking that “ruby does a lot more with a lot less code” and that its quick to dispense and integrates easily across the board.  Bold Claims but I can see that if you build a Ruby on Rails Portfolio it should work out for you, its one of those illusive less common code bases that will brighten up any cv and almost assure you a role at a Ruby on Rails Company due to the lack of professionals covering it. Unfortunately for me I will probably never get round to mastering it - because as of yet I have never found something I can’t deal with in php etc. But should I ever find the need I would probably hire rather than learn, ROR definately worth a look though if your a new developer with a bit of spare time - then when you get pro - give me a call!!

(0) Comments    Read More   
Posted on 11-10-2007
Filed Under (Code efficiency, PHP, Planning, Web Development) by dotWdot

Next in our series of strategic planning your next web venture is Functions and includes. I am speaking php, although it applies outwardly to other languages. I won’t go into this too much on the technical front but with intent to plan they are key things to note.

Let your functions carry the site - Every bit of code typed twice is wasted time, poor efficiency and essentially extra cost, to keep this to a minimal every time you have a routine operation that you think you might want to use somewhere else - stick it in a function. Those few extra clicks on your keyboard might save you 5 or 10 minutes later looking for the code snippet you need.

“Functions spitting out arrays will save you days” - if you can get all the fields from a row of data into a nice array spat out of a good efficient function it can be a very useful way of coding more efficiently!

Includes - A good place to learn organisational file structures is well established open source solutions. Get oscommerce, download phpbb, go to wordpress.org and click download, open them up - install them, read the files, check how they do it. Typically all the aspects of the file are split into individual files. So the header may be header.php, footer - footer.php - hell take a guess at ’side_bar.php’. But they are like that for good reason, splitting the site up into as many parts as possible will allow you to be versitile with your site construction - stick a menu there, and on that other page but not on the homepage. Or use a header and footer throughout the site with just two lines of code: Include (”inc_files/header.php”); Include (”inc_files/footer.php”);

By using includes that are mercilessly divided into specific uses you can be harshly efficient with your pages, including only the exact required elements, no generic bit you forgot to cut out or header processing etc.

I usually tend to run a lot of the whole website from 1 main include file also, so I will have my header.php and footer.php but I will also run maindetails.php or similar - this will allow you to set default page operations throughout the site, such as automatically generating titles, headers, feeding meta data, page monitoring, user authentication, database details etc. Although top heavy it allows you to keep the main aspects together.

As a final note when building from the ground up, or any site that has substancial amount of custom functions. Lists and changelogs are a great tool for several reasons. Getting into the programmers mindset of keeping change logs, updating field lists or function lists will save you even more time as you progress. Secondly it allows greater dispersion of responsibility - as discussed in previous planning posts, its a dull point but what would happen if you died? or less dramatically if you wanted to employ a coder to take over? without any form of lists, annotation or change log it would be a nightmare and cost stupendously more than a little bit of while you work annotation. Even if you dictate your annotation and get it typed up! So do the boring - keep lists, annotate.


If you liked this post then check out the rest of the series on programming your next e-business:

(0) Comments    Read More   
    • e-business, SEO, Internet Theory and a little Coding...


  • Blogroll