Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Wordpress or? - Page 4
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Wordpress or?

124

Comments

  • BUDDY if you want the best of the best just use LightBlog.
    https://github.com/vldr/LightBlog
    super easy to install and the performance is amazing even an imbecile like you can install this

    Thanked by 1vladka24
  • To all GRAV users: let's say I create a site with articles so simply static pages. Every article contains reviews of one or more products that has ratings for various aspects. I need to store the Amazon price of those products every hour.
    Also these products need to be displayed in a page for comparison and ordered by ratings, and they need be searched by common aspects.
    In this case would you still use Grav over any other DB based CMS?
    From what I read it seems like Grav can replace "the blog part" of Wordpress meaning creating content, but once you want to expand the content and elaborate the data with relationships it looses its power.

  • wordpress is the best !

  • sandro said: I need to store the Amazon price of those products every hour. Also these products need to be displayed in a page for comparison and ordered by ratings, and they need be searched by common aspects.

    I'd build something custom, for example using laravel. It depends how many products you'll have in your system but anyway you'll need some kind of script to fetch the prices and store it somewhere, be it on a db or as a static file.

  • LeeLee Veteran

    sandro said: In this case would you still use Grav over any other DB based CMS?

    You are going beyond the scope of Grav with that.

    Thanked by 1sandro
  • OK thanks.
    Yes custom would work but takes a lot of time for something already ready (content creating I mean)

  • You can create an API in for example node.js to fetch the prices and display the results using js in your grav page. You could inject the js code using https://github.com/getgrav/grav-plugin-page-inject with the pre rendered option.

    Just an idea though - in my opinion the most work will be on the fetch prices / compare prices side, so when you'll have been through that adding a small layer to display your content won't hurt and the solution will appear depending on what language / tech you choose for the pricing thing. Good luck.

    Thanked by 1sandro
  • @bsdguy said:
    @Lee

    Not really. For a start, one of the holy rules of safety/security is to avoid complexity, in particular unnecessary complexity. A dynamic system is inherently way more complex than a static one and a software with DB is inherently more complex than one without.

    But granted, I'm also amazed by much I read here. For instance about using only battle-proven WP plugins. Pardon me but that's nonsensical. For quite some reasons, two of which I'll spell out: a) according to that "logic" a new plugin, no matter how secure, would have no chance to be picked up vs. a shitty but considered "battle-proven" plugin. b) php.

    php is a disease. We would be well advised to remember it's raison d'etre: to give amateurs a chance. That's a nice and worthy goal but professionals creating massively used software should use more professional languages.
    facebook had a bloody reason to create their hack language. And, indeed, static typing is an important ingredient for any kind of professional programming, particularly in terms of safety/security (which boils down to: i.a. everything on the internet).
    google had a bloody reason, too, and they went much further (and acted much more professionally) in creating go (they also fucked up big time in some points but then go was primarily meant to scratch their own itch).

    If your local bakery has a php website they are "modern" and technically savvy. If, however, a big league company uses or provides software written in php then that's simply a declaration of incompetence and an invitation to major problems.

    saying php is a disease makes you sound like a religious programming language purist. See https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ to see what i mean. I develop in wordpress almost daily now due to my work. And I do know many other languages, but wordpress pays bills right now. I am aware of how old the code is and theres a million things I would love to see better. But those things would likely break backwards compatibility which is a controversial thing to many. But the code works very well in its design for what it needs to do, and work without breaking old stuff (constraints). You dont use any plugins, and use a half decent not oversold openvz box, and you could take 1k (not concurrent) visitors easily on apache.

    The bottom line is a language is usually designed for X purpose/tasks and has X strengths. PHP grew from a need and did become mashed up, but it still works well and at the end of the day it solves a business problem with a lower entry barrier than other routes. its just up-to the developer (usually from India in my experience, but not trying to stereotype) to not be lazy. Its a tool, not its fault.

    Thanked by 3Lee angstrom varwww
  • LeeLee Veteran

    pcfreak30 said: it still works well and at the end of the day it solves a business problem with a lower entry barrier than other routes.

    I have a number of those business problems that I solved with PHP and will continue to solve with PHP. Sure there are others where something else is appropriate however it works, I can do it myself without outsourcing and have complete control over whatever it is.

  • bsdguybsdguy Member
    edited October 2017

    @pcfreak30 said:

    saying php is a disease makes you sound like a religious programming language purist. See https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ to see what i mean. I develop in wordpress almost daily now due to my work. And I do know many other languages, but wordpress pays bills right now. I am aware of how old the code is and theres a million things I would love to see better. But those things would likely break backwards compatibility which is a controversial thing to many. But the code works very well in its design for what it needs to do, and work without breaking old stuff (constraints). You dont use any plugins, and use a half decent not oversold openvz box, and you could take 1k (not concurrent) visitors easily on apache.

    The bottom line is a language is usually designed for X purpose/tasks and has X strengths. PHP grew from a need and did become mashed up, but it still works well and at the end of the day it solves a business problem with a lower entry barrier than other routes. its just up-to the developer (usually from India in my experience, but not trying to stereotype) to not be lazy. Its a tool, not its fault.

    Except for the very beginning, a purely subjective perception, you pretty much confirm what I said but offered reasons. Funny.

    For a start, YES, I am picky about languages. Just read your own last statement and you'll understand. Would you rather use a good tool or a bad one?

    Your argument pretty much boils down to "pays my bills". That's OK, I can understand that - but keep in mind that bank robbers say quite similar things and so do corrupt officials and cops.

    Let me pick out two things.

    • "But those things would likely break backwards compatibility which is a controversial thing to many. But the code works very well in its design for what it needs to do, and work without breaking old stuff (constraints)"

    • a "language is usually designed for X purpose/tasks"

    Those are related and php fails miserably. For a start: No, php hasn't been "designed". That's one of the very major reasons it's so bloody fucked up. It has been somehow hacked together with a certain purpose in mind, but that's not "design". Designing is what engineers do and what has not been done in the case of php.

    You say the "code works very well". Pardon me? Again: Hackers, fumblers and make-shifters make such statements based on how their balls happen to hang that day. Engineers qualify such a statement which gives it meaning. One criterion, btw, is that a good language doesn't need multiple revisions introducing subtle (or not so subtle) changes breaking existing code. They don't need to because they did the designing job well in the first place.
    So, what does "works well" mean? How about "allows for efficient and not too complicated to write code with very few bugs"?

    Again: facebook didn't reinvent php just for the fun of it and btw. one of their major obstacles was to get at something that still largely digests php (because they had millions upon millions of lines of php crap).

  • @bsdguy: I understand that php-7.1 has improved many things (according to what I've read). Nevertheless, relatively few programs have been updated for php-7.1.

    bsdguy said: Again: facebook didn't reinvent php just for the fun of it and btw. one of their major obstacles was to get at something that still largely digests php (because they had millions upon millions of php crap).

    By the way, what does Facebook use instead of php?

  • @angstrom said:
    @bsdguy: I understand that php-7.1 has improved many things (according to what I've read). Nevertheless, relatively few programs have been updated for php-7.1.

    bsdguy said: Again: facebook didn't reinvent php just for the fun of it and btw. one of their major obstacles was to get at something that still largely digests php (because they had millions upon millions of php crap).

    By the way, what does Facebook use instead of php?

    Their own "hack" language (yes the name is really "hack) which is very similar to php but has "gradual typing" (some kind of optional and limited static typing) and a much better interpreter.

    That said, how much do they actually do in hack today? I wouldn't know. Reason is that hack was evidently developed out of despair and when they were in deep shit. Hack allowed them to a) be independent of the php amateurs and b) to quickly and simply improve their very large code base. But that was some years ago. I don't know whether they still use it; my guess is that they still use it but some kind of "inhouse version" that, for instance, transpiles to oCaml or Haskel (or even C) after some more "massaging" critical/sensitive parts.

    Thanked by 1angstrom
  • What's wrong with using a caching plugin that drivers static pages? Besides the plugin being compromised of course.

  • LeeLee Veteran

    angstrom said: I understand that php-7.1 has improved many things (according to what I've read). Nevertheless, relatively few programs have been updated for php-7.1.

    There are a lot of good things in PHP7^, it can of course be argued they should have been in PHP5 but yeah I will leave that to those in this thread who are better at focusing on the negatives.

    As you point out though, only useful if existing software keeps pace with the change and most are not, not the fault of PHP, also not an issue for me as my scripts keep pace.

  • What language would you recommend for web dev @bsdguy ? ie well designed & thought with security & scalability in mind?

  • bsdguybsdguy Member
    edited October 2017

    @datanoise said:
    What language would you recommend for web dev @bsdguy ? ie well designed & thought with security & scalability in mind?

    That's an ugly one, i.a. because there is no single answer. For a start it depends on some almost "religious" factors, a major one being whether web apps should be "add ons" or "plugins" going with an existing web server or whether the whole thing should be in one block (i.e. web server being part of the solution). And that's not simple or generally to answer because both, being based on an existing server like nginx and having the web server integrated can be a smart decision or not, depending on the project.

    To put it simple: I have no "right for everything and everyone" answer. The major reason is that there are too many factors involved and I know of no solution that has a nice green checkmark at all those factors.

    What I can do is to tell you what I use, well knowing that that's worthless for most (in different fields with different priorities, having different educational backgrounds, experience, etc).

    I've chosen go and I'm not at all enchanted about it. The reason was that go is among the very few languages that has got concurrency and parallelism quite right with their excellent Hoare CSP implementation. In my field (security) that is a conditio sine qua non. I would have preferred occam-pi but, alas, it's 32-bit only and, which also is the next point, it has a rather poor eco system. go, on the other hand has a quite rich eco system; debugger, package management, etc, etc, it's all there and in a well useable state.
    But - and there's plenty "buts" - go has a ridiculous and poor error handling, virtually no assertions, and generally plain nothing in terms of high safety (Hoare triples, formal verification, etc).

    In fact, go is so poor in many respects that I usually specify and model/check many constructs and then, having verified and tested them, code them in go (semi-automatically; I've written some tools for that).

    My general favourite is Ada. Unfortunately, though, there's nothing available for Ada in terms of a good CSP implementation; it does multithreading and very elegantly at that but unfortunately multithreading doesn't cut it in many scenarios.

    Then there's the jvm and some languages that are quite nice, scala, for instance, and particularly e. Unfortunately though, the jvm itself is plagued by a never ending stream of problems and bugs plus it's a pain in the ass to work with as startup times are insultingly shitty. But for java fans, scala might be good choice.

    I personally don't like scripting with servers (although for many other things scripting is great) but if one wants scripting I'd recommend a look at haxe. It's well typed and known to be of quite nice quality - and it comes with a nice and quite fast VM and can be transpiled to javascript (that's what I use it for), to C/C++, and I think even php and some other languages.

    Keep in mind, though, that my field is quite little to do with general web stuff. It's usually servers, sometimes even web servers, but it's almost always stuff that would incur severe penalties and problems if it wouldn't work properly (think banking interfaces, highly secure protocols, etc). That's why my criticism (e.g. whcms) is almost always strongly focused on sensitive parts (customer data, payment interfaces, etc).

    Maybe you see better now why I'm often so pissed. We have hundreds of languages, a shitload of web programming tools - but almost nothing that cares about and supports good quality and safe web applications.

    Thanked by 1datanoise
  • WSSWSS Member

    @bsdguy said:
    supports good quality and safe web applications.

    snrrk

    Thanked by 1Lee
  • thanks for your detailed answer!

    I need to give go a try, even if it's not perfect. Seems interesting.

    bsdguy said: Maybe you see better now why I'm often so pissed. We have hundreds of languages, a shitload of web programming tools - but almost nothing that cares about and supports good quality and safe web applications.

    .. and that's maybe why php is still popular!

    Thanked by 2Lee angstrom
  • @bsdguy said: Maybe you see better now why I'm often so pissed. We have hundreds of languages, a shitload of web programming tools - but almost nothing that cares about and supports good quality and safe web applications.

    I think that I share @datanoise's attitude (see above).

    With all due respect, bsdguy, the fact is that php is immensely useful. It's useful because it's popular, and it's popular because it's useful. php wasn't designed in an academic think-tank; indeed, the early versions were "hacked together" in order to be suitable for practical applications. As I said above, the recent versions 7.0 and 7.1 appear to have improved a lot in terms of coherent language design (I've just begun to take a closer look).

    No one would deny the security concerns concerning php that you have repeatedly mentioned in numerous comments, but at the same time, you can't realistically expect people who have an immediate server-based application in mind (and a job to do!) to begin learning scala or haxe (!) if php would work with much less effort. Security concerns should never be neglected, but one also has to remain realistic about what is feasible within a given time frame. As I said, I think that the situation with php is improving, if slowly.

    As far as I know, you're not an academic, but if I may say so, you do often come across as an academic, citing legitimate theoretical concerns but with very little practical advice for the daily working programmer who has an immediate task to accomplish.

    Thanked by 1pcfreak30
  • WSSWSS Member

    T_PAAMAYIM_NEKUDOTAYIM

  • @angstrom

    Again: I don't care about Johnny or the local bakers web site. If they are done in php, oh well, who cares.

    As for "practical": that depends. I, for instance, am by far more productive with Ada than with C and I'm also more productive with haxe than with javascript.

    If the measure to be applied is "somehow get to the point where my stuff roughly does what I want it to do" then php or pretty much anything is good enough. But that can not reasonably be the measure applied when dealing with e.g. credit card numbers!

    And when working to high standards those "exotic and hardcore" languages suddenly get very efficient.

    You seem to see "php == quick results" where I see "php == lots of shaky crap" but there is no problem as long as that php code doesn't play with other peoples safety. Trust me, as soon as the much tougher european laws are in effect I'll be some peoples worst nightmare. I have some experience as an expert at court and I will very gladly help to hunt down the assholes who play with the well being and safety of millions of people.

    I understand you. Getting things done is an important criterion. Some, however, seem to not understand that it's not the only one and not even the most important one. Maybe they'll understand that better when their whole city hasn't electricity because some assholes have written SCADA systems in a way not unsimilar to php, or when their identity has been stolen and abused.

  • angstromangstrom Moderator
    edited October 2017

    @bsdguy: Your point about what is at stake is well-taken. Obviously, the same criteria do not apply to the local baker's web site and to a web site that stores credit card data. For the latter, a whole range of potential security issues has to be addressed (and php is very probably not part of the answers).

    Again, I don't mean to deny any of your theoretical concerns about php. I was just trying to defend a practical perspective that is equally real (and which may very well involve php).

  • WSSWSS Member
    edited October 2017
    // add to all headers for PHP3->PHP7 COMPATIBILITY...
    foreach ($_REQUEST as $GLOB => $VAL) {
      $$GLOB = $VAL;
    }
    
  • It wouldn't hurt if the local baker had a way to have a website written in an efficient and secure language.

    If it's written seriously I feel like php can be pretty secure. Probably not the best solution for huge websites like FB, probably not secure enough for storing banking related data (well - I knew somebody working as a dev for a bank on some stuff related to ATM inner working - to my surprise the whole project (backend stuff) was in php!) but heck, it works and not too badly + it's kinda easy to learn. The more people learn it (or java for example) the more companies looking for cheap dev work done will choose this or that language and the show will go on...

    If an alternative arises that's as easy to use (or almost) but way better: it will be used. If php gets better and better and stays hugely popular it will stay that way. (Well, JS takes more and more room in the show)

  • @datanoise said:
    It wouldn't hurt if the local baker had a way to have a website written in an efficient and secure language.

    If an alternative arises that's as easy to use (or almost) but way better: it will be used.

    Sadly: No.

    Safety isn't high up on the list of desirables for most. Plus, especially larger companies tend to think very much in developer availability and cost as well as tool availability.

    To add to that/to make it worse, most of the languages enabling/lending themselves well to safe programming aren't exactly well supported in terms of tools (particularly GUI ones) and usually have much fewer libraries/bindings than the more common languages.
    Funnily that isn't much of a problem. Writing bindings for haxe, Ada, etc is actually relatively easy and quick, but that's not how most developers tick; they want to be able to use a package manager or, even better, to click "install" in some gui.

    Result: there are much better alternatives but they are rarely used.

    Talking about it, I have a "hot secret tip": Pascal. I know, it sounds crazy and many consider it uncool, but actually Pascal has lots of safety built in plus it's easy plus there are GUI IDEs and lots of tools and stuff. The sad point, though, is that it seems to have little on offer in terms of (not primitive) server programming.

  • @bsdguy said: The sad point, though, is that it [Pascal] seems to have little on offer in terms of (not primitive) server programming.

    But, in a way, this is precisely the point.

  • bsdguy said: usually have much fewer libraries/bindings than the more common languages.

    Yeah, that's probably the main problem given how many libraries are around the most commonly used languages it makes it really easy and fast for a dev with limited knowledge (hence cheap to hire for a big company) to do something with it.

    It makes it very hard to change the paradigm as there would hardly be any economical incentive for companies to go for a longer & more expensive process [except if they are in banking or a special focus / special needs] which in our current competitive world makes it hard to happen. The language with the bigger ecosystem will stay strong, even it better alternatives arise: php probably came at the right time....

  • @angstrom said:

    @bsdguy said: The sad point, though, is that it [Pascal] seems to have little on offer in terms of (not primitive) server programming.

    But, in a way, this is precisely the point.

    My fault. I should have made clearer that what I consider primitive actually is something like average or even higher end in relation to php. There is, for instance, fcgi for Pascal and there are even more sophisticated frameworks and stuff available (but I don't know much about those because that's not how I work).

    But again, "Hack" seems to be a reasonable compromise, too (in strict mode, of course) and a route that should be easy enough for php "developers".

  • @bsdguy said: Talking about it, I have a "hot secret tip": Pascal. I know, it sounds crazy and many consider it uncool, but actually Pascal has lots of safety built in plus it's easy plus there are GUI IDEs and lots of tools and stuff.

    Your mention of Pascal caught me by surprise. :-) Most people would sooner sing the praises of Modula-2 or Oberon.

    Yeah, this is old, but it's by B. W. Kernighan:

    http://www.lysator.liu.se/c/bwk-on-pascal.html

  • @angstrom said:
    Your mention of Pascal caught me by surprise. :-) Most people would sooner sing the praises of Modula-2 or Oberon.

    Yeah, this is old, but it's by B. W. Kernighan:

    http://www.lysator.liu.se/c/bwk-on-pascal.html

    Modula is the better language but there are way less tools and a much much smaller eco system. With Oberon it's even worse. So, for practical reasons I suggested Pascal.

    As for Kernighans utterings, frankly, I couldn't care less. Now, some decades later we know that C is mostly a very reliable way to create buggy code. In fact, it can not even be statically verified because its spec is ambiguous.

    Thanked by 1angstrom
Sign In or Register to comment.