Giter Site home page Giter Site logo

rotexsoft / slim-skeleton-mvc-app Goto Github PK

View Code? Open in Web Editor NEW
34.0 5.0 8.0 2.17 MB

This is a template web-application (powered by SlimPHP), that can be extended to build more complex web applications.

License: BSD 3-Clause "New" or "Revised" License

PHP 97.97% CSS 0.37% JavaScript 0.23% Hack 1.43%
slim slim-framework slim-3 slimphp slim-micro-framework php micro-framework microframework mvc mvc-framework

slim-skeleton-mvc-app's People

Contributors

rotexdegba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

slim-skeleton-mvc-app's Issues

Version 4 Documentation Updates

Make sure all Excecptions Are Handled Properly

  • In the Slim 3 based version of this framework, some exceptions get handled by Slim's default exception handler even when errorHandler is set in the application. Perhaps look into a try catch in public/index.php or advise users to use an error handler that gets rendered with pure php, no templating engine.

Remove local UI Framework Assets

Remove local UI (i.e Foundation, Bootstrap etc) files and JS and CSS framework files and replace them with cdn links for those files. This will make updating the frameworks easier since it will only be links that will be changed in the template files.

Add enhanced dev server

Use Laravel as inspiration:

dev-server-router.php

<?php
$uri = urldecode(
    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''
);

// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
    return false;
}

require_once __DIR__.'/public/index.php';

php -S 0.0.0.0:8888 -t ./public dev-server-router.php

Class autoloading

Hi,

I see Hello controller is only available as it is declared in Composer:

  1. In autoload_classmap.php:
    'Hello' => $baseDir . '/src/controllers/Hello.php'

  2. In autoload_static.php:
    'Hello' => __DIR__ . '/../..' . '/src/controllers/Hello.php'

But what about other - user defined - models and controllers in the application?
What is the proper way to declare them as it seems the app itself does not look for them by itself?

Improve code organization

  • Eliminate redundant code and make use of new php 7.2 and 7.3 features wherever possible.
  • Look at using a package like climate for cli operations.
  • Use Rector and Psalm for code enhancement
  • Look at vanilla laravel projects to get ideas of best practices to incorporate

Add Users Controller

Add a lean and fully functional Users controller that will perform BREAD (Browse, Read, Edit, Add and Delete) operations on Users for each application created using this framework. This implementation should not require any composer package. Just plain old PDO and sqlite.

Make this controller also support login with Google, Facebook & other popular identity providers.

https://www.codexworld.com/login-with-google-api-using-php/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.