Use caching in PHP for web app? [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 book, tool, software library, tutorial or other 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'm considering building a simple game with PHP as its backbone, but rather than doing a bunch of post redirects like classic web games this one will involve more immediate responses through ajax. In order to achieve what I want though, I think I'll want to store some information (locations of players, for instance) in server memory as opposed to a database. Should I use a caching library like Memcached or APA for this, or is there an alternative that will work better?

Memcached is a great tool for caching data because it's very fast and has a simple interface, but if the data you want to store needs to slightly more permanent and you cannot recreate it if it is lost, I would recommend something more durable. I have used Membase (same interface as memcached, but is persisted to disk eventually) and Redis (more robust interface including lists and a whole lot more).
Bottom line, if it's information you have stored in some other place but you just want to keep fast access to it, memcached is great. If you want something lighter than SQL but it will be the only place the information is stored, try some other NoSQL solution.

Related

Hack back to php [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 was looking at the hack language of Facebook but I have a server running several php sites.
Now I was wondering if there is a tool that can convert hack back to php, so it can be run it on my server but I can develop in hack?
Hack is neither a subset nor a superset of PHP -- we've been calling it a "dialect". While writing a tool to convert many (but not all!) features from Hack to PHP might be possible right now, we don't believe it to be a good idea. This thread has some discussion and elaboration on why: https://github.com/facebook/hhvm/issues/2236 (Super short summary: you really want the runtime to be enforcing your type annotations.)
As that thread says, we do want a better PHP conversion story than we have right now, particularly for frameworks that don't want to convert over to Hack wholesale (since they'd lose most of their users/customers :)). We don't have anything yet, but have some ideas we haven't gotten around to working on yet.

Software/Plugin that tracks website actions [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
We are currently moving a lot of our code to use the api we've developed instead of making sql calls from our php. There will be a lot of functionality to test once this happens. I was wondering if you know of a good plugin or software to use to track and replicate and action (such as registering a user, the logging in, posting a comment, etc). I know there is software like selenium, but I've heard that it would be more of a hassle to setup than it's worth (for what we need it for).
I basically want to create a script of my actions on our stable build, then run that script on the build that is using our newly implemented api build that uses a different database, then come the two databases to make sure they have the same data.
Any suggestions would be great. There has to be a chrome plugin or something, but I haven't been be able to find it after a few hours of searching.
If these are web service calls to your API, you can use curl (on the command line or within PHP) or even Guzzle as it's just an HTTP Client for communicating with web services. What you are describing is testing your app, which is common. There is nothing trivial or easy about full test coverage so prepare to spend some time setting this up and working out the kinks.

SaaS Form asks this: "How is your application architected" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
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.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I've got some forms I'm filling out for my boss regarding our SaaS application, but I'm not quite sure how best to answer them. One of the questions is "How is your application architected" to which I've answered "Object-Oriented MVC" ... is this an appropriate response or am I misunderstanding the question
Look at this:
http://highscalability.com/blog/category/example
you might want to come up with equivalent structure for your application stack. There are some good real-world examples there.
To be more specific, you might want to list at least the following for your application:
What programming language/database/javascript or css frameworks are you using?
What does your application server look like (how many servers? their configurations like processor/memory etc.)
what kind of database servers are you using (how many and how much memory)
What is your web server OS/software (Apache/NGinx or Windows server?)
What kind of caching mechanism are you using (if you are using one)
What is your backup and replication process
What kind of version control you are using.
Are you using any CDN?
What kind of testing and deployment mechanism you are using.
These are some of the things that I can think of but you can always customize this list based on your application. Hope this helps.

Web traffic analytics [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
The site that I am working on creates user sites like (domain.com/user). We want to show the users some web traffic statistics relevant to their own site, like how many views from facebook, twitter etc. Can you guys please recommend a solution which we can integrate into our PHP/MySQL based system? Or is it better to build one inside the system ourselves using mangoDB or something similar?
Any pointers would be appreciated.
For preference, unless you are using SSL, I would recommend implementing the sites as user.example.com/ rather than domain.com/user - it's much easier to configure your webserver to write seeprate log files / most off the shelf web analytics packages will split a log file from multiple vhosts into reports per vhost.
There's lots of tools available off the shelf - piwik, awstats, webalizer, analog
Google analytics is amazingly good value compared to most commercial offerings.
If you need to persist with your current naming schema, then consider using a too which relies on page tagging rather than log analysis.
Or is it better to build one inside the system ourselves using mangoDB or something similar?
I'd suggest that's very much a last resort - if you can't find what you need, then I'd recommend forking one of the open source packages.

Auto back-end generator [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
Is there any PHP application that can automatically generate add/edit forms and listing pages by just reading the database. Like PhpMyAdmin but highly customizable through code or configuration files.
The main reason is to avoid time spent on development of back-end of web applications.
Try a framework, like CakePHP or Symfony. Almost all frameworks offer scaffolding for the backend part of the app. Here's the Cake way, and here's the Symfony way.
Symfony (using Propel or Doctrine) may have just what you're looking for: define the tables and their relationships, and it will generate the models for them, from which it can again generate admin listing/add/edit forms.
Try XataFace
I used it for my websites and it works ok (at least until you want too much from customization)
Try Symphony for code or Modubiz for just configuration.
Forms and pages? Surely this is front-end, not back-end?
You might want to have a look at phpeanuts, phpformgen, phplens, dhtmlxgrid (NB there are other free ajax data grids - but I've not played with them much)
C.

Categories