Tagged Questions

Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.

learn more… | top users | synonyms

0
votes
0answers
26 views

Rewrite Engine vs Boostrap type index file

I currently use apache mod rewrite on a site to redirect various queries / visitors such as this: if you come to example.com/authors/, you are redirected to authors.php if you come to ...
1
vote
1answer
32 views

Patterns for subclass constructors that vary the parent class constructor slightly

So, my problem is in the context of an MVC-style approach. The code here is PHP, but I'm hoping this is a design issue independent of it. abstract class Controller { private $domain; private ...
0
votes
0answers
15 views

Monolog - retrieve the logged messages in a variable

I looked into to monolog, and there are dozens of handlers that allow logging almost everywhere. What I didn't see is logging to a variable. What I mean is that I want the log messages kept in a ...
-2
votes
0answers
19 views

How to use slack api for chat application using php? [on hold]

How to use slack api for chat application using php? Any source code for to develope the chat application using slack api?
0
votes
1answer
52 views

How to determine which service to call

I have modeled my application using multiple 'user' domain objects. Candidate Recruiter Administrator Each entity extends from an AbstractUser implementing UserInterface. interface UserInterface ...
0
votes
1answer
234 views

Why is PHP so hated? [on hold]

Lately I've been coming across several jokes and comics about how apparently awful PHP is. As a complete ignorant of the language, why is this? Is it my own perception or is this the overall general ...
1
vote
1answer
81 views

How to design large applications with little planning experience [on hold]

I understand there is plenty of information on the internet about planning and implementing said solid plan in building a large software application, but I was hoping to get something a little more ...
0
votes
1answer
44 views

Notify about starting event

I am having quite a hard time figuring out how to solve this problem. Basically I have a mini social network with notifications and events. I want to add such functionality where 1 day before an event ...
0
votes
1answer
168 views

When to use AJAX [on hold]

So I am having this internal debate about choosing commonly accessible technology to develop web sites.. There seems to be increasing desire from clients to perform data transfers without the ...
-3
votes
0answers
44 views

Why does flight php break when i rename its directory [on hold]

For some reason when i try to change the directory name of flight to something else the library breaks, i believe I've narrowed it down to the class autoloader but i still don't know why this happens. ...
2
votes
0answers
64 views

How to move php documentation closer to standards?

I have an large php project. I used to document it with NaturalDocs, but I didn't include the documentation generation in the build process for a long time ( years ). I recently started using ...
1
vote
1answer
141 views

Should we use data object (or the data transfer object) for sharing data between these three classes?

I found an article by Martin Fowler that has made me doubt my design choices, particularly about data objects. Martin Fowler has written an article about what he thinks is a code smell. In this ...
0
votes
1answer
90 views

How can I avoid the “global $dbh” anti-pattern?

This is what most of my database-related library code looks like: lib.php <?php $dbh = new PDO(...); function doSomeDatabaseThing() { global $dbh; return $dbh->doStuff(); } function ...
-5
votes
0answers
33 views

need suggestion for restarting my career [closed]

I am a btech in IT having 3 years experience in hardware and networking. I then decided to go in software line. I have done OCA certification and manual testing but coudln't do a job after that. I am ...
0
votes
0answers
43 views

Automatically verifying INSERTs when building a PHP(5.3.3) application

I am building a form in PHP. I would like to automatically verify that INSERT queries are successful, and populate data correctly, as opposed to running queries in Workbench or MySQL with every code ...
-4
votes
0answers
18 views

error in defining a subview in codeigniter [migrated]

