Welcome to the Splash MVC framework
What is Splash?
Splash is a MVC PHP framework. This package contains the glue code between Splash and the Mouf dependency injection framework.
A MVC framework deeply integrated with Mouf
License: MIT License
Splash is a MVC PHP framework. This package contains the glue code between Splash and the Mouf dependency injection framework.
When using PSR-4 in main composer, we get a warning message on "new controller" interface of Mouf : Warning! Splash could not detect the autoload section of your composer.json file. Unless you are developing your own autoload system, you should configure composer.json to define a source directory and a root namespace using PSR-0.
On creating a new url, since tdbm's new architecture (Dao/Generated), splash uses old DaoFactory's namespace (Dao/) and not the new (Dao/Generated)
When debug=false in Mouf, there is an error occuring with the cache:
Fatal error: Uncaught Error: Call to undefined method Mouf\Mvc\Splash\Annotations\Get::__set_state()
Try to create a new controller, using the UI, and for the action, leave an empty "redirect" field.
You will get a buggy generated PHP file, with this:
header("Location: <br />
( ! ) Notice: Undefined index: redirect in /home/david/projects/wabel/workspace.drupal/vendor/mouf/mouf/vendor/mouf/mvc.splash-common/src/Mouf/Mvc/Splash/Controllers/Admin/SplashCreateControllerController.php on line 358 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0000 | 240760 | {main}( ) | ../mouf_router.php:0 |
2 | 0.0001 | 241832 | require( '/home/david/projects/wabel/workspace.drupal/vendor/mouf/mouf/vendor/mouf/mvc.splash/src/splash.php' ) | ../mouf_router.php:13 |
3 | 0.0116 | 2104256 | Mouf\Mvc\Splash\Splash->route( ) | ../splash.php:24 |
4 | 0.0903 | 2967712 | call_user_func_array ( ) | ../Splash.php:258 |
5 | 0.0903 | 2968712 | Mouf\Mvc\Splash\Controllers\Admin\SplashCreateControllerController->generate( ) | ../Splash.php:258 |
As .htaccess is generic and so often part of the committed files, it would be nice to allow adding custom rules / redirections ... as an example, add a "Force HTTPS" directive, or page redirects in case of site migration, ...
During the installation process, the instance "TheCodingMachine\Middlewares\CsrfHeaderCheckMiddleware" is created before the config variable "CSRF_ALLOWED_DOMAIN_NAMES".
This result an error "Undefined constant .." in the Mouf status page
We must save this instance again (i.e. after the config variable "CSRF_ALLOWED_DOMAIN_NAMES" is set) to solve the error.
Mouf validators ask to create a splash instance if the installation task have not been running yet. This may be confusing, because the install task won't do anything if the splash instance already exists.
See issue #2:
Have a look at the path of the file in error....
The controller of Mouf's Splash instead of the app's Splash!
If a parameter is not passed when calling an URL, an exception, "Missing Parameter", is thrown which returns a 500 HTTP error. I think that it would be preferable to return a 400 HTTP error "Bad request" because it is a client error, not a server one. Similarly, we can do the same thing for the malformed parameters.
Furthermore, I think that we should return a 405 HTTP error "Method Not Allowed" if the URL exists but not for the method used (GET, PUT, POST, ..).
When we create a controller via the Splash UI, it would be a great idea to purge the cache.
It sould be interesting to be able to specify our own custom 404 page whitout having to rewrite the controller.
We should add properties to the HttpErrorController (that implements Http404HandlerInterface, Http500HandlerInterface and Scopabel) to specify the path of our 404 view or even a HTMLElementInterface to be directly inegrated.
Hi,
I read the doc and I think some points are missing : you don't talk about the way to call parameters with the @url param like this :
@url /test/{var1}/{var2}
Plus, you don't talk about the @get and @post annotation too.
You should mention that we must flush "RED" cache in Mouf BO when we change URL in any controller in order that the change can be applied.
We can also say, with a screenshot for example, that we have a recap of all our URL in the Mouf backoffice, just to check if it is taken in account.
I think these points has to be explain to play well with url parameters in Splash ! :)
Good luck !
When a controller is generated, it might be a good idea to autogenerate a PHPUnit class to test the controller.
Note: this would probably require to create a mouf/phpunit package that automatically sets up unit tests.
There is a missing image (splash default instance screenshot) in section "Settings and error handling"
Splash 7 current behaviour is "strict": if some output is performed or nothing is returned from a controller, it triggers an error.
It could be good to weaken this behaviour in development (to get notices, warnings, etc...) or to ease migration (especially in the case of Mouf modules)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.