Sonic and Sega Retro Message Board: The present and near future in web development - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

The present and near future in web development Or: What's hot in PHP?

#1 User is offline ICEknight 

Posted 26 March 2012 - 08:08 AM

  • Posts: 8898
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
I normally use CodeIgniter for PHP coding, but as of late I've been noticing that many of the stuff I find myself coding by hand might be easier to do when using one of the existand CMSs around. So, when thinking about possible personal and professional future projects, a question came to mind:

As of 2012, what's the best way of coding a PHP site that could get as big and complicated as it can get?



I wouldn't be aiming for a small blog, but for something that could be expanded as much as it keeps evolving into, while still having the possibility of having total control over what happens.

Are CMSs really the future in web development, rendering frameworks like CodeIgniter useless? Do Drupal and Joomla really have such a slow performance as it's been constantly said in the past?



Please, do share your experiences in PHP coding here.
This post has been edited by ICEknight: 26 March 2012 - 11:35 AM

#2 User is offline Calamity James 

Posted 30 March 2012 - 04:50 AM

  • Toot Toot Sonic Warrior
  • Posts: 76
  • Joined: 05-February 10
  • Gender:Male
  • Location:Maidstone, Kent
  • Project:Paying customs charges from Japan ¬_¬
  • Wiki edits:4
Late reply, but it piqued my interest so I thought I'd post my 2 cents.

I'm still really not a fan of off-the-shelf CMS systems like Joomla etc, because I find them inherently harder to develop additional features for when compared to things I've coded myself.

At work myself and another dev are currently developing our own 'framework' if you will with features that can be added/removed such as CMS, online shopping, time management, restaurant menus etc.

It's literally just PHP and Twig, but the simple nature of it makes it so easy to develop for, and because we did it from the ground up, we know it inside out. I'm a firm believer than home-grown code is best, provided it's written well :)

#3 User is offline ICEknight 

Posted 30 March 2012 - 07:50 PM

  • Posts: 8898
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
Well, that's also what we're currently doing where I work, but after all the troubles we're going through, I can't help but thinking that all the hard work might be just for making a CRM that almost manages to do the same stuff as those I mentioned.


It feels like trying to make your own SDK for a gaming console instead of getting the official (and more polished) one. I mean, these are open source and being constantly improved and tested by thousands of professionals around the world, after all... right? So they might be worth adapting to, or perhaps they're too inefficient and give too many problems?


I wouldn't care about being able to sell the new CMS, because I'm just assisting the main programmer and I wouldn't get a dime for it, so I'd like to know what would be best for at least some of my future projects, for which I'd need a "solid" foundation.



By the way, perhaps this should be moved to Technical Discussion... EDIT: Thanks.
This post has been edited by ICEknight: 31 March 2012 - 05:06 PM

#4 User is offline Elratauru 

Posted 31 March 2012 - 09:25 AM

  • Oooh Shiny stuff! don't touch it >:(
  • Posts: 957
  • Joined: 13-April 08
  • Gender:Male
  • Location:Montevideo, Uruguay
  • Project:Web Developing Stuff! :P
  • Wiki edits:132
Indeed, I like to create php from scratch but I must admit that I love Wordpress too. Joomla is cool, but way to messy and heavy to me.

Remember that when creating a cms from scratch the most important part is its security. You don't want people messing with the sites db's easily after all. Be careful when using forms and I'd recommend using MySQLi for stuff.

#5 User is offline Miles Prower 

Posted 31 March 2012 - 02:18 PM

  • Renard
  • Posts: 635
  • Joined: 25-January 03
  • Gender:Male
  • Project:HRA
  • Wiki edits:1
Something akin to CakePHP maybe?

#6 User is offline ICEknight 

Posted 31 March 2012 - 05:09 PM

  • Posts: 8898
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18

View PostElratauru, on 31 March 2012 - 09:25 AM, said:

Indeed, I like to create php from scratch but I must admit that I love Wordpress too. Joomla is cool, but way to messy and heavy to me.

Remember that when creating a cms from scratch the most important part is its security. You don't want people messing with the sites db's easily after all. Be careful when using forms and I'd recommend using MySQLi for stuff.

