Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,256
Total Threads: 106,575
Total Posts: 592,698
There are 92 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Development Software and Tools :

Is it just me, or does wordpress suck form a coding standpoint?

Thread title: Is it just me, or does wordpress suck form a coding standpoint?
Reply  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
12-06-2010, 08:03 PM
#1
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old  Is it just me, or does wordpress suck form a coding standpoint?

I've been working with wordpress lately and I must say that I absolutely despise it. I am very surprised it is the largest blogging software with all its faults. So far they have included the following:
  • Inconsistent naming scheme
  • No real templating system
  • Poor back-end documentation
  • Inherent undocumented external dependencies*
*It is a generally accepted standard in programming that included files should not have to rely on any external dependencies. This means that if you have a file that requires database interaction, it must include the DB file opposed to requiring that the file which calls it have done that. This leads to cleaner, easier to use code and is considered in a sin to violate in most programming languages (especially C).

Could someone shed some light on to why Wordpress is the most widely used system out there?

Reply With Quote
12-06-2010, 09:54 PM
#2
Hero is offline Hero
Hero's Avatar
Status: Very much the flyest.
Join date: Mar 2006
Location: Belgium
Expertise:
Software:
 
Posts: 1,171
iTrader: 1 / 100%
 

Hero is on a distinguished road

  Old

Originally Posted by Village Genius View Post
[*]Inconsistent naming scheme
That makes it consistent with PHP

I think wordpress simply got lucky. It was never praised for it's high quality code. Maybe there weren't many decent alternatives at the time. And I know it was easier to use than Joomla (or Mambo).

Not sure what you mean with the template system though. I'd say it's one of the few good things about it, quite easy to use.

Reply With Quote
12-06-2010, 10:21 PM
#3
Jordan is offline Jordan
Jordan's Avatar
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
 
Posts: 1,187
iTrader: 7 / 100%
 

Jordan is on a distinguished road

  Old

I definitely don't agree with you on the "templating system." In fact I'm glad it isn't built on something ridiculously retarded (see: SMARTY.) You can either create your own functions to use or you can use those from WordPress..

Maybe I'm just used to it from over the years but WordPress' theming is the easiest thing I've jumped into.

Reply With Quote
12-06-2010, 10:43 PM
#4
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Originally Posted by Hero View Post
That makes it consistent with PHP
Aint that the truth.

Originally Posted by Hero View Post
I think wordpress simply got lucky. It was never praised for it's high quality code. Maybe there weren't many decent alternatives at the time. And I know it was easier to use than Joomla (or Mambo).

Not sure what you mean with the template system though. I'd say it's one of the few good things about it, quite easy to use.
The point of a templating system is to separate the PHP code from the style code. Wordpress mashes PHP and style together to where the template can make actual database calls, which is a big no-no.

Originally Posted by Jordan View Post
I definitely don't agree with you on the "templating system." In fact I'm glad it isn't built on something ridiculously retarded (see: SMARTY.) You can either create your own functions to use or you can use those from WordPress..

Maybe I'm just used to it from over the years but WordPress' theming is the easiest thing I've jumped into.
You seem to be mistaking simplicity for quality. It is definitely more simple to go against the code/logic separation, but it is bad practice. Smarty is an awful implementation of this as it uses its own language and sometimes defeats its own purpose. I personally use Savant in all my projects that require a templating system.

Or perhaps I am going too far off of theory and mistaking unfamiliarity for poorness.

Reply With Quote
12-07-2010, 12:04 AM
#5
Jordan is offline Jordan
Jordan's Avatar
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
 
Posts: 1,187
iTrader: 7 / 100%
 

Jordan is on a distinguished road

  Old

I would say that you are mistaking unfamiliarity for poorness. If the "templating" system was so bad then the progress of premium themes (see: Woothemes, Themeforest, Elegantthemes, etc) wouldn't be as popular as they are.

So yeah, I don't see how the WordPress theme options are difficult to grasp. It's very basic.

