Is there a book on php for socket programming? [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I already have some experience with Java and a bit with C/C++, I'd like to learn PHP now. I want to make some applications with sockets, which I already understand a bit of. However, it seems most books focus on PHP for web development, whereas I'm more interested in it as a general purpose programming language.
Am I "doing it wrong" or is PHP viable as am I hoping it to be? if it is, are there any good books on the subject?

Having written web spiders and other command-line based scripts before in PHP, I can tell you that PHP is a viable option for a general purpose programming language.
The reason most of the books are web-oriented is because PHP is designed to be a web programming language (its name, after all, is the "PHP Hypertext Preprocessor"). Your best bet for "general purpose" use of the language would be to make heavy use of the PHP Manual, including the comments (there are a lot of good comments that include examples or links to various things that will be helpful).
The PHP manual has a whole section dedicated to command line use, and another section on the use of sockets.
Other than the manual, Google is your friend.

Find a good book on sockets that is geared toward unix C/C++, as there is considerable cross-over between C and PHP.
It won't help you if you want to write a multithreaded server, or a server that even forks for each connection, but to get an understanding of sockets that can apply to php this may be your best bet.

While PHP can be used as a general purpose programming language, it is DESIGNED for use in webpages. It's NOT a good choice for general systems programming use, nor is it particularly suited to any standalone application, particularly one involving sockets.
Instead, learn python. It's different from C or Java. It's a general purpose programming language, has widespread adoption, supports the various system calls you'll be wanting, if you're doing a socket-based application, and has better overall language design.
If you don't believe me, go look at the naming for string functions in php. It grew organically, and it suffers from it.

Related

Certification in PHP and SEO [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Can anyone please guide me which kind of certifications are available for php and seo? I am a php developer as well as a Lecturer. And i want to teach and guide my students. I know symfony and wordpress. But other then this what kind of certification is in demand in current/future market. I am ready to learn new technology even.
No certifications are or should be needed. As for new tech, node.js is very used right now in the market. If you're a javascript developer and want to learn node.js, you will have a very easy time. Note that node.js is commonly used with nosql databases, such as mongodb, couchdb and quite a few more.
If you haven't tried those technologies, it might be a good time to start learning/using/mastering them. Also, I recommend you start using git if you haven't. You can do wonders with git.
If you work as a front-end developer once in a while, I extremely urge you to get right on Grunt.js, since Grunt is extremely useful for a numerous tasks in front end, and it can at some extent, be used for backend, including some php tasks.
NodeJS website: http://nodejs.org/
mongodb website: http://www.mongodb.org/
couchdb website: http://couchdb.apache.org/
git website: http://git-scm.com/
grunt website: http://gruntjs.com/
I think that's enough for you to get busy for a while. Hope it helps.
Personally I don't think any certification is needed, especially in the programming industry (even for lecturesr). It's more important to show that you have been involved with important projects. Working experience with bigger companies or open-source projects will prove your expertise.
With that being said, there is one from W3C:
http://www.w3schools.com/cert/cert_php.asp
Another one is mentioned by Zarazthuzatra, ZCE:
http://www.zend.com/en/services/certification/

What's the rationale behind the claim "PHP doesn't scale up (well)"? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've recently picked up PHP and it seems rather neat language enabling very quick web application development (probably faster than my personal favorite - Java :)
Now, I'm no PHP expert - neither with the language nor its internals/specifics. But quite a few of my peers have made the claim that PHP applications don't scale up well - a fact that I've not been able to figure out for myself and hence the question.
I've just learnt the procedural flavor of PHP and my only guess of non-scalability is that of scalability of procedural vs. OO languages (C vs. C++/Java). I agree and and I can see how that would be a hurdle for extremely complex web applications. However, I'm aware of OO-ness coming to the PHP world and don't see that to be much of a hurdle (please correct me if my hypothesis is incorrect).
Other than that I don't understand what scalability problems would arise for a web application with a large number of users (for the sake of discussion, let's assume a Restful design - no sessions - since I am aware of how that impedes scalability). I'm more interested in knowing 'objective' reasons for such a claim, if possible. Subjectivity is fine but I'm not here to start a debate as to PHP vs. everything else. I'm only interested in knowing what are the potential limitations of this language that I must keep in mind and should not bite me in the behind later if/when the web application were to have 1000's of users a day (or hour).
I can't think of a language that has a scalability limitation. A scalability limitation for a language would be something like:
Language X can't be used to write programs that require more than
1000 lines of code.
That sounds ridiculous, and it is.
The stigma that PHP applications don't scale well comes from the fact that many inexperienced programmers choose PHP for their web applications. This is because PHP is an easy language to learn, integrates extremely well with Apache, and is supported on nearly every host in the world.
Inexperienced programmers will often use bad practices when writing code. Given enough of these bad practices littered throughout the web, written in the inexperienced programmer's favorite language, it's easy to see why some people are averse to PHP.
There's also, probably, a "holier-than-thou" attitude that some programmers have toward PHP (again, because of its simplicity).
PHP scales just as well as any other language when page caching and best practices are taken into account. There are plenty of well-used PHP projects to prove it.

strongly typed php alternative [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've been programming in PHP for several years now, but I also have some experience in other languages like java, c++, c# etc. I think PHP is a good language for web development, but I really miss some features from the other languages, mostly that PHP is weak typed, and real (operator) overloading is not possible. So now I'm looking for an alternative. I've already tried asp.net (c# mvc), and I really liked that language, but it is windows only, and I want a language which can run on linux based systems.
So do you have any suggestions? I want:
a strongly typed language
good mysql support
function overloading (preferably even operator overloading)
OOP
useful for web development
You may want to check out this similar question. Python seems to be highly recommended in the answers and satisfies all of your criteria except function overloading unfortunately. That said Java and C# both sound a lot like what you may be looking for, and can both be run on linux based systems.
The Django Framework is a python based web development framework that should let you develop web sites using Python if you choose that route.
I know this is an old question, but if you liked C# and ASP.NET MVC maybe you should look at Mono.
Try Haxe. It has a very strong typing and can be compiled to other languages, for example to PHP, so you have all the power of strong typing and flexibility to deploy it to any cheap PHP-driven hosting.
Well, if you like C++, and can write portable code(code that works between Linux and Windows) then you may look at one of the many C++ web frameworks.
Personally though, I couldn't imagine such a large amount of string manipulation in C++ :P

Minimalistic PHP blogging engine with focus on code quality [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to set up a blog.
There are many "what's the best blogging engine?" questions on SO, but none totally focused on code quality.
I have done a lot of work with WordPress, and it's the #1 solution for many cases, no question. Its extendability and versatility are unmatched. But the code base is a mess, it has a huge memory footprint and extending it often isn't fun. Also, the back-end feels extremely slow on slightly older machines and becomes bearable only with Google Gears IMO.
I'm getting less and less comfortable using it.
For that reason, I am looking for recommendations for a PHP-based blogging engine that is
Simple, slim, and minimalistic in build
Has good, structured, clean code, uses PHP5
Has blogging basics: Tags, Categories, Comments
Doesn't have to look good but needs to output good, semantic HTML / CSS so I can customize
Supports some sort of spam control (Captcha and / or Akismet would be nice)
I don't care whether it's database or file based
Optional:
An API would be nice but is not mandatory
Has a plugin system for extensions
Wet dream:
Markdown support
Not sure exactly how many things it knocks off your list but I think Habari is worth a look.
They host a demo you can mess with if you want to check it out quickly.
I would take a look at Vanilla. Mainly it's a forums script, but it also has blogging features.
I has all the things you mentioned. Except is looks good enough:
the entire code is about 500k
it's well structured(MVC and well done), it supports extensions
I'm not sure about tags(for sure they are supported by extensions if not in the core)
looks good, have template mechanism, a few nice themes are available
there are extensions to prevent spam, I don't know if an aksimet extension is available.
it's mysql based
Optional:
- don't know what you mean by apis
- plugins and themes supported
Wet dream should be supported, at least in theory(on my old vanilla forum it worked in a manner I didn't want to, the code was html encoded, so html tags were not supported, including links, however i've seen them working on other forums), if not extensions could solve the problem.
Regarding the spam control and user comments posting you should use 2-3 plugins(Yes plugins are supported and are called Extensions).
There's a huge number of blogging engines written in PHP - all slightly different. For my purposes, I found Serendipity to be the most apposite.
C.

PHP desktop applications [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have quite a few years experience of developing PHP web applications, and have recently started to delve into Python as well. Recently I've been interested in getting into desktop applications as well, but have absolutely no experience in that area. I've seen very little written about PHP-gtk and wonder whether it's really a good area to get stuck in to.
What I'm really looking for is something that will allow me to quite quickly develop some decent small/medium sized apps, and be able to deploy them in Linux and Windows. Something in Python or PHP would be great (but I'd be happy to learn something else if it has big advantages).
What do you guys recommend?
Thanks
Building applications in PHP with GTK is possible to create client-side cross-platform applications, but I don't necessarily think it's the optimal choice for GUI development...
Here are some links:
http://gtk.php.net
http://www.cweiske.de/phpgtk.htm
Gnope.org
kksou
Python and Java are both excellent for working on both Linux and Windows environment. They are generally hassle-free as long as you're not doing any OS specific type of work. Python for creating desktop apps is fairly simple and easy to learn as well if you're coming from a PHP background, especially if you're used to doing object oriented PHP.
Why would you like to develop a desktop app in php??
Get yourself a descent programming environment (c/java/c#/) instead of abusing php
especially with c# and java you get pretty quick very nice results. And both are cross platform (although java is easier for cross platform stuff).
C(++) in combination with QT or GTK is also possible, but there the results appear slower
Well its too late to answer i guess but still for the sake of information may I suggest Open Application Platform (OAP) as a possible solution. OAP allows for PHP/MySQL applications to be distributed as installable Windows(tm) applications.
I stumbled upon it while I was looking for porting a PHP app to desktop and found this. Worked great for me. No extra tags for window creations like in winbinder etc.

Categories