this is my controller public function index() { $this->data['users'] = $this->user_login_model->get(); $this->data['abc'] = 'admin/user/index'; $this->load->view ( ...
0
votes
3answers
233 views

Using PHP or C++ for in real world electronic devices

I want to use my programing skills to make my day-to-day life easier, to do this I want to be able to program in my appliances like alarm clock or microwave or refrigerator, air conditioner etc, wish ...
-1
votes
0answers
32 views

Problem with node.js and server.js [migrated]

I'm a bit stuck right now, and hoping someone can shed some light. I'm relatively new to sockets in general, but have been programming in javascript on and off for several years, although only about ...
0
votes
2answers
67 views

Parameters Stored as Sessions - Pros / Cons?

Some background on my system: I have 1 query with multiple pages. There are filtering parameters on the left of the page which $_POSTs on submission. The posted parameters will change the query at ...
1
vote
2answers
114 views

Good way to count unique anonymous visitors of articles

I'm building a website with articles, and I'd like to count unique-per-day visits for each article. The idea to use cookies suggests itself, but I simply can't set a cookie for each and every article ...
1
vote
1answer
55 views

Would this be considered a plugin or template type architecture?

I would like to build a system that basically offers the option to make various APIs interchangeable for usage to the end user. For example, the person using the software would have the option of ...
1
vote
2answers
51 views

Why is entangling injectable with class that uses it a bad practice?

I have had this argument for a while, because I have noticed some people prefer "readable" code over properly structured one. So in the example I am showing, basically I have this Mapper class in ...
1
vote
0answers
41 views

Incorporating custom Algorithm in SOLR-LUCENE , before Indexing?

CURRENT FLOW: I am using a custom algorithm(presently in php) to rank the MYSQL records before INDEXING it to SOLR . WHAT I WANT : Is it possible implementing this ALGORITHM(may be in JAVA) inside ...
-3
votes
1answer
41 views

Understand the date structure - how the date is structured [closed]

I am just not getting the structure below Can anyone pls explain below date structure? 2014-11-01T02:35Z What does the T and Z means here?
-1
votes
1answer
81 views

Looking for encryption method [closed]

I have a blackbox system whose code is hidden from the end user. That's the intent anyway, I know some may break into it, but generally it's closed. It's running on PHP, and I need to export a ...
0
votes
1answer
67 views

Improve processing of data (and structure) from flat file to CMS Database

I have a flat file (CSV) that brings me the data I want, but it needs to be cleaned and processed before it can be used, so I built an intermediate Database (MySQL) in order to get the structure from ...
-1
votes
0answers
59 views

Efficient way to get comments of newspapers [duplicate]

I'm trying to get comments of large newspapers for a personal project. (Top newspapars in this list: http://www.onlinenewspapers.com/Top50/Top50-CurrentUS.htm) I tried to find their rss feeds but ...
-4
votes
1answer
54 views

How do i upload small changes on a view of an asp.net mvc4 project [closed]

How do i structure an asp.net mvc 4 website in such a way that i can make small changes to views and upload those small changes only. i am a php developer trying to switch to asp.net mvc4. please ...
1
vote
1answer
104 views

What is the point behind building an abstraction layer PDO Adapter class instead of using native PDO?

I have built a PDO adapter class because I thought, at the time anyway, it would be a good idea. After fighting with it, it makes no sense to me. Isn't the design of PDO the way it is to keep you ...
1
vote
1answer
77 views

Transferring information between a web server and a Python backend?

I have been Googling my problem but haven't been able to come up with anything; here's the situation: I have a PHP / MySQL website hosted with 1and1.com. I also have a Python program that runs on a ...
0
votes
1answer
152 views

Project directory structure

Actually i'm using this project directory structure http://framework.zend.com/manual/1.12/en/project-structure.project.html But recently i started using namespaces in all my php-classes like: ...
0
votes
1answer
55 views

Storing Form Data in a class

I have a form that writes to a database. Other than creating a class handle an external API, this project is done. However, the processing script is your standard procedural calling of queries using ...
0
votes
1answer
108 views

Different operators in query string like ?var!=value

This one may actually be 2 questions in one. Studying some APIs I came across an api suggesting to have operand different from equal (=) inside the query string (http://www.salesboard.com/api/): ...
0
votes
1answer
189 views

Is not being able to resolve a function call to its declaration a drawback of Polymorphism?

Consider a class that prints an "outline" table for a particular product line. Say you have several, A, B, C, D. The mechanism of the table generation is the same, but the data is different. I ...
-2
votes
2answers
87 views

What should config files and the bootstrap do? [closed]

I already read dozens of articles and questions/answers on SO and Programmers but I can't understand what config and bootstrap files are, in the context of a web application. So my questions are : ...
14
votes
2answers
2k views

Illegal in PHP: Is there an OOP design reason?

The below interface inheritance is illegal in PHP, but I think it would be fairly useful in real life. Is there an actual antipattern or documented problem with the below design, that PHP is ...
4
votes
1answer
481 views

How dangerous is it to take shortcuts when coding Web based applications? [closed]

I started working as a Web developer few months back. Previously, I had no prior professional experience in programming besides school classes and fun-side projects I did on my own. I am the only ...
0
votes
1answer
172 views

Static and not-static: programmer quantum theory

Let me illustrate using the PHP language. The discussion here is, how should I do exactly to solve this problem in a clear and unambiguous mode. Imagine that I have a class called Path. This class is ...
0
votes
1answer
53 views

How to keep class parameters visible while using generic argument passing

After writing some classes where class initialization requires multiple options, instead of writing several parameters into constructors or setters, I started passing an associative array of ...
2
votes
2answers
175 views

How would I allow a PHP front end to communicate with a back end written in Go (or any other combination of languages)?

I like PHP. It's not overly complex to achieve what you want, you can write straight up HTML inside it, and I suppose I'm just used to it. I also like Go, having just discovered it while looking for ...
0
votes
1answer
118 views

Is there a particular coding standard with comments between function name and body?

I'm integrating with a shipping API built in php. They have a strange coding standard where the comments are between the function name and the first curly bracket.. which - subjectively - makes the ...
0
votes
0answers
110 views

How many functions called by other functions are too many?

I posted a question about a week ago about using PHPExcel with multiple cases of use and how to simplify it. Since then my process has simplified as we've agreed to work with a single lay out with ...
0
votes
0answers
102 views

More efficient management of assets(image, documents) in a large web project

I am beginning to refactor a large, very old, messy project. One of the biggest issues is the lack of a central location on the filesystem for simple things like images, icons, documents, csv, etc. ...
0
votes
3answers
206 views

How do I design my application to use REST for itself?

I'm not sure how to ask this. I know this is simplistic, but I understand (I think): REST is an architecture, not required, simply a way to build REST is a style and a community standard for ...
1
vote
1answer
136 views

Progress in PHP web application design [closed]

I have created an easy database-driven web application (with PHP+MySQL). It's written procedurally with a few controllers (index.php) in a few directories and a few template files and one stylesheet. ...
0
votes
4answers
222 views

Notifications system with too many subscribers

In my application users can subscribe to other users, like in every social network out there. However I'm experiencing some trouble when a user has too many subscribers. Every time a user posts ...
1
vote
0answers
44 views

PHPExcel Application With Cases

I've been working on an application for my company's intraweb which will automate production scheduling based on information from our legacy mainframe databases in addition to side tables with ...
0
votes
0answers
116 views

Tournament bracket customized algorithm

I'm in the making of a tournament for archery but i'm stuck because they want a specific match-matching for players. There is the usual 1-32,2-31,3-30 etc but the way they want the tree is a specific ...
1
vote
1answer
155 views

Static controllers

I have built myself a PHP MVC framework to meet my needs. As pretty much all of the core classes are static, I just stumbled upon the idea of having static controllers. I know that for some reason ...
0
votes
1answer
48 views

How to implement a Daily Recap email of Database records modified the previous day sent to Subscribed Users like Basecamp does?

I am building a Project Management module for SugarCRM. It consists of a "Project" which has information on the project like Name, description, start and completion dates, creator name, status ...