Quantcast
Channel: Active questions tagged php - Software Engineering Stack Exchange
Browsing index pages (61 articles)

Image may be NSFW.
Clik here to view.

Clean Architecture - How to pass request data towards inner, domain level Use...

Use Case Interactor:We can see it in this picture how does a request cross the layers until it reaches the Use Case Interactor. How does the controller pass the request towards the Use Case Interactor?...

View Article


How do you force developers to define dependencies/arguments if it's bad to...

I just started reading more about OOP and its design patterns and is confused with this conceptual question. I am too new that I am having second thought that the proper title should be, "when is it...

View Article


What does comma signify in a function definition? [closed]

From PHP manual:array array_change_key_case ( array $array [, int $case = CASE_LOWER ] )What does comma signify in a function definition?

View Article

When should I start learning a PHP Framework [closed]

I'm a beginner programmerI have been learning PHP for a while, though not consistently. But for the past few months (say 3 months) I have been a bit consistent in my learning, largely because of a...

View Article

Why PHP doesn't support function overloading?

I am wondering if one of the key features of a programming language is to have the ability to overload functions via arguments. I think it is essential in-context of the Object oriented programming.Is...

View Article


Building a web app with encrypted MySQL database entries?

I have some experience in building PHP based websites with MySQL access, storing encrypted user details, but all other fields being plain text. My most recent project will require sensitive data to be...

View Article

Is there a canonical definition of SPA or is SPA a broadly agreed-on...

Is there a canonical definition of SPA which would exclude the software architecture model described below?I'm working on an app with a new web-architecture model (new to me, at any rate) which has...

View Article

How to namespace global function overrides?

In PHP, trim() exists.By default the second parameter is " \n\r\t\v\x00"I wish to introduce my own version which doesn't deviate far from the core functionality:// Trim whitespace in addition to what...

View Article


Best way to assure uniqueness in filename with php

I was wondering, without using any kind of user info (id, nickname, age, etc), what would be the best way to assure filename uniqueness using php in a large database with high traffic and most probably...

View Article


How to generate URLs for a custom URL shortener?

Due to some issues with other shorteners, I want to create my own URL shortener.I am looking to have a single table that will contain the following columns :-links_id - autoincrement idurl - the actual...

View Article

Best Practices for Implementing a Heartbeat Feature in a Laravel App to Track...

I'm trying to implement a heartbeat feature for offline tracking that just sends an offline message to the server once the web browser app (Laravel-based) is offline. Ideally it will ping the app's URL...

View Article

Image may be NSFW.
Clik here to view.

How should User behaviour depending on role be design as OOP

Imagine I got user which might be either author, administrator, reviewerAn author have relation on book that he wrote.An administrator have relation on banned user (we track which administrator have...

View Article

Handling recurring cURL POST request

I've basically came here for some advise based on my criteria, The application I'm trying to build is built completely from an API. It's like a "marketplace bidding" application, what I'm trying to...

View Article


Exceptions in DDD

I'm learning DDD and I'm thinking about throwing exceptions in certain situations. I understand that an object can not enter to a bad state so here the exceptions are fine, but in many examples...

View Article

Best practice for integrating UI and dynamic user-specific content using a...

I am building a website that uses a recommendation system. Users submit a form which is sent to the backend for the recommendation logic calculation; the recommendation response is sent back to the...

View Article


Intuitive dependency management with code includes?

I am building a PHP CMS system that parses template files and replaces tags with content. Sometimes this content is a HTML, CSS or JS snippet, but it can also be a code include.Most code includes use...

View Article

Image may be NSFW.
Clik here to view.

How do i create a logic for dynamic product list page like below using php...

The big image is catalog or ad blocks that comes from catalog table. And small images are the actual products block that comes from product table.There may be more products and more catalog. attached...

View Article


Is widening parameter types in a PHP interface implementation a good practice?

I have an interface defined as follows:interface MyInterface{ public function setMyMethod(int $a); public function getMyMethod(): int;}And I have a class that widens the parameter type:class MyClass...

View Article

PHP file_put_contents File Locking

The Senario:You have a file with a string (average sentence worth) on each line. For arguments sake lets say this file is 1Mb in size (thousands of lines).You have a script that reads the file, changes...

View Article

Should migrations modify data?

Imagine you have a table that has 5 columns, and you need to split this into two tables, because in your iterative process, your application has increased in complexity.Should migrations change the...

View Article
Browsing index pages (61 articles)


Latest Images