Welcome Guest, Not a member yet? Register   Sign In
Create a Blog in 20 Minutes - OMG Derek!
#1

[eluser]sanjayibrahim[/eluser]
Ok, so I am totally new to codeIgnitor, and I sigh when I see so many "Create a Blog in 20...." posts for what is essentially presented as the second introductory tutorial in a first impressions introduction.

So something is not easy to follow or people are a bit silly, bit of both I'm sure, but let me try to give my experience of this tutorial by Derek Jones.

Firstly I setup and installed codeIgniter version 2.0.2, and then promptly on to "Hello World! Introduction to CodeIgniter" also by Derek. Here I had 2 main issues before I managed to complete this.

These were both in blog.php

1)
Code:
class Blog extends Controller {

should actually be...

Code:
class Blog extends CI_Controller {

2)
Code:
function Blog()
{
    parent::Controller();
}

should in fact be this...

Code:
function __construct()
{
    parent::__construct();
}

So while I may be wrong - it appears that the tutorial version and the current 2.0.2 download are incompatible. What good is this to a new person? And pointing one off to some where else just accepts the problem with the tutorial....



I'll persevere... so having eventually managed to finish the Hello World (mostly aggravated by the out-of-date material), I decided with 2 issues in the HW, I better have a read ahead and see if I can spot any issues in advance, as I was fully expecting them from the HW. And so I saw all the 20min posts.... and now I am here...

File: Autoload.php

(in the video)
Auto-load Core Classes
...
...

Code:
$autoload[‘core’] = array();
<-- this does not exist in codeIgniter 2.0.2

So in the video (no time stamp = also dumb), asking to add in,

Code:
$autoload[‘core’] = array(database);

makes no sense… Do I add this in? there is no comments section, is it superseded?



I really do plan to hammer this out and move on to the next problem (Oh I'm sure there will be one). Perhaps someone might admit the tutorial is very much out of date, create a new one - and then I'll be happy.
#2

[eluser]WanWizard[/eluser]
I think most tutorials floating around are based on v1.7.x, there were quite a few changes for v2, some structural as you have noticed.

On the upside, CodeIgniter has an excellent manual, easy to read, and detailed enough to get you started. Anyone with some PHP background and a spare afternoon should be able to write a CI application without much difficulty.
#3

[eluser]sanjayibrahim[/eluser]
Let me see if I have this straight because maybe I'm an idiot:

1) Arrive at http://codeigniter.com/
2) Click Download -> 2.0.2 -> install and setup
3) Click on VideoTutorials link (let's do some learning)
4) Now presented with a Hello World and an extending Blog tutorial
5) Ignore them both, as CodeIgniter is actively presenting a learning guide with material and information which is clearly out of date and will not work with its current download version.

...and this is ok?


How?
#4

[eluser]WanWizard[/eluser]
Did I say that?

That is definately not ok. I'm just saying that there's plenty of other material available to work from.

On a personal note: as far as I'm concerned, they should remove them. You should not start with a framework until you have mastered the language, in this case PHP. And if you know your PHP, starting with CI is a breeze.
#5

[eluser]sanjayibrahim[/eluser]
Trudging on...

[quote author="jevchance" date="1300477375"]
Here are the errata for the second video tutorial.

Instead of:
Code:
$autoload['core'] = array('database');
We need to modify the libraries array:
Code:
$autoload['libraries'] = array('database');

...[/quote]
#6

[eluser]sanjayibrahim[/eluser]
<strong>Mod Edit: Removed for language</strong>
#7

[eluser]WanWizard[/eluser]
Using that kind of language doesn't really motivate people.

You may find it arrogant, but I find it foolish to have the desire to jump into the deep end without having a clue how to swim. A framework (any framework!) is not helping you to learn a language.
If you haven't got a clue how PHP works, what classes and objects are and how PHP uses them, you're going to have a tough time understanding the framework.

On the other hand, if you know (the basics of) PHP, then the few hours needed to read the user guide is well spent, and should make you familiar with CI in no time.
#8

[eluser]sanjayibrahim[/eluser]
I have a very comfortable grasp of PHP thank you very much, it was this understanding of PHP I was intent on acquiring before I decided to look at any framework. I'm sure 2 years and a couple of bespoke CMS applications does not make me a Master, however.

Were you not to just assume I don't have any PHP knowledge - you and more so, the CI Team, might realise the dis-service they are doing to new to CodeIgniter Framework people and equally to themselves, in presenting the mess that is readily found in the first place any new person would look for information on getting coding.

Instead it's a case of:
- you got the new release
- here's the User Guide
- if you cant figure out our mess - you're an idiot.
#9

[eluser]Zero-10[/eluser]
I managed to create something insanely big without knowing any PHP and jumping into codeigniter. I was scared at first but once I got it going I managed to create an entire CMS for myself including a back-end, front-end, KB, gallery, user-submitted material, modules left and right, and learned a whole lot about security as well. To be able to say that I went from knowing nothing to creating a website that is setup in a more complicated manner than say, msn.com, I'd say that I have benefited a lot from using CI.

Yes, there were WTF moments, and I can assure you that not knowing php made this a rough trip, but the end result was worth it, even though I could have half-assed it and went with wordpress and somehow customized it the way I needed it to be. If a graphic designer who knew nothing about programming was able to do all of this on his own with nothing but a few guides on the internet, then hell, anyone can.

EDIT: Why is your username "Codeigniter Admin"?
#10

[eluser]sanjayibrahim[/eluser]
Yes many genuine congratulations to your CMS success. It is to continue to create similar applications myself more productively with a framework that I think I will soon come to love is my own reason of interest.

Although I had said I had given up on this it is not at all like me to give up so easily. See I'm kinda stubborn and I don't like to admit defeat. But WTF moments so early are disappointing, followed up with many responses like "Check the User Guide", go learn some php, and the abandoned posts of old.

I had hoped this thread could become a new to CodeIgniter, definitive 20 Min Blog helper as I didn't see one on here.

Oh, and the reason it says CodeIgniter Admin, is because they saw that I had the much needed potential to give this place the kick up the a*se it badly needs, so they bumped me immediately up to full forum admin status Smile




Theme © iAndrew 2016 - Forum software by © MyBB