Well, we're using CodeIgniter for the CMS, which I believe takes care of part of the security stuff.

Out of curiosity, what did you find "messy" and "heavy" in Joomla that made you stay out of it?




View PostMiles Prower, on 31 March 2012 - 02:18 PM, said:

Something akin to CakePHP maybe?

Well, CakePHP is a framework just as CodeIgniter, we just didn't like it as much so we chose the other.
This post has been edited by ICEknight: 31 March 2012 - 05:49 PM

#7 User is offline Rolken 

Posted 03 April 2012 - 01:39 PM

  • Posts: 301
  • Joined: 29-July 06
  • Gender:Male
  • Location:San Francisco, CA
  • Wiki edits:1

View PostICEknight, on 26 March 2012 - 08:08 AM, said:

Are CMSs really the future in web development, rendering frameworks like CodeIgniter useless?


Quality developer time is rare and expensive; that's the entire reason why prebuilt CMSs are popular.

For similar reasons, PHP itself is neither the present nor future of web development, it's the past. Rails is the present, and Node.js is the future.

#8 User is offline ICEknight 

Posted 04 April 2012 - 12:54 PM

  • Posts: 8898
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18

View PostRolken, on 03 April 2012 - 01:39 PM, said:

For similar reasons, PHP itself is neither the present nor future of web development, it's the past. Rails is the present, and Node.js is the future.

I'd love to read why you have that oppinion...

#9 User is offline Rolken 

Posted 04 April 2012 - 02:14 PM

  • Posts: 301
  • Joined: 29-July 06
  • Gender:Male
  • Location:San Francisco, CA
  • Wiki edits:1

View PostICEknight, on 04 April 2012 - 12:54 PM, said:

View PostRolken, on 03 April 2012 - 01:39 PM, said:

For similar reasons, PHP itself is neither the present nor future of web development, it's the past. Rails is the present, and Node.js is the future.

I'd love to read why you have that oppinion...


Rails lets you do more in less time with less hassle.

Node.js is even more seamless (a web server stub is six lines of code), but it's too young to have as much framework support as Rails, which is why it's the future and not the present. I'm using it for a personal project, but I can't objectively recommend it as The Way.

Honestly, the biggest problem with PHP is that it encourages subpar coders to produce subpar code, in the same way that IE6 taught all the HTML-slingers that they could write bullshit HTML and reload until it looked right, only now the playing field is SQL injections and URL hacking. And since you're talking specifically about future projects of unbounded complexity, I would strongly recommend spending a day apprising yourself of all the options, if nothing else just so you know what's out there.

Rather than pontificate all day, if you're interested, here's an example guide comparing CodeIgniter and Rails directly. It's a couple years old, so you might want to skim it rather than take it as line-for-line gospel. To see the latest state of Rails, try the official getting started guide.

edit: just found a fantastic summary of the state of node.js, its advantages, and what's holding it back (so far), with bonus observations on the ascent of Rails.
This post has been edited by Rolken: 04 April 2012 - 02:19 PM

#10 User is offline ICEknight 

Posted 04 April 2012 - 02:35 PM

  • Posts: 8898
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
That is really interesting, thanks!

If anybody else has had any experience with these, or is comfortable with using something else, please do post about it as well.

#11 User is offline Meat Miracle 

Posted 04 April 2012 - 08:58 PM

  • Posts: 1506
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2

View PostRolken, on 04 April 2012 - 02:14 PM, said:

Honestly, the biggest problem with PHP is that it encourages subpar coders to produce subpar code, in the same way that IE6 taught all the HTML-slingers that they could write bullshit HTML and reload until it looked right, only now the playing field is SQL injections and URL hacking.


I'd like to see this point elaborated. Do the other frameworks you mentioned force things like auto-sanitizing form submissions unless specifically told not to? Or they have some more specialized or more automatic protection against injections? Because the things you mentioned, sql injections through forms - either GET or POST - are so basic that I'm honestly surprised that they still work on some sites.

#12 User is offline Rolken 

