Loading Kendo UI through composer

4 posts, 0 answers
  1. Rinck
    Rinck avatar
    23 posts
    Member since:
    Feb 2013

    Posted 19 Oct 2013 Link to this post

    This is not so much a question, but more tip for those looking to do the same.

    I'm usiing Kendo + PHP Wrappers in various projects and for all my new projects I have started using composer as an easy way to reuse code and pull in external libraries. The only frustration I had was that I couldn't use this method to pull in the Kendo library.

    So I decided to create my own little composer package, which is basically just a wrapper for the entire Kendo library. It contains both the PHP files and the js/css files.

    For my most recent project I am using the Laravel 4 Framework (awesome, check it out: laravel.com), so my package is focused on Laravel, but really it should work for all frameworks (no laravel dependencies).

    Since Kendo PHP is not open source, I could not simply create a github project and be done with it. Instead I set up a private Composer repository using Satis, using this tutorial: composer/satis tutorial

    That was fairly straightforward and easy to do. To host the library, I created a private subversion repository on my private server (I'll be migrating everything to git once I have more time...) which contains the kendo js, css and php files.

    The next step was to make sure that when I include the Kendo Composer package, the Composer Autoload function works as expected. To make that work, I had to add the following section to my composer.json file:
    "autoload": {
        "classmap": [
            "src/Kendoui/lib"
        ]
    }
    This will ensure that whenever composer updates or installs, it scans the entire library folder and generates a classmap for autoloading. You won't have to manually include any more classes and when the Kendo library is updated, a simple composer update should do the trick for you.

    I just thought I'd share this with everyone in case people are trying to do the same. If you would like to get a similar setup and run into issues, I'm more than happy to help! :)

    Regards,
    Rinck
  2. Paolo
    Paolo avatar
    19 posts
    Member since:
    Nov 2015

    Posted 4 days and 19 hours ago in reply to Rinck Link to this post

    I use Laravel 5, but found easier to simply join it with kendo UI than with kendo ui for php.

    Do you have any suggestions about the best practices to use kendo ui php with laravel 5 without messing up mvc pattern?

     Thanks!

  3. Rinck
    Rinck avatar
    23 posts
    Member since:
    Feb 2013

    Posted 4 days and 19 hours ago in reply to Paolo Link to this post

    Hey Paolo,

     I haven't gotten around to really playing with L5, so I can't help you there. It has been on my todo list for a long time, but I need to find time somewhere first! :-) I'll keep you updated when I do get around to updating to L5 and integrating Kendo UI.

    Regards,
    Rinck

  4. Paolo
    Paolo avatar
    19 posts
    Member since:
    Nov 2015

    Posted 4 days and 14 hours ago Link to this post

    Thanks for your reply Rinck!

     For HTML5/JS Kendo UI there are no problems because HTML5 Kendo are javascript and css libraries so it's simply a matter of linking files in blade views.

    I'll also check how to integrate Kendo UI for PHP into Laravel. I think that findind a good practice in this case is more complex.

    Kind regards.

Back to Top