Is it possible to create PHP console applications in the Clipper style?

Asked

Viewed 235 times

2

It looks like something from another planet, but I would like to see a current language doing old things, like a PHP doing a Clipper-style application, the one with screens with simple lines, but very efficient at the time.

I will not get into the difficulty merit or feasibility, I already make applications desktop with PHP in intranets and I’ll tell you something, joining jQuery and CSS with PHP can do a lot of things.

I know I can run PHP command line and I already do this on Linux Cron, but I would like to go further, create applications with interfaces like Clipper, Cobol and others of the old era, rsrs

It is possible, there are libraries for it?

  • 3

    The efficiency of the Clipper is the robustness of the language, not the "Simple Screen" (so much so that the modern successor of the Clipper is the Harbour, which goes very well today, and leaves any PHP in the slipper). The fact is that if you treat the console by PHP in the same way as the General Terminal of the Clipper, you will achieve "similar" things, but the lack of specialization of PHP in commercial applications will always get in the way. In particular, the reading of keys, and display coordinates, lack of native type of date, etc. In short: make console application in PHP for user interaction is commonly go backwards.

  • Um, very productive for me this discussion, I had no idea how complex it can be to use php for a console application.

  • 2

    It’s not about complexity, it’s more about the fact that it wasn’t meant to be. In Harbour you will generate an executable that does everything, and the language was thought of in commercial application. PHP was made for scripts, there is no "soul" of thing that is running in loop, although possible. I’ve seen two or three applications made in PHP for "continuous use", very well written (without the nonsense of wanting to use OOP for nothing in scripting language), but they are rarities. Until recently Guerrillamail’s SMTP was pure PHP. And the code is an example of real programming. The fact is that these cases are exception

  • 2

    In time: the criticism of PHP is only in the context mentioned. I regularly use PHP for PHP things: scripts for low and medium demand web applications, for fast delivery and ease of maintenance, no problems. It’s like having that friend who’s a know-it-all, drink-it-all, forget-it-all once in a while, but how well you know him, you know where and when you can count on him and when you can’t, so there’s no room for trouble, and get along with him.

  • 1

    Search libraries that allow you to use Ncurses from PHP

1 answer

3


Possible it is. Suitable not. It would be nice to use a library that gives access to a slightly more sophisticated console like Ncurses and Termbox.

In fact GUI application in PHP I’ve done and it’s tragic, console is not much different, the language was not created for this.

I’m afraid to recommend anything to anyone who likes Clipper because the track record is not good, but If you want to use the Clipper keep it. It is still very current, in my opinion, more than PHP. A language that was made for just about anything, except making operating systems and things like.

In Harbour you can use the traditional Clipper console scheme or use other console supports, use decent GUI, miscellaneous databases, including Sqlite and Mysql that people use in PHP, or stay in DBF. Can do something for web, use XML, JSON, encryption, and all that modern stuff, plus run on many operating systems, 32 or 64 bit.

  • No, I don’t know Clipper, I just cite as an example for being known, I wanted to do something but without having to learn a new language, I program in Delphi, I’ve thought about Pascal for this, but I stopped, I didn’t go forward, I’ve read little of Harbour, I don’t know if it’s easy to learn and I have no idea of her power, but interesting tip, I’ll think about the case.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.