Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.
0
votes
0answers
6 views
Getting data from one loop to a next
I am trying to gett access to the data from this if(isset($_POST['getdata'])) to if(isset($_POST['addto'])) but there is no data being passed and idk why can you help me please.
<?php
$item = ...
-1
votes
0answers
29 views
Framework abstraction - Software architecture for a big long-term project (PHP, Laravel)
we are currently working on a bigger platform considered for long-term expansion and development.
We started with Laravel (PHP) and built a RESTful API (HAL+JSON, HATEOAS).
When i look on the classy ...
-5
votes
0answers
22 views
What sort of thing to avoid and make a habit as Enterprise Software Engineer [on hold]
Now a days , its not writing code and change frameworks and language matter the most.most. Of course , in some situation matter,but you know.Most of the time ,clients need some one with
"fast coding ...
-1
votes
0answers
34 views
Choice of Web Development Technology [on hold]
We are a small team of 1st time developers looking forward to making a custom designed E-commerce website.The technology should be more customizable than content management framework like Joomla, ...
0
votes
1answer
88 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
170 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
74 views
What should config files and the bootstrap do? [on hold]
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 :
...
12
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 ...
-1
votes
0answers
15 views
Php include file path [closed]
I want to call submit.php from folder CA/library.
How would I go on doing it? I am confused if I should directly include("submit.php"); or
include("../") or include("./");
What is the difference ...
-4
votes
0answers
48 views
Learning programming languages? [closed]
This is something that I often wonder a lot and it stops me a lot from continuing my learning process the fact that nowhere I look has any good tutorials on set programming languages, may it be from ...
4
votes
1answer
455 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
163 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
41 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
151 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 ...
-1
votes
0answers
17 views
how to add jquery to change image when mouse come and show captions [closed]
HTML::
<div class="slide-container">
<div class="slide-jumbo">
<div class="jumbo" data-image="1">
<img src="images/2.png">
<div ...
-3
votes
1answer
66 views
REST api on PHP combined with socket.io on node.js is that possible for an application to work? [closed]
On a single server I've got apache, PHP, MYSQL and I'm developing a web application which uses Yii framework with RESTful API extension, on the frontend I use angularjs, it's basically a single page ...
-4
votes
0answers
60 views
How to procedurally generate a gif with php? [closed]
This is something as a designer I've been wondering about. Would it be possible to create a script that could create an automatic, random and unique animation? If so how would it be done and could it ...
0
votes
1answer
109 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
103 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
88 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
172 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
118 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
1answer
132 views
How a real MVC is different from todays MVC used in the web? [closed]
ive heard that MVC used now in days could be called webMVC because they dont implement it like the actual MVC is, so it makes me wonder if there is a guide where i can find the real MVC architecture
...
0
votes
4answers
187 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
30 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 ...
-1
votes
0answers
38 views
Clearly defining an Implementation detail
In what way could I, when designing my API, framework or whatever decide what is and what is not an implementation detail? What questions do I ask in order to correctly answer: "Is that something my ...
-2
votes
0answers
23 views
I would like to expand a SQL query to also get the name of the ID's it is selecting. How do I do that? [migrated]
At the moment I have a very basic SQL query, however I would like to expand it in order to fetch the names of the ID's it is referencing as well. The problem is, it's a Parent > Child relationship ...
0
votes
0answers
81 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
131 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
43 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 ...
0
votes
1answer
114 views
PHP as a target language [closed]
Are there stable well tested SDKs (as opposed to simple language converters) that allow you to develop your application in some decent language (I believe it is widely accepted that PHP is not a well ...
0
votes
0answers
66 views
The finer points of HMVC
I'm new to HMVC and whilst tutorials are great about dealing with the overall details of keeping modules separate and only letting controllers communicate, they aren't so great at explaining the ...
0
votes
1answer
42 views
Does phpDocumentor tags order matter?
When we document our class, method and/or function with phpDocumentor, is there any specific order I should follow according to the standards?
I know it doesn't matter for output the document. Since ...
0
votes
0answers
39 views
Scale parts of image to fill bezier path with no wastage
I want to be able to take an image and stretch/contract each pixel row (or 5 rows for performance) to fit within a curved shape. I've been searching for this for the last few days and have turned up ...
0
votes
1answer
82 views
How to split a Service class in two but still use them like one?
I've got a class:
AuthenticationService
findLoggedInUser()
Checks session if User is logged in. If not, check client persistent user login cookie and log in.
loginUser($email, $pw, $remember = ...
-2
votes
2answers
115 views
php make dollar optional [closed]
Is there any reason the PHP language could not be updated in a future version to make the $ prefix on variable names optional? Reasons that would break existing code?
I'm thinking it would still be ...
1
vote
2answers
216 views
Workflow for obfuscated PHP code with PHP protect
Let's say I have a database-driven web application written in PHP.
After obfuscating the code with PHP protect it will
be copied to a web hosting server.
And here is the question.
What is the ...
2
votes
1answer
116 views
How to tell the View to create a cookie?
I have a LoginService class with loginUser($email, $password, $remember = false) method in the application layer of my model layer.
Now, if $remember is true it needs to create a persistent user ...
3
votes
4answers
370 views
Why is the use of conjunctions in method names a bad naming convention? [closed]
In my team, we work closely with a few software architects. They approve all design decisions of our projects, do some code reviews etc.
Our projects consist mainly of backend functionality ...
0
votes
1answer
159 views
Version controlling of a web project
We (2 developers) are developing a cakephp app that is running on a remote server. In NetBeans we both have project set up as "PHP application from remote server".
The problem is that whenever one of ...
2
votes
1answer
128 views
Using the command pattern for a sequence of tasks
I have a 'sequence of tasks' to undertake on a zip file. It can be simplified into these steps:
Validate that the file is a ZIP file and is valid
Unzip the file
Validate the contents are as ...
0
votes
1answer
119 views
Viable method of sharing our PHP project [duplicate]
We are two developers that have no previous experience in sharing one PHP project. In particular, cakePHP.
We both use NetBeans and we have set the project up as a "PHP application from a remote ...
1
vote
1answer
146 views
In MVC design, do I use a base class over an interface?
In web MVC most designs I've seen, (just choosing model layer as an example) the domain problem class, say students, always inherits the superclass "Model." The name is irrelevant, but why do they ...
3
votes
2answers
126 views
Whether to store all numbers or just their ranges in database for this application
I'm developing a (PHP MySQL) Web App which will sell dynamically generated real time cell phone numbers for cellular companies. A company will ask for, say, a thousand numbers and this app will check ...
0
votes
1answer
140 views
How do I keep my classes in MVC from becoming bloated?
I'm not sure how I should have worded the question.
If I have a Student and Classes database, and I have queries that involve both. Where do I put my queries? In one case, someone wants student ...
0
votes
1answer
79 views
Efficiency of getters/setters with database performance
I'm currently in the process of refactoring a very old personal project of mine, which used procedural PHP-in-HTML code. I'm modernising it as a learning project, using OOP where beneficial. I ...
0
votes
0answers
44 views
Database conceptual Question [duplicate]
When querying in database through PHP, is it good to open mysql connection before every query and close it as the query completes? or should we open the mysql connection as soon as the first query ...
0
votes
2answers
150 views
Database Handler and SQL injection prevention
I've written a database model class in PHP and have written a controller class that specifically validates the data before sending it to db. I'm getting criticism that I should handle the data in ...
0
votes
1answer
301 views
Does this function do one thing only?
Is the following method considered to be doing one thing only?
I'm wondering about that since it takes an optional argument.
public function findErrors($name = null)
{
if ($name) {
...
1
vote
1answer
88 views
Is routing a site with RESTful not the best when you have very long URLs?
I've read a lot about RESTful, but I have always had a hard time figuring out how I'd use it with a very long query string. This is an in-house project, and it won't always have a simple /someAction ...