Reply With Quote
12-07-2010, 12:07 AM
#6
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

It's not hard, its the principle I am taking about. What I am having trouble with is actually coding the back-end of wordpress. For instance, there is a function I need outside of wordpress that is in wp-includes/post.php, I need to include five other files (one that has really odd behavior) to use that function because post.php did not include them itself. Any good practice would dictate that post.php include every dependency it had, common sense would dictate that it at least say what it requires.

Reply With Quote
12-07-2010, 01:17 AM
#7
Spherions is offline Spherions
Status: Junior Member
Join date: Mar 2009
Location:
Expertise: Investment
Software: Photoshop & phpDesigner
 
Posts: 59
iTrader: 0 / 0%
 

Spherions is on a distinguished road

  Old

Village Genius, funny you created this thread. I was having a similar conversation this morning over coffee with a friend who's been helping me learn WordPress theme creation. I've read a myriad of books and watched dozens of in-depth videos only to come at the same conclusions. My theory (a bad one) is that WordPress just got lucky and people have gotten used to doing the extra work.

Reply With Quote
12-07-2010, 08:50 AM
#8
Jordan is offline Jordan
Jordan's Avatar
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
 
Posts: 1,187
iTrader: 7 / 100%
 

Jordan is on a distinguished road

  Old

Originally Posted by Village Genius View Post
It's not hard, its the principle I am taking about. What I am having trouble with is actually coding the back-end of wordpress. For instance, there is a function I need outside of wordpress that is in wp-includes/post.php, I need to include five other files (one that has really odd behavior) to use that function because post.php did not include them itself. Any good practice would dictate that post.php include every dependency it had, common sense would dictate that it at least say what it requires.
What function do you need?

Reply With Quote
12-07-2010, 09:17 AM
#9
Hero is offline Hero
Hero's Avatar
Status: Very much the flyest.
Join date: Mar 2006
Location: Belgium
Expertise:
Software:
 
Posts: 1,171
iTrader: 1 / 100%
 

Hero is on a distinguished road

  Old

Originally Posted by Village Genius View Post
The point of a templating system is to separate the PHP code from the style code. Wordpress mashes PHP and style together to where the template can make actual database calls, which is a big no-no.
I've never tried Savant, I should have a look at it.
Though, even the MVC design pattern, used specifically for seperating buisness logic from the front-end allows some PHP within the html. Obviously no direct database acces etc, but still.
It's true that wordpress could have separated the layers a bit more, but then again, PHP was written to be used together with(in) HTML

Originally Posted by Village Genius View Post
It's not hard, its the principle I am taking about. What I am having trouble with is actually coding the back-end of wordpress. For instance, there is a function I need outside of wordpress that is in wp-includes/post.php, I need to include five other files (one that has really odd behavior) to use that function because post.php did not include them itself. Any good practice would dictate that post.php include every dependency it had, common sense would dictate that it at least say what it requires.
You should have a look at their plugin api. When you make a plugin you don't need to include anything and you can make use of all the functions. (You'll still need to create objects instances though)

Reply With Quote
12-07-2010, 04:05 PM
#10
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Originally Posted by Jordan View Post
What function do you need?
wp_get_recent_posts()


Originally Posted by Hero View Post
I've never tried Savant, I should have a look at it.
Though, even the MVC design pattern, used specifically for seperating buisness logic from the front-end allows some PHP within the html. Obviously no direct database acces etc, but still.
It's true that wordpress could have separated the layers a bit more, but then again, PHP was written to be used together with(in) HTML
Pretty much all server side languages let you do that (asp.net is the only exception I know of), but that does not mean that it is a good idea in big apps.


Originally Posted by Hero View Post
You should have a look at their plugin api. When you make a plugin you don't need to include anything and you can make use of all the functions. (You'll still need to create objects instances though)
Will do, thanks.

Reply With Quote
Reply  
Page 1 of 2 1 2 >


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed