Page 1 of 2
Project concept needs some advice
Posted: Mon Jun 29, 2009 3:49 pm
by Jammerious
Hello there,
I'm new here and I'd like to hear some opinion on which existing libraries/APIs/etc. could I use in my relatively complex "hobby" project.
I am investing some time to realise an idea I had for a while now. Now, before jumping right into coding, I have already done some planning with a notation that I made up
At this point I need some advice from any experienced fellows.
OpenID: is there a tendency that regular users would use such a feature and is it pretty straightforward to implement?
Smarty: Groups should be able to make templates for their "channels". Is this the best approach? The rest of the front-end will be modest and most probably would not be "heavy-duty" templatable. Are there disadvantages in using Smarty on a traffic heavy site? Should I rather make prefabricated page layouts for them to choose and just let them CSS the hell out of it (I reckon only the serious groups would venture into a custom design, so maybe there could be some quality assurance done by the moderators).
I have more questions but I don't want to overwhelm you.

Thanks.
Re: Project concept needs some advice
Posted: Mon Jun 29, 2009 4:28 pm
by Christopher
I would recommend you start simple, which means no OpenID because it is fairly complex. I would recommend against Smarty if you want users to add formatting -- maybe bbcode or something might be more reasonable to start with. And I might suggest downloading the CodeIgniter or Cake frameworks and see if you can get them to work. That might save you some time.
Re: Project concept needs some advice
Posted: Mon Jun 29, 2009 6:02 pm
by Jammerious
arborint, yes I misunderstood the Smarty way, it wouldn't be acceptable to have groups doing the html template with the pseudocode and entire html tree.
Maybe this even won't happen - I don't want this ending up looking like myspace
About the frameworks - I see the great advantage to have all of the main control classes already done and ready to use.
However, is it wrong to say that every developer should do the actual coding (and troubleshooting

) at least once?
I might regret this, but I am going for the harder (fun?) way =)
Re: Project concept needs some advice
Posted: Mon Jun 29, 2009 7:06 pm
by Christopher
Jammerious wrote:About the frameworks - I see the great advantage to have all of the main control classes already done and ready to use.
However, is it wrong to say that every developer should do the actual coding (and troubleshooting

) at least once?
I might regret this, but I am going for the harder (fun?) way =)
That's really a personal choice. There are some here who place the personal experience of programming before the result created; others say the result it more important and that your experience is less important or going to happen anyway.
Here is the difference -- If you build everything from scratch from the beginning you will do it wrong several times and the code will slowly improve. If you use a framework you will do it a right way, but that may not the way you ultimately want to do things. So maybe it depends on how you learn? For the record, both ways are hard if you want to be a good programmer.
Re: Project concept needs some advice
Posted: Sun Jul 05, 2009 4:07 pm
by Jammerious
Hello again,
I had a question whether I should dig into mysqli, but now I realised it would be unwise not to (and not only because of the below)
Meanwhile, I've read this
zend article on mysqli...
But this is the part that makes me wonder:
The data for the query does not need to be passed through a function like mysql_real_escape_string() to ensure that no SQL injection attacks[4] occur. Instead, the MySQL client and server work together to ensure that the sent data is handled safely when it is combined with the prepared statement.
Can I or should I really forget about sanitizing input for insertion into DB, while using mysqli and it's prepare function?

(Validation of course still stands.)
Re: Project concept needs some advice
Posted: Sun Jul 05, 2009 7:02 pm
by Christopher
If you are using prepared statements then you don't need to escape the vars yourself. They will be escaped with the prepared statement is executed. If you are thinking about using mysqli, I would recommend just using PDO which also has prepared statements. It is an improvement over mysqli and even more generalized.
Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 6:27 am
by kaisellgren
Jammerious wrote:is it wrong to say that every developer should do the actual coding (and troubleshooting

) at least once?
I think it would be wrong to say so. It's like saying a game programmer should be able to program DirectX or OpenGL and just being able to use and take the advantage of them is not "enough" to be a game programmer.
Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 8:21 am
by Jammerious
I think you know you can't really compare the two...
DirectX = server php module
Game engine = php framework
As arborint said, it's a matter of perspective. However, I don't believe that learning and writing code is inferior to using something someone else has written.
If that was the case, why would one even bother at such a low level with frameworks, he would rather just install Joomla or Wordpress and browse the interwebz hoping that someone will write a module that he needs
arborint,
thank you, I looked it up and will be trying it out later today.

Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 8:38 am
by kaisellgren
Jammerious wrote:I think you know you can't really compare the two...
I know they are quite different. A game developer isn't a software developer.
Jammerious wrote:why would one even bother at such a low level with frameworks, he would rather just install Joomla or Wordpress
If you want something that WP or Joomla! can't do. They are good for the masses and that's pretty much their purpose.
It's a good idea to understand how things work, but in my opinion that is not necessary in order to be considered as a developer.
I don't believe that learning and writing code is inferior to using something someone else has written.
Yeah, you would be more experienced if you know what actually happens when you use some libraries or frameworks. I guess it really depends on what has to be done or what the developer is supposed to do/understand. If he just needs to get the job done, then he could use libraries and frameworks as much as he wants basically.
Anyway, knowledge won't hurt and I personally want to understand things up to the network stack level.
Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 8:59 am
by Jammerious
Well I could say I see your point, as to what makes a developer. Thank you for your insight.
Kind of missed that you were not convincing me either way, you just had a remark about that statement.

Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 9:01 am
by kaisellgren
We would need to define a "developer". I have always thought of the word as someone who gets things done and not as someone who understand everything. If you want to be an expert, for instance, you would need to know more about the inner workings. At least that's what I feel when I see those words, but I am by no means an English linguistics or history professor.
Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 11:59 am
by Christopher
Jammerious wrote:As arborint said, it's a matter of perspective.
Maybe call it "perspective" but maybe "personality" or "ego" would be better terms.
Jammerious wrote:However, I don't believe that learning and writing code is inferior to using something someone else has written.
If that was the case, why would one even bother at such a low level with frameworks, he would rather just install Joomla or Wordpress and browse the interwebz hoping that someone will write a module that he needs

I think in many cases that is exactly what programmers should do. You can often make more money per project and do more projects if you are able to use something like Joomla or Wordpress. So I think first considering a prebuilt option is a good one. Unless programming is a hobby...
Jammerious wrote:arborint,
thank you, I looked it up and will be trying it out later today.

Good. Let us know what you decided...

Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 5:42 pm
by Jammerious
It's kind of hard to decide since it seems PDO is a good learning/skill investment (due to code portability it's surely the right choice for lots of folks), but some write that mysqli is faster and easier to write and troubleshoot... This project however is a... how do you name them... well it's a "community project support" site, one of a kind and not for distribution, and being on LAMP...
Here's a good article:
http://dealnews.com/developers/php-mysql.html (just noticed it was later found that PDO is equally fast... damn)
Another from Sun:
http://developers.sun.com/databases/art ... _php3.html
PDO or mysqli...

Re: Project concept needs some advice
Posted: Mon Jul 06, 2009 5:56 pm
by Christopher
Jammerious wrote:PDO or mysqli...

Again, I would recommend PDO. It performs as well, has the same feature set, is more widely used, and supports multiple databases.
Re: Project concept needs some advice
Posted: Tue Jul 07, 2009 8:32 am
by Jammerious
Very well, with kind people like you guys I am surely going to find some help if need be.
