Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search
 

Phillip McCleod

(1,837 posts)
Sat Mar 30, 2013, 04:41 PM Mar 2013

reviving the 'php sucks' debate.. it's like Bank of America..

hey i know it's silly to claim that one language sucks, when they all suck to some degree. but after steeping in y'know, usable languages for the last few years, trying to get my head back into php for a wordpress plugin is not going well. it's depressing to be frank.

PHP is the COBOL of the internet age and they're both like BoA..

too big to fail.

19 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
reviving the 'php sucks' debate.. it's like Bank of America.. (Original Post) Phillip McCleod Mar 2013 OP
the $ugliness-> strikes me every time. nt napoleon_in_rags Mar 2013 #1
It's not the php as much as it is the wordpress plugin Merlot Apr 2013 #2
actually working with wordpress api Phillip McCleod Apr 2013 #3
One of the reasons I dislike WP is the lack of good plugins Merlot Apr 2013 #4
yeh it's work.. Phillip McCleod Apr 2013 #5
"Never mess with WP again." music to my ears Merlot Apr 2013 #6
What usable language? Ruby? DaveJ Apr 2013 #7
negate? no, but mediate? definitely. Phillip McCleod Apr 2013 #8
I'm not opposed to switching frameoworks DaveJ Apr 2013 #9
yep no point switching horses midstream.. Phillip McCleod Apr 2013 #11
Does {{ item }} in that example usually contain a single variable or HTML output? DaveJ Apr 2013 #12
yeh be careful that sounds dangerous.. Phillip McCleod Apr 2013 #13
I suppose nebenaube Apr 2013 #10
haha very funny dr. jones. Phillip McCleod Apr 2013 #14
I know that I'd prefer to work in Perl over PHP. Fortinbras Armstrong Jul 2013 #17
Now that's just weird... nebenaube Jul 2013 #18
PHP arachadillo May 2013 #15
yeh there's no doubt that for all it's faults.. Phillip McCleod May 2013 #16
hrumph... nebenaube Jul 2013 #19
 

Phillip McCleod

(1,837 posts)
3. actually working with wordpress api
Tue Apr 2, 2013, 09:38 PM
Apr 2013

is the one thing giving this plugin any sanity at all. otherwise the language itself, and the way it's intermingled with HTML, is just a fistful of dry spaghetti waiting for a boiling pot.

Merlot

(9,696 posts)
4. One of the reasons I dislike WP is the lack of good plugins
Wed Apr 3, 2013, 12:16 PM
Apr 2013

Most of them seem amateurish and convoluted. There are a couple that have been exceptional, the rest mediocre. Also, searching for the correct plugin is a job in itself.

As far as WP itself goes, it's ok, but a lot of the WP sites I've worked on have gotten malware attacks. Sites I work on (joomla, zen cart, oscom, etc.) have not had the same problem.

Merlot

(9,696 posts)
6. "Never mess with WP again." music to my ears
Wed Apr 3, 2013, 02:21 PM
Apr 2013

I don't recommend WP to anyone except do-it-your-selfers with no budget or web experience. Anyone else I recommend that they DON'T use it.

DaveJ

(5,023 posts)
7. What usable language? Ruby?
Thu Apr 4, 2013, 08:11 AM
Apr 2013

Everyone's talking about how great Ruby is but I really do not spend much time struggling with server side code in the first place, so it's hard for me to contemplate any need for improvement.

I spend most my time trying to work with HTML/CSS/Javascript. If anything sucks, they suck. If I need something done in C,# I whip it up and it's done before I know it.

Does Ruby or any other language negate the need to deal with HTML/CSS/Javascript? If so that would be cool.

 

Phillip McCleod

(1,837 posts)
8. negate? no, but mediate? definitely.
Thu Apr 4, 2013, 03:56 PM
Apr 2013

that's exactly what frameworks like RoR (ruby on rails) or one of many pythonic frameworks do. then there's mountains of tools to make it even easier.. various intuitive and semantically consistent (with the language) templating schemes for example..

i'm a python nut myself, and even the most bloated django framework is at least MVC-ish and truly OO (if you want, or not if not). spits out beautiful static HTML on the fly, url-based, tag-based, query? no problem? like magic.

DaveJ

(5,023 posts)
9. I'm not opposed to switching frameoworks
Thu Apr 4, 2013, 04:36 PM
Apr 2013

At the moment it's not going to happen, I'm halfway done with my current project. No reason not to switch, though, if it makes the HTML side easier. .Net forms is cumbersome (and can go away afaic). .Net MVC is nice, but nothing in there makes HTML easy.

Are these template schemes like visual HTML objects you place on the page? Like, say I wanted a photo gallery, would I just use a photo gallery template? Are the templates easy to modify on the fly?

Does it take long to learn Python or Rails? Say if I could do a nice website in 3 months after I've learn it, then how long would it take to create that same site if I were learning as I go?

 

Phillip McCleod

(1,837 posts)
11. yep no point switching horses midstream..
Thu Apr 4, 2013, 08:28 PM
Apr 2013

..that's exactly how i'm stuck relying on PHP/WP again. *i* ain't reinventing *this* wheel. no way.

my own experience is python-heavy so that's what i can attest to, but yeah it's pretty much a snap to learn with almost any coding background. actually i imagine learning python while coding with django might be a nice way in since you can then relate what you're programming to what you expect to see served up in the end (for instance an HTML form).