Posted 05 April 2012 - 08:12 AM

  • Posts: 301
  • Joined: 29-July 06
  • Gender:Male
  • Location:San Francisco, CA
  • Wiki edits:1

View PostMeat Miracle, on 04 April 2012 - 08:58 PM, said:

I'd like to see this point elaborated. Do the other frameworks you mentioned force things like auto-sanitizing form submissions unless specifically told not to? Or they have some more specialized or more automatic protection against injections? Because the things you mentioned, sql injections through forms - either GET or POST - are so basic that I'm honestly surprised that they still work on some sites.

Rails is MVC and expects you to use active record model classes. So it has 'specialized protection' as part of its general eschewing of writing straight SQL. (If you choose to write straight SQL, you have to take care of it yourself.)

But what I meant by "PHP encourages subpar coders to produce subpar code" was as much cultural as technical. Just on a lark, I googled 'php sample form code' and got this complete garbage. Google 'rails sample form code' and you get this complete reference.

This is unbelievably important! Someone seeking to learn PHP is being taught worse techniques and becomes a worse programmer than someone learning Rails. This is at the core of why you still see sql injections in PHP in 2012. (And in my personal experience, every business PHP site I've been asked to look at has been ludicrously open to hackery.)

Worth noting that the one time the Rails team made the wrong decision on security, with mass assignment, it turned into a shitstorm and they're being forced to reconsider (heh).

#13 User is offline Elratauru 

Posted 05 April 2012 - 09:51 PM

  • Oooh Shiny stuff! don't touch it >:(
  • Posts: 957
  • Joined: 13-April 08
  • Gender:Male
  • Location:Montevideo, Uruguay
  • Project:Web Developing Stuff! :P
  • Wiki edits:132

View PostICEknight, on 31 March 2012 - 05:09 PM, said:

Out of curiosity, what did you find "messy" and "heavy" in Joomla that made you stay out of it?


Actually, its not that I stay out of it, its just that I prefer other alternatives when it comes to using it. The problem I have with Joomla is that everything is a plugin/module and its way too structured. If you want to create a totally unique site, you're gonna need to edit a tonshit of files right off the bat. Short Story, It works for corporate sites, but for modern, trending, and good designed sites you will need something that gives you more freedom, Wordpress is an example of a CMS that lets you do whatever you want or need to without obstructing your site pages, no need for modules and stuff, only a header, main body and footer to arrange wherever you need to.

Also, on the Rails discussion, Rails is awesome... I believe a really good killer combo would be its usage for data stuff, and Less (Framework) for appearance, but that's when writing stuff from scratch of course...I'm not that used to Ruby though.

#14 User is offline Walnut 

Posted 06 April 2012 - 03:58 PM

  • Posts: 107
  • Joined: 23-June 11
  • Gender:Male
  • Location:Edmond, OK
I think it depends on how much work you want to put into it. For my personal website I use the Invision Power suite, IPB and IP.Content for the CMS. Its parser is really weird and so writing code for it can be really quirky and time consuming compared to just writing something from scratch in a blank PHP file. On the flipside though, there's a lot that I can do a lot faster with IP.Content, and it allows me to easily give my website an integrated unified feel, which is really nice

So overall yeah I'd say that CMS is gaining some share for web development but there's something to be said for writing something cool from scratch

Also Joomla is slow as shit in my experience I'm not a big fan of it

#15 User is offline Meat Miracle 

Posted 06 April 2012 - 09:32 PM

  • Posts: 1506
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2

View PostRolken, on 05 April 2012 - 08:12 AM, said:

But what I meant by "PHP encourages subpar coders to produce subpar code" was as much cultural as technical. Just on a lark, I googled 'php sample form code' and got this complete garbage. Google 'rails sample form code' and you get this complete reference.


Eh, so just because people write idiot guides, the language is suddenly crap? I don't see the problem with the guide you linked to - it only covers forms, not security. It's basic information to get started with, but not something meant to be the backbone of your site. Yes, someone using just that guide would end up creating a honeypot without knowing, but if you blame people for being stupid and ignorant - and others for taking advantage of this - then you might as well blame the entire human race, not PHP.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users