this overview compares python/django and php and probably will answer your other questions better than i could..
http://j4mie.github.com/python-and-django-for-php-refugees/#slide1

i will say that no, the templating schemes i spoke of in a general sense aren't drag-n-drop. in fact most of them are fully blown languages. django for instance uses it's own proprietary template language..
https://docs.djangoproject.com/en/dev/topics/templates/

..whereas for instance users of github, ruby-on-rails, octopress, jeckyl, etc. might be coding in the liquid templating language..
https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

they are quite similar. in both for example, the following would be legal in an HTML file..

<ul>
{% for item in itemlist %}
<li>{{ item }}</li>
{% endfor %}
</ul>

DaveJ

(5,023 posts)
12. Does {{ item }} in that example usually contain a single variable or HTML output?
Fri Apr 5, 2013, 06:00 AM
Apr 2013

Looking at code is helping put my own language into perspective. .Net MVC is not very intuitive, but it's captivating.

For instance, here is a summary of a gallery page. Line 1 is the data source, line 2 automatically uses a Template that was created for that data model:

@model IEnumerable<ScienceShow_MVC.science_pics>
@Html.EditorForModel()

That is an entire HTML page, assuming you have it within a layout page.

This was non-intuitive to me. It looks like I need to create a new model/EditorTemplate combination for each time I want a Template, but that seems to defeat the purpose of templates. Might as well write code for each page.

(but come to think of it, I am using that Template on 3 pages, so I guess it's serving its purpose, I'm just having trouble since this methodology demands an understanding of a lot more than what can be seen)

It's taking me some getting used to this MVC famework. I'm sure its great but I seldom have a chance to take a step back.


So much to learn. I'm not sure if I can fit .Net MVC and Python/Django in my brain at once. But I've got to try it sometime.

 

Phillip McCleod

(1,837 posts)
13. yeh be careful that sounds dangerous..
Fri Apr 5, 2013, 06:31 AM
Apr 2013

..your head's liable to asplode.

in that example {{ item }} is a string object of some sort, and 'itemlist' is a list of strings. one might throw that snippet in a template file like 'list.html', then have a view or many views that render to it by passing 'itemlist' in (or to other template files that include it by reference).

i'd use a snippet similar that to render a menu bar, say, or a sidebar (would still need to set CSS styles and need some logic for urls, but otherwise..)

django's a little different in that while it is 'true' MVC.. the 'controller' part is fairly hidden. just map urls to views. so ya end up writing mostly in 'models.py' (corresponding to database tables), 'views.py', and 'urls.py'.. plus your template HTML files that the views render to.

MVC is definitely a different approach to web dev from the old days of static html or mangled php spagballs but for any site that relies either on a database, or on the server doing some actual computation before rendering, it's a joy. what if i wanted to let the end (web) user set parameters and generate a mandelbrot set image? the view could call some normal python script (or exec a system call or extern program) to generate the image before serving up the results.

i know it could be done in PHP with Zend framework, but why stab myself repeatedly in the face with a dull fork? doing it the old (non-MVC) way? that would be a mess. not sure where i would even begin.

arachadillo

(123 posts)
15. PHP
Fri May 31, 2013, 01:18 PM
May 2013

Last edited Sun Nov 17, 2019, 05:17 PM - Edit history (3)

Very funny, I kinda had the same thoughts these past four months as I wandered through WordPress after an eight year absence from all the open source, php software.

After reviewing common open source platforms such as Joomla, WordPress, Clip Bucket and a few other video platforms, my conclusion was that php and open source php platforms are still as buggy as ever and always in need of updating for security reasons.

Never faced that problem with my HTML5 sites.

Still, not wanting to WordPress bash, after evaluating hundreds of plugins (rather than the thousands available) I came to the conclusion that there are more than a handful of WP plugins that seemlessly integrate with the WP core, making for a fairly stable, secure platform.

By definition, it's a niche marketing site. Therefore, any DU members with internet or SEO interests are invited to self-publish their own product promotions and/or reviews.

The software I used allows for one dofollow link in the content etc (see the SEO insight page for more details., I'm a former colleague of Chris Sherman over at Search Engine Land.

Green Nature

 

Phillip McCleod

(1,837 posts)
16. yeh there's no doubt that for all it's faults..
Fri May 31, 2013, 08:36 PM
May 2013

..from a coder's perspective.. that PHP truly is *too big to fail* at this point. wordpress is an excellent example of how PHP can be used to write a great platform, and wikimedia is another. when someone comes to me and explains what they want in a website.. and as long as what *I* hear is, 'i don't have a lot of money, i don't need any custom functionality that can't be accomplished with a plugin, it doesn't need to be super-fast, and i want my brother-in-law to update it for free instead of you at $40/hr'..

..as long as that's what i hear, i suggest wordpress .. or the like. pretty much anything that needs to be done after the initial design phase can be done through the GUI backend.

..

doesn't change the essential fact that PHP results inevitably and *every time* in a big bowl of spaghetti code with HTML meatballs.

not even *spaghetti* code.. more like mixed pasta.. a bunch of spaghetti with functions in camelCase.. mixed with a bunch of lasagna with functions in cstyleruntogetherlowercaseletters.. mixed with a bunch of rainbow colored twisty noodles with functions in underscored_variable_style.

pick a fuckin noodle, already!

Latest Discussions»Retired Forums»Website, DB, & Software Developers»reviving the 'php sucks' ...